Record a conversion event (public)
const url = 'https://example.com/api/v1/conversions/track';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"goalKey":"purchase","clickToken":"550e8400-e29b-41d4-a716-446655440000","linkCode":"aEOYX3B","revenueAmount":49.99,"revenueCurrency":"USD","metadata":{"orderId":"12345"},"status":"lead","payout":49.99,"payoutCurrency":"USD","tid":"aff-net-12345","rawParams":{},"receivedVia":"api","convertedAt":"2026-02-14T10:00:00.000Z"}'};
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://example.com/api/v1/conversions/track \ --header 'Content-Type: application/json' \ --data '{ "goalKey": "purchase", "clickToken": "550e8400-e29b-41d4-a716-446655440000", "linkCode": "aEOYX3B", "revenueAmount": 49.99, "revenueCurrency": "USD", "metadata": { "orderId": "12345" }, "status": "lead", "payout": 49.99, "payoutCurrency": "USD", "tid": "aff-net-12345", "rawParams": {}, "receivedVia": "api", "convertedAt": "2026-02-14T10:00:00.000Z" }'Request Bodyrequired
Заголовок раздела «Request Bodyrequired»object
Goal key
Example
purchaseClick token from redirect (required if linkCode is absent)
Example
550e8400-e29b-41d4-a716-446655440000Short link code — alternative to clickToken for landing-page conversions
Example
aEOYX3BExample
49.99ISO 4217 currency code
Example
USDobject
Example
{ "orderId": "12345"}Conversion status — postbacks use this to move lead -> sale, etc. When omitted on a new conversion: “sale” if payout/revenueAmount > 0, otherwise “lead”. Only sale/rebill/upsell count as revenue.
Example
salePayout amount as reported by the affiliate network
Example
49.99ISO 4217 currency code for payout
Example
USDExternal conversion id from the affiliate network. Combined with the goal, this is the dedup key: a second postback with the same tid updates the existing conversion (e.g. lead -> sale) instead of creating a new one.
Example
aff-net-12345Raw incoming params, kept for debugging postback ingestion
object
Example
postbackBackdate the conversion (CSV import / API pull of historical data). Also fixes which FX rate is used for revenueBase — omit for “now”.
Example
2026-02-14T10:00:00.000ZResponses
Заголовок раздела «Responses»Conversion recorded
Invalid click token
Goal not found