Hi can anybody tell me how I can get total count of contacts in a contact list? Which API should be used for this functionality?

Highlighted
Regular Participant

Hi can anybody tell me how I can get total count of contacts in a contact list? Which API should be used for this functionality?

Hi can anybody tell me how I can get total count of contacts in a contact list? Which API should be used for this functionality?

Regards

Akhilesh
4 REPLIES 4
Highlighted
Developer

re: Contacts in a Contact List (and the count of them)

The most direct way to do this is to Create an Export Activity using the Activities Resource. You can identify the Contact List of interest and review the results of the export.
Tom M
Group Product Manager – Content Editing
Constant Contact
Highlighted
Regular Participant

Always getting error 400 "Bad Request" (Export Activity)

Hi Tom,

I tried creating an Export Activity as explained in the docs but I'm always getting an error 400 "Bad Request". Content I'm posting to Activity URL is following:

"activityType=EXPORT_CONTACTS&fileType=CSV&exportOptDate=true&exportOptSource=true&exportListName=true&sortBy=DATE_DESC&columns=FIRST+NAME&columns=LAST+NAME&columns=EMAIL+ADDRESS&columns=HOME+PHONE&columns=WORK+PHONE&columns=ADDRESS+LINE+1&columns=ADDRESS+LINE+2&columns=CITY&columns=STATE&columns=POSTAL+CODE&columns=COUNTRY&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&lists=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2fakhilesh%2flists%2f49"

Can you suggest me what is wrong in this?

Regards

Akhilesh
Highlighted
Regular Participant

&lists= should have been &listId= in the above content

Hi Tom,

I found the issue. &lists= should have been &listId= in the above content.

right content would be as following:

"activityType=EXPORT_CONTACTS&fileType=CSV&exportOptDate=true&exportOptSource=true&exportListName=true&sortBy=DATE_DESC&columns=FIRST+NAME&columns=LAST+NAME&columns=EMAIL+ADDRESS&columns=HOME+PHONE&columns=WORK+PHONE&columns=ADDRESS+LINE+1&columns=ADDRESS+LINE+2&columns=CITY&columns=STATE&columns=POSTAL+CODE&columns=COUNTRY&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&listId=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2fakhilesh%2flists%2f49"

Regards

Akhilesh
Highlighted
Regular Participant

How to capture results of the export?

Hi Tom,

Can you give me an idea about how to check result of an export activity?

Regards

Akhilesh
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured