Contact ReportingGet Activity Summary
Get Activity Summary
Use the /reports/contact_reports/{contact_id}/activity_summary endpoint to retrieve a list of recent email campaigns sent to a specific contact and a summary of the email campaign activities the contact had with that email campaign. Activity types include:
em_sendsem_opensem_clicksem_bouncesem_optoutsem_forwards
The endpoint requires two query parameters, start and end, that define a date range for the report. The start and end query parameters must be provided in ISO 8601 format. For example, 2018-08-16T12:30:00Z. The response will include the most recent 200 email campaigns with a pagination link to the next 200 emails.
Example GET Request
GET
https://api.cc.email/v3/reports/contact_reports/{contact_id}/activity_summaryEndpoint Requirements
User privileges: ui:campaign:metricsAuthorization scopes: contact_dataOkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.cc.email/v3/reports/contact_reports/{contact_id}/activity_summary?start=2018-01-01T00:00:00.000Z&end=2018-08-09T00:00:00.000Z")
.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();Example GET Response
{
"contact_id": "71600990-908b-11e6-907f-00166bff25",
"campaign_activities": [
{
"campaign_activity_id": "string",
"start_on": "2018-08-06T15:10:22.269Z",
"em_bounces": 0,
"em_clicks": 0,
"em_forwards": 0,
"em_opens": 0,
"em_sends": 0,
"em_unsubscribes": 0
}
],
"_links": {
"next": {
"href": "/v3/activities/{actvity_id}"
}
}
}