ads
POST /v1/public/ads-wordpress/refunds
The plugin withdraws or restates orders cancelled, failed or refunded after they were reported.
Authentication
This endpoint does not take an API key. It takes its own credential, issued to the plugin or service that calls it, as a bearer token; see the description above.
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/public/ads-wordpress/refunds \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "refunds": <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
Site token only (WPPAID). An order the plugin reported (only once PAID) and that was then cancelled, failed or refunded in full is withdrawn exactly as the events API's retraction does: not uploaded yet, it never goes; uploaded, the network gets ONE retraction. Refunded in part (refunded_minor = refunded so far, with currency), the sale is restated to what was kept. The reference is forced into the site's own namespace, so a site can withdraw only its own orders. not_found counts references the pipeline does not have yet (the plugin tries again later). Idempotent. Audit action ads.outcomes_retracted when something changed.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
refunds | object[] | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
retracted | integer | Yes | — |
restated | integer | Yes | — |
already | integer | Yes | — |
not_found | integer | Yes | — |
Errors this endpoint can return
401 · 422 · 429