Report a conversion
const url = 'https://tracker.adstrike.io/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/conversions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"clientId":"USER_12345","orderId":"ORDER-10042","type":"purchase","value":129.5,"currency":"EUR","occurredAt":"2026-07-22T10:32:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://tracker.adstrike.io/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/conversions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "clientId": "USER_12345", "orderId": "ORDER-10042", "type": "purchase", "value": 129.5, "currency": "EUR", "occurredAt": "2026-07-22T10:32:00Z" }'Reports a conversion from your backend, independently of the pixel (ad blockers, purchases validated outside the browser, delayed payments). The conversion is attached to the visitor’s most recent session within the site’s attribution window, then goes through the same attribution pipeline as pixel events.
202 means “accepted and queued”: processing (attribution,
currency conversion) is asynchronous.
Best practices
- Call at order validation, not at checkout — cancelled or failed orders are never counted.
- Always send
orderId+clientId. - Keep the pixel
purchaseevent active: theorderIddeduplication makes both sources idempotent. - On
422for a FRESH order, retry once after a short delay (1-2 minutes): the pixel batch creating the session may still be in flight. If it persists, treat it as permanent (the user never visited with the pixel active). Retry with backoff on503.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The site’s UUID (visible in the dashboard) — not the tracker identifier.
Request Bodyrequired
Section titled “Request Bodyrequired”At least one of clientId, visitorId or sessionId is required to resolve the visitor’s session.
object
The user id previously passed to identify() on the pixel side. Recommended join key — no cookie plumbing needed on your backend.
Value of the _astr_vid cookie (fallback).
Session id (fallback).
Order id, unique per site. REQUIRED when type is purchase. Deduplication key against pixel events: the same order sent by the pixel and by your server is counted once, and retries are safe.
Conversion type.
Conversion amount.
ISO 4217 currency code.
When the order was validated (ISO 8601). Defaults to the time of the call. Send the validation time, not the checkout time.
At least one of clientId, visitorId or sessionId is required to resolve the visitor’s session.
object
The user id previously passed to identify() on the pixel side. Recommended join key — no cookie plumbing needed on your backend.
Value of the _astr_vid cookie (fallback).
Session id (fallback).
Order id, unique per site. REQUIRED when type is purchase. Deduplication key against pixel events: the same order sent by the pixel and by your server is counted once, and retries are safe.
Conversion type.
Conversion amount.
ISO 4217 currency code.
When the order was validated (ISO 8601). Defaults to the time of the call. Send the validation time, not the checkout time.
At least one of clientId, visitorId or sessionId is required to resolve the visitor’s session.
object
The user id previously passed to identify() on the pixel side. Recommended join key — no cookie plumbing needed on your backend.
Value of the _astr_vid cookie (fallback).
Session id (fallback).
Order id, unique per site. REQUIRED when type is purchase. Deduplication key against pixel events: the same order sent by the pixel and by your server is counted once, and retries are safe.
Conversion type.
Conversion amount.
ISO 4217 currency code.
When the order was validated (ISO 8601). Defaults to the time of the call. Send the validation time, not the checkout time.
Example
{ "clientId": "USER_12345", "orderId": "ORDER-10042", "type": "purchase", "value": 129.5, "currency": "EUR", "occurredAt": "2026-07-22T10:32:00Z"}Responses
Section titled “Responses”Conversion accepted and queued.
object
The session the conversion was attached to.
Id of the created conversion event.
Examplegenerated
{ "success": true, "sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "eventId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Validation error (missing or invalid field).
object
Machine-readable code on some errors (e.g. NO_SESSION).
Examplegenerated
{ "error": "example", "code": "example"}Missing or invalid API key.
object
Machine-readable code on some errors (e.g. NO_SESSION).
Examplegenerated
{ "error": "example", "code": "example"}The site does not belong to the key’s organization.
object
Machine-readable code on some errors (e.g. NO_SESSION).
Examplegenerated
{ "error": "example", "code": "example"}Unknown site.
object
Machine-readable code on some errors (e.g. NO_SESSION).
Examplegenerated
{ "error": "example", "code": "example"}No session resolvable from the provided identifiers (unknown visitor, or outside the attribution window). For a fresh order, retry once after 1-2 minutes (the pixel batch may still be in flight); otherwise permanent.
object
Machine-readable code on some errors (e.g. NO_SESSION).
Examplegenerated
{ "error": "example", "code": "example"}Queue unavailable — retry with exponential backoff.
object
Machine-readable code on some errors (e.g. NO_SESSION).
Examplegenerated
{ "error": "example", "code": "example"}