ads

POST /v1/public/ads-wordpress/outcomes

The plugin sends the site's paid orders, free trials and sent forms to the outcome pipeline.

All ads endpoints

All developer docs →

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

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/outcomes \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "outcomes": <AdsOutcomeIn[]> }'

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. The same outcome shape and store as the events API (POST /v1/ads/connections/{connection_id}/outcomes), for every connection of the site's organisation that is not disconnected, then pushed to the networks within minutes. Only purchase, trial and lead (a 422 otherwise). A lead is a form sent, reported from the form plugin's own server hook with the reference the browser tag sends for it (<ref_prefix>-lead-<form plugin>-<random id>), so the network counts it once; it carries no value, no e-mail, no referrer and no page (dropped whatever the request says: nothing a visitor typed leaves the site), and at most 300 a site per hour are stored (the rest are counted in rate_limited). The reference is forced into the site's own namespace (<ref_prefix>-<order number>, the same transaction id the browser tag sends, so the network counts a sale once), the host is the connected site's whatever outcome_url says, and the source is store. Click ids and the e-mail are stored and forwarded only when an outcome's consent is GRANTED (the order page's own consent); otherwise they are dropped, whatever the request carries. Idempotent per order: a re-sent order stores nothing new. Audit action ads.outcomes_received when something was stored.

Request body

NameTypeRequiredWhat it is
outcomesAdsOutcomeIn[]Yes—

Response

NameTypeRequiredWhat it is
createdintegerYes—
updatedintegerYes—
unchangedintegerYes—
rate_limitedintegerNoWordPress plugin only, present when above 0: leads dropped because the site sent more than 300 in this hour (a spam run against its form). Not retried.

Errors this endpoint can return

401 · 422 · 429