Analytics API

Stream real-time scan metrics, 30-day time series, and device telemetry via GET /api/v1/analytics/:qrId.

1. Privacy-Preserving Telemetry (Salted IP Hashing)

In compliance with the Indian DPDP Act 2023 and GDPR, QRnaly replaces raw IP addresses with irreversible SHA-256 salted hashes (ip_hash). This enables unique scan identification without retaining personal data.

2. Response Payload Structure

{  "data": {
    "qrId": "qr_01928374a5",
    "slug": "campaign-billboard",
    "metrics": {
      "totalScans": 1420,
      "uniqueScans": 980,
      "scansToday": 45,
      "scansThisMonth": 680,
      "latestScan": "2026-09-08T09:42:15.000Z"
    },
    "timeSeries": [
      { "date": "Sep 1", "day": "2026-09-01", "totalScans": 38, "uniqueScans": 29 },
      { "date": "Sep 2", "day": "2026-09-02", "totalScans": 52, "uniqueScans": 41 }
    ],
    "breakdowns": {
      "devices": [{ "name": "Mobile", "count": 1350, "percent": 95.1 }],
      "os": [{ "name": "iOS", "count": 820, "percent": 57.7 }, { "name": "Android", "count": 530, "percent": 37.3 }],
      "cities": [{ "name": "Mumbai", "count": 640, "percent": 45.1 }]
    }
  }
}