QRdx
HelpGuidesDevelopersReact librarySelf-hosting

Get scan analytics

Scan analytics of a code for a range of days.

Totals, a daily series and the top countries, cities, devices, systems, browsers and referrers. The range is clamped to how long the plan keeps analytics. With limit above 0 the response also lists individual scans, newest first: pass the response's nextBefore as before for the next page.

GET
/codes/{id}/scans

Authorization

oauth2 codes:read
headerAuthorizationBearer <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:read

Path Parameters

id*string

The code's id

Length1 <= length <= 64

Query Parameters

range?string

Days to cover; defaults to 30 days, or the longest range the plan keeps

Value in"7d""30d""90d""365d""1095d"
limit?integer

Individual scans to include (0–500; 0 = totals only)

Range0 <= value <= 500
Default0
before?string

Only scans before this time: the previous nextBefore

Formatdate-time

Response Body

Analytics for the range

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.qrdx.dev/v1/codes/cm5code0spring0menu00001/scans'
Example Response
{  "data": {    "codeId": "cm5code0spring0menu00001",    "range": "7d",    "retentionDays": 30,    "from": "2026-01-06T00:00:00.000Z",    "days": 7,    "total": 42,    "unique": 37,    "series": [      {        "date": "2026-01-06",        "count": 3      },      {        "date": "2026-01-07",        "count": 9      }    ],    "countries": [      {        "value": "DE",        "count": 30      }    ],    "cities": [      {        "city": "Berlin",        "country": "DE",        "count": 21      }    ],    "devices": [      {        "value": "mobile",        "count": 39      }    ],    "os": [      {        "value": "iOS",        "count": 25      }    ],    "browsers": [      {        "value": "Safari",        "count": 24      }    ],    "referrers": [      {        "value": null,        "count": 42      }    ]  }}

Last updated on