One ad's performance: totals plus a day-by-day series
Reads stored metrics; the platform is not called.
What this adds over GET /v1/ads/{adId}, which already returns the ad and its totals, is the DAILY series -- that is the whole reason the endpoint exists rather than a second view of the same numbers.
Days with no delivery are omitted rather than zero-filled: a stored zero and an unsynced day are different facts, and coverage reports how much of the range is actually backed by synced data, so partial totals cannot be mistaken for complete ones.
Demographic breakdowns are NOT served and the parameter is not accepted: they cannot be derived from stored data, and accepting a parameter that is then ignored would let a caller believe they got what they asked for.
Authentication
The following security requirement applies to this operation.
Read the authentication guideParameters
adIdpathrequiredThe platform's own ad id.
adIdstringrequiredOriginal schema
{
"type": "string"
}toDatequeryoptionaltoDatestring- pattern
^\d{4}-\d{2}-\d{2}$
Original schema
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}fromDatequeryoptionalfromDatestring- pattern
^\d{4}-\d{2}-\d{2}$
Original schema
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}Responses
Status codes and shapes declared for this operation. Read each description for the meaning of that response.
200Response schema
Response 200object
- required
[ "ad", "metrics", "daily", "coverage" ]
adobjectrequired
- required
[ "id", "name", "platform", "status", "campaignId", "adSetId", "currency", "platformAdAccountId" ]
idstringrequiredThe platform's own ad id.
namestringrequired- nullable
true
platformstringrequiredstatusstringrequired- enum
[ "active", "paused", "pending_review", "rejected", "completed", "cancelled", "error" ]
campaignIdstringrequiredParent campaign id, so a caller can walk up the hierarchy.
- nullable
true
adSetIdstringrequiredParent ad set id.
- nullable
true
currencystringrequiredISO 4217 code for every money field in metrics.
- nullable
true
platformAdAccountIdstringrequired- nullable
true
metricsallOfrequired
Totals over the whole range.
allOf / 1object
- required
[ "spend", "impressions", "clicks", "engagement", "conversions", "ctr", "cpc", "cpm", "costPerConversion", "actions", "actionValues", "purchaseValue", "roas", "costPerAction", "videoPlayActions", "video30SecWatchedActions", "videoThruplayWatchedActions", "videoP25WatchedActions", "videoP50WatchedActions", "videoP75WatchedActions", "videoP95WatchedActions", "videoP100WatchedActions", "videoAvgTimeWatchedSeconds", "videoAvgTimeWatchedActions", "costPerThruplay", "funnel", "engagementBreakdown" ]
spendnumberrequiredTotal spend over the requested date range, in the ad account currency (see currency). Never normalised to USD.
impressionsnumberrequiredclicksnumberrequiredengagementnumberrequiredconversionsnumberrequiredConversion events over the range. FRACTIONAL: attribution splits one conversion across touchpoints, so values like 0.347 are normal.
ctrnumberrequiredClick-through rate (%). 0 when impressions is 0.
cpcnumberrequiredCost per click. 0 when clicks is 0.
cpmnumberrequiredCost per 1000 impressions. 0 when impressions is 0.
costPerConversionnumberrequiredDerived spend / conversions. 0 when conversions is 0.
actionsobjectrequired
Per-action-type counts summed over the range, keyed by the platform own action-type names. Keys differ by platform, so branch on the ad platform.
Additional propertynumberactionValuesobjectrequired
Monetary mirror of actions, in the ad account currency. Meta only; other platforms report an empty object.
Additional propertynumberpurchaseValuenumberrequiredPurchase revenue selected from the first reported purchase action family.
roasnumberrequiredpurchaseValue / spend; 0 when spend is 0.
costPerActionobjectrequired
Additional propertynumbervideoPlayActionsnumberrequiredMeta video ads only; 0 elsewhere.
video30SecWatchedActionsnumberrequiredViews lasting at least 30 seconds.
videoThruplayWatchedActionsnumberrequiredThruPlays. Meta video ads only; 0 elsewhere.
videoP25WatchedActionsnumberrequiredvideoP50WatchedActionsnumberrequiredvideoP75WatchedActionsnumberrequiredvideoP95WatchedActionsnumberrequiredvideoP100WatchedActionsnumberrequiredvideoAvgTimeWatchedSecondsnumberrequiredAverage seconds watched per play, aggregated as a PLAY-WEIGHTED mean (total watch time / total plays), never a mean of daily means.
videoAvgTimeWatchedActionsnumberrequiredCanonical Zernio alias for average seconds watched per play.
costPerThruplaynumberrequiredspend / ThruPlays; 0 when no ThruPlays were reported.
funnelobjectrequired
- required
[ "landingPageViews", "contentViews", "searches", "wishlistAdds", "cartAdds", "checkoutsInitiated", "paymentInfoAdds", "purchases", "leads", "registrationsCompleted", "appInstalls", "messagingConversationsStarted", "messagingFirstReplies" ]
landingPageViewsnumberrequiredcontentViewsnumberrequiredsearchesnumberrequiredwishlistAddsnumberrequiredcartAddsnumberrequiredcheckoutsInitiatednumberrequiredpaymentInfoAddsnumberrequiredpurchasesnumberrequiredleadsnumberrequiredregistrationsCompletednumberrequiredappInstallsnumberrequiredmessagingConversationsStartednumberrequiredmessagingFirstRepliesnumberrequiredengagementBreakdownobjectrequired
- required
[ "postEngagement", "pageEngagement", "reactions", "comments", "shares", "saves", "pageLikes", "videoViews", "linkClicks" ]
postEngagementnumberrequiredpageEngagementnumberrequiredreactionsnumberrequiredcommentsnumberrequiredsharesnumberrequiredsavesnumberrequiredpageLikesnumberrequiredvideoViewsnumberrequiredlinkClicksnumberrequireddailyarrayrequired
One entry per day that has data, oldest first. Days with no delivery are OMITTED rather than zero-filled: a stored zero and an unsynced day are different facts, and coverage is what distinguishes them.
Array itemobject
- required
[ "date", "metrics" ]
datestringrequiredCalendar day (YYYY-MM-DD) these metrics apply to.
metricsobjectrequired
- required
[ "spend", "impressions", "clicks", "engagement", "conversions", "ctr", "cpc", "cpm", "costPerConversion", "actions", "actionValues", "purchaseValue", "roas", "costPerAction", "videoPlayActions", "video30SecWatchedActions", "videoThruplayWatchedActions", "videoP25WatchedActions", "videoP50WatchedActions", "videoP75WatchedActions", "videoP95WatchedActions", "videoP100WatchedActions", "videoAvgTimeWatchedSeconds", "videoAvgTimeWatchedActions", "costPerThruplay", "funnel", "engagementBreakdown" ]
spendnumberrequiredTotal spend over the requested date range, in the ad account currency (see currency). Never normalised to USD.
impressionsnumberrequiredclicksnumberrequiredengagementnumberrequiredconversionsnumberrequiredConversion events over the range. FRACTIONAL: attribution splits one conversion across touchpoints, so values like 0.347 are normal.
ctrnumberrequiredClick-through rate (%). 0 when impressions is 0.
cpcnumberrequiredCost per click. 0 when clicks is 0.
cpmnumberrequiredCost per 1000 impressions. 0 when impressions is 0.
costPerConversionnumberrequiredDerived spend / conversions. 0 when conversions is 0.
actionsobjectrequired
Per-action-type counts summed over the range, keyed by the platform own action-type names. Keys differ by platform, so branch on the ad platform.
Additional propertynumberactionValuesobjectrequired
Monetary mirror of actions, in the ad account currency. Meta only; other platforms report an empty object.
Additional propertynumberpurchaseValuenumberrequiredPurchase revenue selected from the first reported purchase action family.
roasnumberrequiredpurchaseValue / spend; 0 when spend is 0.
costPerActionobjectrequired
Additional propertynumbervideoPlayActionsnumberrequiredMeta video ads only; 0 elsewhere.
video30SecWatchedActionsnumberrequiredViews lasting at least 30 seconds.
videoThruplayWatchedActionsnumberrequiredThruPlays. Meta video ads only; 0 elsewhere.
videoP25WatchedActionsnumberrequiredvideoP50WatchedActionsnumberrequiredvideoP75WatchedActionsnumberrequiredvideoP95WatchedActionsnumberrequiredvideoP100WatchedActionsnumberrequiredvideoAvgTimeWatchedSecondsnumberrequiredAverage seconds watched per play, aggregated as a PLAY-WEIGHTED mean (total watch time / total plays), never a mean of daily means.
videoAvgTimeWatchedActionsnumberrequiredCanonical Zernio alias for average seconds watched per play.
costPerThruplaynumberrequiredspend / ThruPlays; 0 when no ThruPlays were reported.
funnelobjectrequired
- required
[ "landingPageViews", "contentViews", "searches", "wishlistAdds", "cartAdds", "checkoutsInitiated", "paymentInfoAdds", "purchases", "leads", "registrationsCompleted", "appInstalls", "messagingConversationsStarted", "messagingFirstReplies" ]
landingPageViewsnumberrequiredcontentViewsnumberrequiredsearchesnumberrequiredwishlistAddsnumberrequiredcartAddsnumberrequiredcheckoutsInitiatednumberrequiredpaymentInfoAddsnumberrequiredpurchasesnumberrequiredleadsnumberrequiredregistrationsCompletednumberrequiredappInstallsnumberrequiredmessagingConversationsStartednumberrequiredmessagingFirstRepliesnumberrequiredengagementBreakdownobjectrequired
- required
[ "postEngagement", "pageEngagement", "reactions", "comments", "shares", "saves", "pageLikes", "videoViews", "linkClicks" ]
postEngagementnumberrequiredpageEngagementnumberrequiredreactionsnumberrequiredcommentsnumberrequiredsharesnumberrequiredsavesnumberrequiredpageLikesnumberrequiredvideoViewsnumberrequiredlinkClicksnumberrequiredcoverageobjectrequired
- required
[ "requestedFrom", "requestedTo", "syncedFrom", "syncedTo", "complete" ]
requestedFromstringrequiredFirst day of the requested metrics range.
requestedTostringrequiredLast day of the requested metrics range.
syncedFromstringrequiredFirst day actually backed by synced data, or null when no sync has run for the selected ad accounts.
- nullable
true
syncedTostringrequiredLast day actually backed by synced data, or null when no sync has run.
- nullable
true
completebooleanrequiredTrue only when the synced window covers the whole requested range. When false the totals above are PARTIAL.
Original schema
{
"$ref": "#/components/schemas/AdAnalyticsResponseDto"
}400Response schema
Response 400object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}401Response schema
Response 401object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}403Response schema
Response 403object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}404Response schema
Response 404object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}409Conflict
Conflict
Response 409object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}429Rate limit exceeded
Rate limit exceeded
Response 429object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}Response headers
X-RateLimit-Limit
Request ceiling that applied to this request. Authenticated requests use the team tier ceiling; unauthenticated identity endpoints use a per-IP ceiling. Usage is measured continuously against a trailing period rather than tallied and cleared at a boundary, so the full ceiling never becomes available again in one step.
X-RateLimit-Limitinteger- minimum
1
Original schema
{
"type": "integer",
"minimum": 1
}X-RateLimit-Remaining
Requests still allowed against that ceiling; never negative. On a 429 produced by the request throttler this is 0. Such a refused request is not counted, so retrying too early costs you no capacity and does not push your recovery further away.
X-RateLimit-Remaininginteger- minimum
0
Original schema
{
"type": "integer",
"minimum": 0
}X-RateLimit-Reset
Absolute Unix epoch time, in SECONDS, at which the current counting period turns over. This is NOT the number of seconds left: subtract the current time to obtain that. It is also NOT the moment your capacity returns: earlier usage keeps weighing on the ceiling across the turnover, so after a 429 wait for Retry-After instead, which is usually later than this value.
X-RateLimit-Resetinteger- format
int64- minimum
0
Original schema
{
"type": "integer",
"format": "int64",
"minimum": 0
}Retry-After
Seconds to wait before retrying. Always a positive integer delta (never an HTTP-date), at least 1. On a 429 from the request throttler it is the wait until your usage actually drops back under the ceiling; prefer it over any delay you compute from X-RateLimit-Reset.
Retry-Afterinteger- minimum
1- maximum
86400
Original schema
{
"type": "integer",
"minimum": 1,
"maximum": 86400
}500Server error
Server error
Response 500object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}502Platform error
Platform error
Response 502object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}503Service unavailable
Service unavailable
Response 503object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}Referenced schemas
Original local definitions used by this operation. Recursive and deeply nested references can be inspected here without expanding them repeatedly.
AdAnalyticsResponseDto
#/components/schemas/AdAnalyticsResponseDto
{
"type": "object",
"properties": {
"ad": {
"$ref": "#/components/schemas/AdAnalyticsSummaryDto"
},
"metrics": {
"description": "Totals over the whole range.",
"allOf": [
{
"$ref": "#/components/schemas/AdMetricsDto"
}
]
},
"daily": {
"description": "One entry per day that has data, oldest first. Days with no delivery are OMITTED rather than zero-filled: a stored zero and an unsynced day are different facts, and `coverage` is what distinguishes them.",
"type": "array",
"items": {
"$ref": "#/components/schemas/AdDailyMetricsPointDto"
}
},
"coverage": {
"$ref": "#/components/schemas/AdCoverageDto"
}
},
"required": [
"ad",
"metrics",
"daily",
"coverage"
]
}AdAnalyticsSummaryDto
#/components/schemas/AdAnalyticsSummaryDto
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The platform's own ad id."
},
"name": {
"type": "string",
"nullable": true
},
"platform": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"pending_review",
"rejected",
"completed",
"cancelled",
"error"
]
},
"campaignId": {
"type": "string",
"nullable": true,
"description": "Parent campaign id, so a caller can walk up the hierarchy."
},
"adSetId": {
"type": "string",
"nullable": true,
"description": "Parent ad set id."
},
"currency": {
"type": "string",
"nullable": true,
"description": "ISO 4217 code for every money field in `metrics`."
},
"platformAdAccountId": {
"type": "string",
"nullable": true
}
},
"required": [
"id",
"name",
"platform",
"status",
"campaignId",
"adSetId",
"currency",
"platformAdAccountId"
]
}AdMetricsDto
#/components/schemas/AdMetricsDto
{
"type": "object",
"properties": {
"spend": {
"type": "number",
"description": "Total spend over the requested date range, in the ad account currency (see `currency`). Never normalised to USD."
},
"impressions": {
"type": "number"
},
"clicks": {
"type": "number"
},
"engagement": {
"type": "number"
},
"conversions": {
"type": "number",
"description": "Conversion events over the range. FRACTIONAL: attribution splits one conversion across touchpoints, so values like 0.347 are normal."
},
"ctr": {
"type": "number",
"description": "Click-through rate (%). 0 when impressions is 0."
},
"cpc": {
"type": "number",
"description": "Cost per click. 0 when clicks is 0."
},
"cpm": {
"type": "number",
"description": "Cost per 1000 impressions. 0 when impressions is 0."
},
"costPerConversion": {
"type": "number",
"description": "Derived spend / conversions. 0 when conversions is 0."
},
"actions": {
"type": "object",
"additionalProperties": {
"type": "number"
},
"description": "Per-action-type counts summed over the range, keyed by the platform own action-type names. Keys differ by platform, so branch on the ad platform."
},
"actionValues": {
"type": "object",
"additionalProperties": {
"type": "number"
},
"description": "Monetary mirror of actions, in the ad account currency. Meta only; other platforms report an empty object."
},
"purchaseValue": {
"type": "number",
"description": "Purchase revenue selected from the first reported purchase action family."
},
"roas": {
"type": "number",
"description": "purchaseValue / spend; 0 when spend is 0."
},
"costPerAction": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"videoPlayActions": {
"type": "number",
"description": "Meta video ads only; 0 elsewhere."
},
"video30SecWatchedActions": {
"type": "number",
"description": "Views lasting at least 30 seconds."
},
"videoThruplayWatchedActions": {
"type": "number",
"description": "ThruPlays. Meta video ads only; 0 elsewhere."
},
"videoP25WatchedActions": {
"type": "number"
},
"videoP50WatchedActions": {
"type": "number"
},
"videoP75WatchedActions": {
"type": "number"
},
"videoP95WatchedActions": {
"type": "number"
},
"videoP100WatchedActions": {
"type": "number"
},
"videoAvgTimeWatchedSeconds": {
"type": "number",
"description": "Average seconds watched per play, aggregated as a PLAY-WEIGHTED mean (total watch time / total plays), never a mean of daily means."
},
"videoAvgTimeWatchedActions": {
"type": "number",
"description": "Canonical Zernio alias for average seconds watched per play."
},
"costPerThruplay": {
"type": "number",
"description": "spend / ThruPlays; 0 when no ThruPlays were reported."
},
"funnel": {
"$ref": "#/components/schemas/AdFunnelCountsDto"
},
"engagementBreakdown": {
"$ref": "#/components/schemas/AdEngagementCountsDto"
}
},
"required": [
"spend",
"impressions",
"clicks",
"engagement",
"conversions",
"ctr",
"cpc",
"cpm",
"costPerConversion",
"actions",
"actionValues",
"purchaseValue",
"roas",
"costPerAction",
"videoPlayActions",
"video30SecWatchedActions",
"videoThruplayWatchedActions",
"videoP25WatchedActions",
"videoP50WatchedActions",
"videoP75WatchedActions",
"videoP95WatchedActions",
"videoP100WatchedActions",
"videoAvgTimeWatchedSeconds",
"videoAvgTimeWatchedActions",
"costPerThruplay",
"funnel",
"engagementBreakdown"
]
}AdFunnelCountsDto
#/components/schemas/AdFunnelCountsDto
{
"type": "object",
"properties": {
"landingPageViews": {
"type": "number"
},
"contentViews": {
"type": "number"
},
"searches": {
"type": "number"
},
"wishlistAdds": {
"type": "number"
},
"cartAdds": {
"type": "number"
},
"checkoutsInitiated": {
"type": "number"
},
"paymentInfoAdds": {
"type": "number"
},
"purchases": {
"type": "number"
},
"leads": {
"type": "number"
},
"registrationsCompleted": {
"type": "number"
},
"appInstalls": {
"type": "number"
},
"messagingConversationsStarted": {
"type": "number"
},
"messagingFirstReplies": {
"type": "number"
}
},
"required": [
"landingPageViews",
"contentViews",
"searches",
"wishlistAdds",
"cartAdds",
"checkoutsInitiated",
"paymentInfoAdds",
"purchases",
"leads",
"registrationsCompleted",
"appInstalls",
"messagingConversationsStarted",
"messagingFirstReplies"
]
}AdDailyMetricsPointDto
#/components/schemas/AdDailyMetricsPointDto
{
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Calendar day (YYYY-MM-DD) these metrics apply to."
},
"metrics": {
"$ref": "#/components/schemas/AdMetricsDto"
}
},
"required": [
"date",
"metrics"
]
}AdCoverageDto
#/components/schemas/AdCoverageDto
{
"type": "object",
"properties": {
"requestedFrom": {
"type": "string",
"description": "First day of the requested metrics range."
},
"requestedTo": {
"type": "string",
"description": "Last day of the requested metrics range."
},
"syncedFrom": {
"type": "string",
"nullable": true,
"description": "First day actually backed by synced data, or null when no sync has run for the selected ad accounts."
},
"syncedTo": {
"type": "string",
"nullable": true,
"description": "Last day actually backed by synced data, or null when no sync has run."
},
"complete": {
"type": "boolean",
"description": "True only when the synced window covers the whole requested range. When false the totals above are PARTIAL."
}
},
"required": [
"requestedFrom",
"requestedTo",
"syncedFrom",
"syncedTo",
"complete"
]
}ZumpoErrorDto
#/components/schemas/ZumpoErrorDto
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Human-readable message. UNSTABLE — do not branch on it.",
"example": "WhatsApp session window expired; use a template message."
},
"type": {
"type": "string",
"description": "Stable error category (does not change across versions).",
"enum": [
"invalid_request_error",
"authentication_error",
"permission_error",
"not_found",
"conflict",
"rate_limit_error",
"platform_error",
"platform_rejected",
"account_disconnected",
"media_error",
"api_error"
],
"example": "invalid_request_error"
},
"code": {
"type": "string",
"description": "Stable machine-readable code.",
"example": "whatsapp_window_expired"
},
"param": {
"type": "string",
"description": "Offending parameter, present only when relevant.",
"example": "body"
},
"docUrl": {
"type": "string",
"description": "https://docs.zumpo.io/errors/{code}",
"example": "https://docs.zumpo.io/errors/whatsapp_window_expired"
},
"requestId": {
"type": "string",
"description": "Support correlation id: req_ + 16 hex.",
"example": "req_7f3a9c2e1b8d4056"
},
"details": {
"type": "object",
"additionalProperties": true,
"description": "Additional structured context, present only when an error has more to say than a single `param` can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.",
"example": {
"created": [
{
"kind": "campaign",
"platformId": "120210000000000001"
},
{
"kind": "adSet",
"platformId": "120210000000000002"
}
]
}
}
},
"required": [
"error",
"type",
"code",
"docUrl",
"requestId"
]
}