Report a conversion
Attributes a sale, sign-up or other conversion to the scan that brought the visitor (Business).
From your server, send a token and the scan's sid, or the code id as code. From the browser, conversions.js sends sid with no token, 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.
oauth2 codes:writeAuthorizationBearer <token>An OAuth 2.0 access token, sent as Authorization: Bearer <token>. Register an app in Settings → Developers, send the user through authorization (PKCE S256), then exchange the code for a token. Access tokens last 1 hour; refresh tokens 30 days. Step by step.
Scope: codes:write
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 (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