API list services with parameter

Hello, i tried to get list of customers with the specific service parameter. I was looking on the example here: http://docs.splynx.apiary.io/#reference/customers/custom-services-collection/list-custom-services-by-parameters and example on the wiki.

This is my php code:

<?php

include 'SplynxApi.php';

$splynx_url = 'URL'; 

$key = "key";
$secret = "secret"; 


$api = new SplynxAPI($splynx_url, $key, $secret);


$search = array(
                'main_attributes' => array(
                        'status' => 'active'
                )
);

$servicesApiUrl = "admin/customers/customer/0/custom-services?".http_build_query($search);

print "<pre>";

print "List locations\n";
$result = $api->api_call_get($servicesApiUrl);
print "Result: ";
if ($result) {
    print "Ok!\n";
    print_r($api->response);
} else {
    print "Fail! Error code: $api->response_code\n";
    print_r($api->response);
}

?>

I got response: OK but nothing to print.
Can you please advise me, where I have problem?

I have splynx version 1.2.

Thank you.

This feature will be available on Splynx 1.3.

1 Like

Thanks. Maybe a note about minimal splynx version in the API documenation would be great :slight_smile:.

Yes :slight_smile:

in a future we will release version of API Doc with Splynx … :slight_smile: