zumpo/docs
Dashboard
Skip to content
ads / API reference
GETgetAdAnalytics

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.

  1. bearerhttp

    scheme
    bearer
    bearerFormat
    zumpo-api-key
Read the authentication guide

Parameters

adIdpathrequired

The platform's own ad id.

adIdstringrequired
Original schema
{
  "type": "string"
}
toDatequeryoptional
toDatestring
pattern
^\d{4}-\d{2}-\d{2}$
Original schema
{
  "type": "string",
  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
fromDatequeryoptional
fromDatestring
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
application/json
Response 200object
#/components/schemas/AdAnalyticsResponseDto
required
[ "ad", "metrics", "daily", "coverage" ]
adobjectrequired
#/components/schemas/AdAnalyticsSummaryDto
required
[ "id", "name", "platform", "status", "campaignId", "adSetId", "currency", "platformAdAccountId" ]
idstringrequired

The platform's own ad id.

namestringrequired
nullable
true
platformstringrequired
statusstringrequired
enum
[ "active", "paused", "pending_review", "rejected", "completed", "cancelled", "error" ]
campaignIdstringrequired

Parent campaign id, so a caller can walk up the hierarchy.

nullable
true
adSetIdstringrequired

Parent ad set id.

nullable
true
currencystringrequired

ISO 4217 code for every money field in metrics.

nullable
true
platformAdAccountIdstringrequired
nullable
true
metricsallOfrequired

Totals over the whole range.

allOf / 1object
#/components/schemas/AdMetricsDto
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" ]
spendnumberrequired

Total spend over the requested date range, in the ad account currency (see currency). Never normalised to USD.

impressionsnumberrequired
clicksnumberrequired
engagementnumberrequired
conversionsnumberrequired

Conversion events over the range. FRACTIONAL: attribution splits one conversion across touchpoints, so values like 0.347 are normal.

ctrnumberrequired

Click-through rate (%). 0 when impressions is 0.

cpcnumberrequired

Cost per click. 0 when clicks is 0.

cpmnumberrequired

Cost per 1000 impressions. 0 when impressions is 0.

costPerConversionnumberrequired

Derived 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 propertynumber
actionValuesobjectrequired

Monetary mirror of actions, in the ad account currency. Meta only; other platforms report an empty object.

Additional propertynumber
purchaseValuenumberrequired

Purchase revenue selected from the first reported purchase action family.

roasnumberrequired

purchaseValue / spend; 0 when spend is 0.

costPerActionobjectrequired
Additional propertynumber
videoPlayActionsnumberrequired

Meta video ads only; 0 elsewhere.

video30SecWatchedActionsnumberrequired

Views lasting at least 30 seconds.

videoThruplayWatchedActionsnumberrequired

ThruPlays. Meta video ads only; 0 elsewhere.

videoP25WatchedActionsnumberrequired
videoP50WatchedActionsnumberrequired
videoP75WatchedActionsnumberrequired
videoP95WatchedActionsnumberrequired
videoP100WatchedActionsnumberrequired
videoAvgTimeWatchedSecondsnumberrequired

Average seconds watched per play, aggregated as a PLAY-WEIGHTED mean (total watch time / total plays), never a mean of daily means.

videoAvgTimeWatchedActionsnumberrequired

Canonical Zernio alias for average seconds watched per play.

costPerThruplaynumberrequired

spend / ThruPlays; 0 when no ThruPlays were reported.

funnelobjectrequired
#/components/schemas/AdFunnelCountsDto
required
[ "landingPageViews", "contentViews", "searches", "wishlistAdds", "cartAdds", "checkoutsInitiated", "paymentInfoAdds", "purchases", "leads", "registrationsCompleted", "appInstalls", "messagingConversationsStarted", "messagingFirstReplies" ]
landingPageViewsnumberrequired
contentViewsnumberrequired
searchesnumberrequired
wishlistAddsnumberrequired
cartAddsnumberrequired
checkoutsInitiatednumberrequired
paymentInfoAddsnumberrequired
purchasesnumberrequired
leadsnumberrequired
registrationsCompletednumberrequired
appInstallsnumberrequired
messagingConversationsStartednumberrequired
messagingFirstRepliesnumberrequired
engagementBreakdownobjectrequired
#/components/schemas/AdEngagementCountsDto
required
[ "postEngagement", "pageEngagement", "reactions", "comments", "shares", "saves", "pageLikes", "videoViews", "linkClicks" ]
postEngagementnumberrequired
pageEngagementnumberrequired
reactionsnumberrequired
commentsnumberrequired
sharesnumberrequired
savesnumberrequired
pageLikesnumberrequired
videoViewsnumberrequired
linkClicksnumberrequired
dailyarrayrequired

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
#/components/schemas/AdDailyMetricsPointDto
required
[ "date", "metrics" ]
datestringrequired

Calendar day (YYYY-MM-DD) these metrics apply to.

metricsobjectrequired
#/components/schemas/AdMetricsDto
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" ]
spendnumberrequired

Total spend over the requested date range, in the ad account currency (see currency). Never normalised to USD.

impressionsnumberrequired
clicksnumberrequired
engagementnumberrequired
conversionsnumberrequired

Conversion events over the range. FRACTIONAL: attribution splits one conversion across touchpoints, so values like 0.347 are normal.

ctrnumberrequired

Click-through rate (%). 0 when impressions is 0.

cpcnumberrequired

Cost per click. 0 when clicks is 0.

cpmnumberrequired

Cost per 1000 impressions. 0 when impressions is 0.

costPerConversionnumberrequired

Derived 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 propertynumber
actionValuesobjectrequired

Monetary mirror of actions, in the ad account currency. Meta only; other platforms report an empty object.

Additional propertynumber
purchaseValuenumberrequired

Purchase revenue selected from the first reported purchase action family.

roasnumberrequired

purchaseValue / spend; 0 when spend is 0.

costPerActionobjectrequired
Additional propertynumber
videoPlayActionsnumberrequired

Meta video ads only; 0 elsewhere.

video30SecWatchedActionsnumberrequired

Views lasting at least 30 seconds.

videoThruplayWatchedActionsnumberrequired

ThruPlays. Meta video ads only; 0 elsewhere.

videoP25WatchedActionsnumberrequired
videoP50WatchedActionsnumberrequired
videoP75WatchedActionsnumberrequired
videoP95WatchedActionsnumberrequired
videoP100WatchedActionsnumberrequired
videoAvgTimeWatchedSecondsnumberrequired

Average seconds watched per play, aggregated as a PLAY-WEIGHTED mean (total watch time / total plays), never a mean of daily means.

videoAvgTimeWatchedActionsnumberrequired

Canonical Zernio alias for average seconds watched per play.

costPerThruplaynumberrequired

spend / ThruPlays; 0 when no ThruPlays were reported.

funnelobjectrequired
#/components/schemas/AdFunnelCountsDto
required
[ "landingPageViews", "contentViews", "searches", "wishlistAdds", "cartAdds", "checkoutsInitiated", "paymentInfoAdds", "purchases", "leads", "registrationsCompleted", "appInstalls", "messagingConversationsStarted", "messagingFirstReplies" ]
landingPageViewsnumberrequired
contentViewsnumberrequired
searchesnumberrequired
wishlistAddsnumberrequired
cartAddsnumberrequired
checkoutsInitiatednumberrequired
paymentInfoAddsnumberrequired
purchasesnumberrequired
leadsnumberrequired
registrationsCompletednumberrequired
appInstallsnumberrequired
messagingConversationsStartednumberrequired
messagingFirstRepliesnumberrequired
engagementBreakdownobjectrequired
#/components/schemas/AdEngagementCountsDto
required
[ "postEngagement", "pageEngagement", "reactions", "comments", "shares", "saves", "pageLikes", "videoViews", "linkClicks" ]
postEngagementnumberrequired
pageEngagementnumberrequired
reactionsnumberrequired
commentsnumberrequired
sharesnumberrequired
savesnumberrequired
pageLikesnumberrequired
videoViewsnumberrequired
linkClicksnumberrequired
coverageobjectrequired
#/components/schemas/AdCoverageDto
required
[ "requestedFrom", "requestedTo", "syncedFrom", "syncedTo", "complete" ]
requestedFromstringrequired

First day of the requested metrics range.

requestedTostringrequired

Last day of the requested metrics range.

syncedFromstringrequired

First day actually backed by synced data, or null when no sync has run for the selected ad accounts.

nullable
true
syncedTostringrequired

Last day actually backed by synced data, or null when no sync has run.

nullable
true
completebooleanrequired

True 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
application/json
Response 400object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
401Response schema
application/json
Response 401object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
403Response schema
application/json
Response 403object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
404Response schema
application/json
Response 404object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
409Conflict

Conflict

application/json
Response 409object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
429Rate limit exceeded

Rate limit exceeded

application/json
Response 429object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

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

application/json
Response 500object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
502Platform error

Platform error

application/json
Response 502object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
503Service unavailable

Service unavailable

application/json
Response 503object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

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
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

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.

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"
  ]
}
AdEngagementCountsDto

#/components/schemas/AdEngagementCountsDto

{
  "type": "object",
  "properties": {
    "postEngagement": {
      "type": "number"
    },
    "pageEngagement": {
      "type": "number"
    },
    "reactions": {
      "type": "number"
    },
    "comments": {
      "type": "number"
    },
    "shares": {
      "type": "number"
    },
    "saves": {
      "type": "number"
    },
    "pageLikes": {
      "type": "number"
    },
    "videoViews": {
      "type": "number"
    },
    "linkClicks": {
      "type": "number"
    }
  },
  "required": [
    "postEngagement",
    "pageEngagement",
    "reactions",
    "comments",
    "shares",
    "saves",
    "pageLikes",
    "videoViews",
    "linkClicks"
  ]
}
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"
  ]
}