Bulk Activities
Export Contacts to a File
Use this method to create an activity that exports contacts and contact details to a CSV file. You can choose to export all contacts in your account (default) or you can use parameters to filter on which contacts to export. After Constant Contact finishes processing the activity, use the results link in the response body to retrieve the CSV file.
post/activities/contact_exports
Request body
Example request
{
"contact_ids": [
"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a"
],
"list_ids": [
"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a"
],
"tag_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"new_subscriber": true,
"segment_id": 12,
"fields": [
"email_address"
],
"status": "unsubscribed",
"exclude": {
"contact_ids": [
"4d88f172-21d1-11ea-b5ae-fa163e56c9b0"
]
}
}Response
Request successful, queued for processing.
Example response
{
"activity_id": "86b90820-cc52-11ea-9dad-fa163e3d9194",
"state": "initialized",
"started_at": "2016-01-23T13:48:44.108Z",
"completed_at": "2016-01-23T13:48:44.108Z",
"created_at": "2016-01-23T13:48:44.108Z",
"updated_at": "2016-01-23T13:48:44.108Z",
"percent_done": 75,
"activity_errors": [
"Message describing the error condition."
],
"status": {
"items_total_count": 8751,
"items_completed_count": 351
},
"_links": {
"self": {
"href": "/v3/activities/04fe9a97-a579-43c5-bb1a-58ed29bf0a6a"
},
"results": {
"href": "/v3/contacts_exports/04fe9a97-a579-43c5-bb1a-58ed29bf0a6a"
}
}
}