Report a conversion
Attributes a sale, sign-up or other conversion to the scan that brought the visitor (Business).
From your server, send an API key (or token) and the scan's sid, or the code id as code. From the browser, conversions.js sends sid with no key, for codes with conversion tracking turned on. An id, such as your order id, makes retries safe: a repeat returns 200 with duplicate: true. More in Tracking and conversions.
Scope: codes:write, for API keys and OAuth tokens alike (when you send a key or token).
AuthorizationBearer <qrdx_ followed by 40 letters and digits>An API key, sent as Authorization: Bearer qrdx_…. Create one in Settings → API keys & apps: it is shown once. A key acts on the workspace it was created in as its creator, with their current role there, and only within its scopes, the same scopes as OAuth (each operation names the one it needs). API keys.
application/json- body
sid?stringThe qrdx_sid the short link appended to your page URL
length <= 200code?stringThe code id, when no scan is known (key or token requests only)
^[A-Za-z0-9_-]{1,64}$name?stringWhat happened, e.g. purchase or signup
^[\p{L}\p{N} _.:/-]+$1 <= length <= 64"conversion"value?|Amount, as a number or string with up to 2 decimals
currency?stringISO 4217 code; USD when a value has none
^[A-Z]{3}$id?stringYour id for it (order id, ...); repeats are ignored
1 <= length <= 128metadata?Up to 20 extra keys
Already recorded (same id)
application/json- response
id*stringConversion id (derived from id when you send one)
codeId*stringscanId*|The attributed scan, or null when reported by code id
duplicate*booleanTrue when a conversion with the same id was already recorded (status 200)
curl -X POST 'https://api.qrdx.dev/v1/conversions' \ -H 'Content-Type: application/json' \ -d '{ "sid": "eyJjIjoiY201Y29kZSIsInMiOiJjbTVzY2FuIn0.sig", "name": "purchase", "value": 49.9, "currency": "EUR", "id": "order_1042"}'{ "id": "cv_3f1c2a9d0b7e4f6a8c5d1e2f3a4b5c6d", "codeId": "cm5code0spring0menu00001", "scanId": "cm5scan0berlin0000000001", "duplicate": true}Last updated on