GetContactsInAddressBookWithPreference

Gets contacts who are opted in to a given preference and a given address book

This method returns an array of up to 1000 contacts who are in a given address book and who are opted in to a given preference.

If no contacts in the given address book are opted in to the given preference, an empty array is returned. Otherwise an array, which contains contact objects is returned.

🚧

Preference categories

Results are returned only for preferences, not preference categories.

If you specify the ID of a preference category in the path parameter, an empty array will always be returned.

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

📘

Input and output parameters

Input parameters

  • BookID - required; integer
  • PreferenceID - required; integer
  • MinContactID - integer

Output parameters

  • GetContactsInAddressBookWithPreferenceResult - Array of Contacts
    • Contact
      • ID - Integer
      • Email - string

Example

using (var client = new ApiServiceClient())
{
    client.ClientCredentials.UserName.UserName = "username";
    client.ClientCredentials.UserName.Password = "password";
    var result = client.GetContactsInAddressBookWithPreference(preferenceId: 1, bookId: 5, minContactId: 0);
}