Record a conversion
Credit a sale to the video that caused it. Send session_code from the player so the conversion joins the play that produced it. Without it, the sale is recorded but cannot be attributed to a viewer.
Requires a token with the conversions:write scope.
Server: https://app.trackplay.io/api/v1
Authorizations
A scoped token minted in Settings → API tokens. Send it as Authorization: Bearer tplt_… or X-API-Key: tplt_….
Headers
Retry-safe key. The first response for a given key is cached for 24 hours and replayed on a repeat, with Idempotency-Replayed: true set. Send one on every call. A retried payment webhook without it will double count the sale.
Body
The video the sale is credited to. Required. A conversion with no video cannot be attributed to anything.
64The viewer's session. Optional, but without it the sale cannot be joined to the play that caused it, and your play-to-sale rate stays blind to it.
128What happened. Defaults to conversion.
64Your order ID. Defaults to a generated UUID if omitted.
128Sale amount.
x >= 0Three-letter currency code, e.g. USD.
312825525525564Any extra fields you want to keep with the sale.
Marks the row as a test so it can be excluded from reporting.
Send with split_test_variation_id or not at all. One without the other cannot identify an arm, and a half-attributed row looks valid while being wrong.
64Send with split_test_id or not at all.
64When the sale happened. Defaults to now.
