Retrieve the report totals of a campaign

The headline counters of a campaign report: sends, opens, clicks, unsubscribes, forwards, bounces and attributed revenue. The v3 counterpart of the v1 campaign_report_totals action and its per-metric variants. Totals are lifetime unless both startDate and endDate are sent, which restricts the time-based counters to that window. Every field is always present; a field the chosen branch does not compute is null (the lifetime totals carry updates, totalBounces, socialShares, uniqueReplies and revenue; a date window carries replies, bounces and shares instead). Answers 403 when the account has no campaigns entitlement or the user may not see the campaign, 404 when no totals exist for it, 400 when messageId does not belong to the campaign, and 422 when a query parameter is invalid.

Path Params
integer
required
^(?:\d+)$

ID of the campaign to report on

Query Params
integer
≥ 0
Defaults to 0

Restrict the totals to one message of a split campaign. 0, the default, reports the whole campaign.

string

Start of the date window, as Y-m-d, Y-m-d H:i:s or Y-m-d\TH:i:s; a date alone starts at midnight. Send together with endDate.

string

End of the date window, in the same formats as startDate; may not be earlier than startDate. Send together with startDate.

string
enum
Defaults to true

true, the default, counts clicks identified as bot clicks; false leaves them out of the click counters. Only true or false is accepted.

Allowed:
Responses

400

The totals could not be computed for the request, for example a messageId that does not belong to the campaign. Body: errors, a list with one item carrying status "400" and detail, the localized reason.

403

The account is not entitled to campaigns (detail "This account is not entitled to campaigns.") or the user may not see the campaign (detail "Forbidden"). Body: errors, a list with one item carrying status "403" and detail.

404

No totals found for the campaign. Body: errors, a list with one item carrying status "404" and detail "No report totals found for campaign {campaignId}.".

422

A query parameter is invalid: empty or not a single value, messageId not a whole number of 0 or more, includeBots not true or false, a date in another format, only one of startDate and endDate, or endDate before startDate. Body: errors, a list with one item carrying status "422" and detail naming the problem.

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json