ads

POST /v1/ads/connections/{connection_id}/outcomes/retractions

Withdraw outcomes you sent, by your own id (a full refund).

All ads endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the ads.manage permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/ads/connections/{connection_id}/outcomes/retractions \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "retractions": <object[]> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Gated on ads.manage or ads.outcomes.write (KEYSCOPE — exact-org, see sendAdsOutcomes); audit action ads.outcomes_retracted. Up to 500 per request. Each (kind, external_ref) is treated exactly like a sale refunded in full (za-122): one not uploaded yet is never uploaded (withheld); one already uploaded gets ONE retraction, which the next upload run sends to the network as a conversion adjustment (retracted; the run is started now when any was). Idempotent: an outcome withdrawn before, or refunded by its checkout provider, is already; an id this connection never received is not_found. The adjustment's progress shows on listAdsTrackingEvents. Nothing is charged. Open to a ChatGPT Ads account too (za-320, the outcomes its truth check compares): it takes no upload from us, so they are withheld and nothing is sent.

Parameters

NameTypeRequiredWhat it is
connection_id (path)stringYes—

Request body

NameTypeRequiredWhat it is
retractionsobject[]Yes—

Response

NameTypeRequiredWhat it is
retractedintegerYesAlready uploaded; a retraction is queued for the network.
withheldintegerYesNot uploaded yet; it never will be.
alreadyintegerYesWithdrawn or refunded before; nothing new.
not_foundintegerYesNo outcome with that kind and id on this connection.
push_startedbooleanYesWhether an upload run was started to send the retractions now.

Errors this endpoint can return

401 · 403 · 404 · 422 · 429