Constant
Contact
API Guide
Bulk Activity EndpointsGet the Status of a Bulk Activity

Get the Status of a Bulk Activity

There are two ways to gather the status on bulk activities:

  1. Make a GET call to /activities.
  2. Make a GET call to /activities/{activity_id}

When a request is made to one of the bulk activity endpoints, the response payload includes the activity_id assigned by the system. It also provides status information for the activity at that particular moment in time. Large requests, such as importing 10,000 contacts, take some time to process. You can check on status of the activity by making a GET call to the /activity/{activity_id} endpoint, using the activity_id returned in the original response.

Activity Status Lifetime

An activity status is retained for 10 days.

Activity Status Collection

You can view all the activity status from the last 10 days by making a GET call to the /activity endpoint.

Get Activities Request Sample

GET
https://api.cc.email/v3/activities

Endpoint Requirements

User privileges: contacts:writeAuthorization scopes: contact_data
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.cc.email/v3/activities/")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("Cache-Control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Get Activities Response Sample

{
  "activities": [
    {
      "activity_id": "{activity_id}",
      "state": "initialized",
      "started_at": "completed",
      "completed_at": "2016-01-23T13:48:44.108Z",
      "created_at": "2016-01-23T13:48:44.108Z",
      "updated_at": "2016-01-23T13:48:44.108Z",
      "source_file_name": "2016-21-04-contact_import.xls",
      "percent_done": 75,
      "activity_errors": [
        "Message describing the error condition."
      ],
      "status": {
        "items_total_count": 2200,
        "items_completed_count": 2100,
        "person_count": 8750,
        "error_count": 0,
        "correctable_count": 0,
        "cannot_add_to_list_count": 0,
        "list_count": 3
      },
      "_links": {
        "self": {
          "href": "/v3/activities/{activity_id}"
        }
      }
    }
  ],
  "_links": {
    "next": {
      "href": "/v3/activities/{actvity_id}"
    }
  }
}

Get Activity Request Sample

GET
https://api.cc.email/v3/activities/{activity_id}

Endpoint Requirements

User privileges: contacts:writeAuthorization scopes: contact_data
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.cc.email/v3/activities/{activity_id}")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("Cache-Control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Get Activity Response Sample

{
  "activity_id": "04fe9a-a579-43c5-bb1a-58ed29bf0a6a",
  "state": "initialized",
  "started_at": "completed",
  "completed_at": "2016-01-23T13:48:44.108Z",
  "created_at": "2016-01-23T13:48:44.108Z",
  "updated_at": "2016-01-23T13:48:44.108Z",
  "source_file_name": "2016-21-04-contact_import.xls",
  "percent_done": 75,
  "activity_errors": [
    "Message describing the error condition."
  ],
  "status": {
    "items_total_count": 2200,
    "items_completed_count": 2100,
    "person_count": 8750,
    "error_count": 0,
    "correctable_count": 0,
    "cannot_add_to_list_count": 0,
    "list_count": 3
  },
  "_links": {
    "self": {
      "href": "/v3/activities/{actvity_id}"
    }
  }
}
Try it!

On this page