Name a result metric or define a formula
Sets a metric key's label and kind: count for things you count (leads, sales), money with its currency (revenue), percent or ratio.
Send formula to make it a computed metric: + - * / and parentheses over spend, impressions, clicks, conversions, purchase_value and the metrics you send, at most 200 characters. A formula cannot read another formula.
It is computed per campaign over the summed values of the range, and has no value when an input is missing or a division is by zero.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Path parameters
Body
application/jsonWhat every request needs
count | money | percent | ratioOptional parameters2 fields
ISO 4217, money metrics only.
Makes it a computed metric. Null or absent for a number you send.
Responses
Success· the request worked
Errors· the request failed
Check a results upload
How an upload was matched: rows matched and unmatched, and up to 100 unmatched rows with why (`no_campaign` or `ambiguous`). `status` turns `done` once every row is processed, usually within seconds. Uploads are kept for 30 days. A `failed` upload says why in `failureReason`. Send it again: re-sending a day replaces it, so nothing is counted twice.
Upload your results per campaign
Sends your own daily numbers per campaign (qualified leads, sales, revenue...) so rules and reports can use them next to spend. Name each row's campaign by `campaignId`, `utmCampaign` or `campaignName`. Rows are matched in the background: the `202` returns an `uploadId`, and `Location` points to `GET /v1/ads/campaign-results/uploads/{uploadId}`. Re-sending a day replaces it. Send an `Idempotency-Key` to retry safely. Limits per team: 60 requests and 20,000 rows per hour, 512 KB per request.