ImportContactsToAddressBook

Bulk creates, or bulk updates, contacts in an address book

🚧

Active contact imports are limited to 25

If you exceed this limit, you'll get the 'too many active imports' error.

This method bulk creates, or bulk updates, contacts in the import file within the specified address book.

The import format can either be CSV or Excel. It must contain one column with the heading 'Email' or the translated equivalent if your account is using a language other than English. Any other columns will attempt to map to your custom contact data fields.

There is a 10MB file upload limit; if your file is larger than this, please break your upload into separate files.

The ID of the returned object can be used to query import progress.

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

📘

Input and output parameters

Input parameters

  • AddressBook ID - required; integer
  • Data - required; file
  • dataType - required; string

Output parameters

  • ImportContactsToAddressBookResult
    • Id - GUID
    • Status - string ('Finished', 'NotFinished', 'RejectedByWatchdog', 'InvalidFileFormat', 'ExceedsAllowedContactLimit', 'Unknown', 'Failed')

Example

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

	var path = @"contacts.csv";
	var data = File.ReadAllBytes(path);
	var dataType = "csv";
	var addressBookId = 1;
	var contactImport = client.ImportContactsToAddressBook(addressBookId, data, dataType);
}