The AddContactsToAddressBook method is now considered obsolete and you should use AddContactsToAddressBookWithProgress where possible.
This method adds multiple contacts stored in a CSV or XLS file to an address book using a single API call. It allows you to set the information about the contacts you are uploading and the address book you are uploading them to.
We recommend that you use a .CSV file wherever possible. It is useful when you need to upload multiple contacts in one go into the dotMailer system. As each call only counts as one API call it allows you to easily stay below your API limit whilst uploading multiple contacts. It has the benefit of being run through our data watchdog so you know the data you are importing is of a good quality.
Guidance Notes
This method will create the contact being added if it doesn't already exist which means you do not need to call a method such as CreateContact before calling it. You may upload either a .csv or .xls file. It must contain one column with the heading "Email" or the translated equivalent if your account is using a language other than English. Other columns will attempt to map to your custom data fields. There is a 10MB upload limit per file.
As the import goes through our data watchdog there might be a delay between uploading the contacts and them being successfully added to the address book.
Parameters
| username |
string |
This is the username from your API key. It is in the format of an email address and will look similar to apiuser-908709770324@apiconnector.com |
required |
| password |
string |
This is the password from your API key. |
required |
| addressBookId |
int |
This is the Id of the address book which you would like to upload the contact to. |
required |
| data |
base64Binary |
This is the original file, encoded in Base64 format. |
required |
| dataType |
CSV or XLS |
This is the type of file which you are uploading, either .CSV, or .XLS. At this time, XLSX is not supported. |
required |
Return values
None.