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?
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!
API Support Specialist
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.
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.
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.