Hello CEESI,
Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
When calling the GET /contacts endpoint, you'll need to make multiple calls, as the maximum number of entries that can be returned at a time is 500, but the results use pagination and will include a link to call for the next 500 results (until there are no more pages left).
GET Contacts Collection
https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts/getContacts
You'll start by making sure to include the "limit" query parameter in your call with a value of "500", otherwise it defaults to only 50 results.
You'll also want to set the status parameter to "all" to ensure that in addition to active contacts, you are also getting and contacts in other statuses, such as deleted, not_set, pending_confirmation, temp_hold, and unsubscribed.
Additionally, if you are wanting to determine which contacts are or are not on lists, using the "include" query parameter with a value of "lists" will include the list IDs for each contact as well.
Example call:
GET
https://api.cc.email/v3/contacts?status=all&include=lists&limit=500
At the end of the 500 entries returned, if there are more than 500 results, you will see a section that looks similar to this at the very bottom of the response body:
"_links": {
"next": {
"href": "/v3/contacts?cursor={value}"
}
}
You will use this link to make another call to get the next page of results, like so:
Example Call:
GET https://api.cc.email/v3/contacts?cursor={value}
Then, if the results of the second call have a next link at the bottom of the response body, you will use that to make a third call, and so on.
Please have a look and let us know if you have any other questions!
I believe you have to include the status = all in the parameter of the endpoint you try to retrieve the contacts.
Hello user6365 ,
Thanks for catching that! I have updated/corrected my original response in case the poster also wants contacts of all statuses, rather than just access to the paginated results.
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up