Make a GET call to the /emails/activities/{campaign_activity_id}/schedules
endpoint to return the schedule for an email campaign activity. This schedule contains the date that Constant Contact will send the email campaign activity to contacts. If the email campaign activity is not currently in SCHEDULED
status, this method returns an empty array and a 200 response code.
This method uses dates in the ISO-8601 standard format. The full ISO-8601 format is YYYY-MM-DDThh:mm:ss.sZ
. For example, 2019-05-16T13:38:55.000Z
.
YYYY-MM-DD
refers to the year (Y), month (M), and day (D).
Thh:mm:ss.sZ
refers to the time (T) using hours (h), minutes (m), seconds (ss), fractions of a second (s), and the UTC timezone (Z).
Parameters
This method requires the campaign_activity_id
URL parameter. Use the campaign_activity_id
parameter to specify which email campaign activity you want to return the schedule for.
Authorization Requirements
User privileges: campaign:read
Authorization scopes: campaign_data
Example GET Schedule Call
This example GET call returns the schedule for an email campaign activity.
GET https://api.cc.email/v3/emails/activities/{campaign_activity_id}/schedules
<?php
$request = new HttpRequest();
$request->setUrl('https://api.cc.email/v3/emails/activities/3cfe7b98-3633-4065-950e-de0baeb17563/schedules');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Postman-Token' => '3804abe9-f4b2-4f94-9323-2b13a70317bb',
'cache-control' => 'no-cache',
'Authorization' => 'Bearer {access_token}'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.cc.email/v3/emails/activities/3cfe7b98-3633-4065-950e-de0baeb17563/schedules")
.get()
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("cache-control", "no-cache")
.addHeader("Postman-Token", "a4fd97ab-a271-4094-8241-3642c507262d")
.build();
Response response = client.newCall(request).execute();
curl -X GET \
https://api.cc.email/v3/emails/activities/3cfe7b98-3633-4065-950e-de0baeb17563/schedules \
-H 'Authorization: Bearer {access_token}' \
-H 'Postman-Token: 64d08e51-439b-4078-9149-0ad88587ca46' \
-H 'cache-control: no-cache'
Response
[
{
"scheduled_date": "2022-05-10T12:53:55.000Z"
}
]