GetAddressBooks

Gets all address books

This method retrieves a list of all address books in the account.

Even though this will return the 'Test' address book, you can't add to it or edit it in any way as the 'Test' address book can't be written to via the API.

The select parameter requires a number between 1 and 1000 (0 is not a valid number). You may only select a maximum of 1000 results in a single request.

The skip parameter should be used in tandem with the select parameter when wanting to iterate through a whole data set. If you want to select the next 1000 records you should set the select parameter to 1000 and the skip parameter to 1000, which will return records 1001 to 2000. You should continue to do this until 0 records are returned to retrieve the whole data set.

SOAP action: http://apiconnector.com/v2/ApiService/GetAddressBooks

📘

Input and output parameters

The input and output parameters for this method are:

Input parameters

  • Select - optional; integer
  • Skip - optional; integer

Output parameters

  • GetAddressBookResult - array of AddressBook
    • AddressBook
      • Id - integer
      • Name - string
      • Visibility - *string ('Private', 'Public')
      • Contacts - integer

Example

using (var client = new ApiServiceClient())
{
    client.ClientCredentials.UserName.UserName = "username";
    client.ClientCredentials.UserName.Password = "password";

    var select = 1000;
    var skip = 0;
    var addressBooks = client.GetAddressBooks(select, skip);
}
ini_set('soap.wsdl_cache_enabled', 0);
ini_set('soap.wsdl_cache_ttl', 900);
ini_set('default_socket_timeout', 15);

$username = ‘[email protected]’;
$password = ‘dummypassword’;

$parameters = array(
    'username' => $username,
    'password' => $password
);

$client = new SoapClient('http://apiconnector.com/api.asmx?WSDL');
$result = $client->ListAddressBooks($parameters);
$addressBookData = $result->ListAddressBooksResult->APIAddressBook;