The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Download CSV from the response of Individual Activity API Call

Highlighted
Frequent Visitor

Download CSV from the response of Individual Activity API Call

Hi all,

I am firing a Bulk Import Add Contact API Call to add multiple contacts in one go.

Now, there is one case where my script is adding contacts which are already present in the constact contact but are UNSUBSCRIBED (contact status OPTOUT).

I understand I cannot add contacts in Constant Contact without user consent. For that reason I need a report of those email addresses.

From Dashboard(Activity Tab) I get exactly what I want. But is there a way to get that from API.

I noticed that Individual Activity API provides a CSV. But it returns only a generic CSV file name(upload_from_json.csv) instead of URI. So I am not sure where to make a GET request as suggested in the doc.

Can anyone please help me with this?

Thanks,
Jigar D.

3 REPLIES 3
Highlighted
Moderator

Re: Download CSV from the response of Individual Activity API Call

Hello Jigar,

 

Thank you for reaching out to the API Support team here at Constant Contact.

 

The ability to download unsubscribed contacts from the import within the Constant Contact UI is a newer feature and is not available via the API. The file_name field for an individual activity will show a URI if the activity is an export. When doing an import, the file name will be the name of the file imported (or a generic upload_from_json.csv for bulk JSON imports).

 

You can use the API to get a list of all unsubscribed contacts by making a bulk contact export call, choosing to only ask for the list as OPTOUT as defined in our documentation here: https://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-export-contacts.html

 

Please let me know if you have any other questions!

 

Sincerely,
David B.
API Support Specialist

Highlighted
Frequent Visitor

Re: Download CSV from the response of Individual Activity API Call

Hi David,

I think you misunderstood my question. I want to be able to Download the file with contacts "Imported but unsubscribed previously" through API instead of Interface as shown in image below.
ctct-import-warn.png

 

We cannot check for unsubscribed contacts in whole Constant Contact Account as over the time contacts will grow and we are concerened only with particular Email List. 

I am adding all the new contacts to an Email List via BULK IMPORT API CALL but there can be a case when the contact can already exist in Constant Contact Account with OPTOUT status. That's when above report is generated.

Tags (1)
Highlighted
Moderator

Re: Download CSV from the response of Individual Activity API Call

Hi JigarD0,

 

The feature in our website UI that allows you to download the unsubscribed contacts for the import that just occurred is a newer feature and is not available in the v2 API. We are currently developing our v3 API and I will pass this request along to our engineers to see if we can get this feature in the v3 version when it is released.


Regards,
Jimmy D.
Tier II API Support Engineer
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured