List ad campaigns as aggregations over ad documents
Campaigns are not stored: they are virtual aggregations over ad documents grouped by platform campaign id, with metrics summed over the requested date range and status derived from child ad statuses. The coverage block reports how much of the requested range is actually backed by synced data, so partial totals cannot be mistaken for complete ones.
Authentication
The following security requirement applies to this operation.
Read the authentication guideParameters
limitqueryoptionallimitinteger- minimum
1- maximum
100- default
20
Original schema
{
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20
}pagequeryoptionalpageinteger- minimum
1- maximum
10000- default
1
Original schema
{
"type": "integer",
"minimum": 1,
"maximum": 10000,
"default": 1
}toDatequeryoptionalEnd of the metrics range (inclusive). Defaults to today (UTC).
toDatestring- pattern
^\d{4}-\d{2}-\d{2}$
Original schema
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}fromDatequeryoptionalStart of the metrics range (inclusive). Defaults to 90 days before toDate.
fromDatestring- pattern
^\d{4}-\d{2}-\d{2}$
Original schema
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}sourcequeryoptionalall returns both locally created ads and those discovered from the platform's ad manager; zernio returns only locally created ones.
sourcestring- enum
[ "zernio", "all" ]- default
all
Original schema
{
"type": "string",
"enum": [
"zernio",
"all"
],
"default": "all"
}statusqueryoptionalFilter by derived campaign status (applied AFTER aggregation).
statusstring- enum
[ "active", "pending_review", "paused", "error", "completed", "cancelled", "rejected" ]
Original schema
{
"type": "string",
"enum": [
"active",
"pending_review",
"paused",
"error",
"completed",
"cancelled",
"rejected"
]
}adAccountIdqueryoptionalPlatform ad account id, e.g. act_123 for Meta.
adAccountIdstring- pattern
^act_[1-9]\d{0,19}$
Original schema
{
"type": "string",
"pattern": "^act_[1-9]\\d{0,19}$"
}profileIdqueryoptionalprofileIdstring- pattern
^[0-9a-f]{24}$
Original schema
{
"type": "string",
"pattern": "^[0-9a-f]{24}$"
}accountIdqueryoptionalRestrict to campaigns whose ads resolve through this social account.
accountIdstring- pattern
^[0-9a-f]{24}$
Original schema
{
"type": "string",
"pattern": "^[0-9a-f]{24}$"
}Responses
Status codes and shapes declared for this operation. Read each description for the meaning of that response.
200Response schema
Response 200object
- required
[ "campaigns", "pagination", "coverage" ]
campaignsarrayrequired
Array itemobject
- required
[ "platformCampaignId", "platform", "campaignName", "status", "adCount", "platformAdAccountId", "accountId", "currency", "platformObjective", "metrics", "earliestAd", "latestAd" ]
platformCampaignIdstringrequiredThe platform's own campaign id.
platformstringrequiredcampaignNamestringrequired- nullable
true
statusstringrequiredDerived from child ad statuses by the precedence active > pending_review > paused > error > completed > cancelled > rejected.
- enum
[ "active", "pending_review", "paused", "error", "completed", "cancelled", "rejected" ]
adCountnumberrequiredNumber of ad documents aggregated into this campaign.
platformAdAccountIdstringrequiredaccountIdstringrequiredcurrencystringrequiredISO 4217 code for every money field on this campaign. Budgets and spend are NOT normalised to USD.
- nullable
true
platformObjectivestringrequired- nullable
true
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" ]
postEngagementnumberrequiredpageEngagementnumberrequiredreactionsnumberrequiredcommentsnumberrequiredsharesnumberrequiredsavesnumberrequiredpageLikesnumberrequiredvideoViewsnumberrequiredlinkClicksnumberrequiredearliestAdstringrequiredCreation time of the earliest ad in this campaign (ISO 8601).
latestAdstringrequiredCreation time of the latest ad in this campaign (ISO 8601).
paginationobjectrequired
- required
[ "page", "limit", "total", "pages" ]
pagenumberrequiredlimitnumberrequiredtotalnumberrequiredpagesnumberrequiredcoverageallOfrequired
How much of the requested range is actually backed by synced data, so partial totals are never mistaken for complete ones.
allOf / 1object
- 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/AdCampaignsResponseDto"
}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"
}404Resource not found
Resource not found
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.
AdCampaignsResponseDto
#/components/schemas/AdCampaignsResponseDto
{
"type": "object",
"properties": {
"campaigns": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AdCampaignDto"
}
},
"pagination": {
"$ref": "#/components/schemas/PaginationDto"
},
"coverage": {
"description": "How much of the requested range is actually backed by synced data, so partial totals are never mistaken for complete ones.",
"allOf": [
{
"$ref": "#/components/schemas/AdCoverageDto"
}
]
}
},
"required": [
"campaigns",
"pagination",
"coverage"
]
}AdCampaignDto
#/components/schemas/AdCampaignDto
{
"type": "object",
"properties": {
"platformCampaignId": {
"type": "string",
"description": "The platform's own campaign id."
},
"platform": {
"type": "string"
},
"campaignName": {
"type": "string",
"nullable": true
},
"status": {
"type": "string",
"enum": [
"active",
"pending_review",
"paused",
"error",
"completed",
"cancelled",
"rejected"
],
"description": "Derived from child ad statuses by the precedence active > pending_review > paused > error > completed > cancelled > rejected."
},
"adCount": {
"type": "number",
"description": "Number of ad documents aggregated into this campaign."
},
"platformAdAccountId": {
"type": "string"
},
"accountId": {
"type": "string"
},
"currency": {
"type": "string",
"nullable": true,
"description": "ISO 4217 code for every money field on this campaign. Budgets and spend are NOT normalised to USD."
},
"platformObjective": {
"type": "string",
"nullable": true
},
"metrics": {
"$ref": "#/components/schemas/AdMetricsDto"
},
"earliestAd": {
"type": "string",
"description": "Creation time of the earliest ad in this campaign (ISO 8601)."
},
"latestAd": {
"type": "string",
"description": "Creation time of the latest ad in this campaign (ISO 8601)."
}
},
"required": [
"platformCampaignId",
"platform",
"campaignName",
"status",
"adCount",
"platformAdAccountId",
"accountId",
"currency",
"platformObjective",
"metrics",
"earliestAd",
"latestAd"
]
}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"
]
}PaginationDto
#/components/schemas/PaginationDto
{
"type": "object",
"properties": {
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"pages": {
"type": "number"
}
},
"required": [
"page",
"limit",
"total",
"pages"
]
}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"
]
}