Passports

Render the passport's QR code (by serial).

Same shape as GET /api/v1/passports/{id}/qr.

get/api/v1/passports/by-serial/{serial}/qr

Request

  • Base URL: https://app.tracepass.eu
  • URL: https://app.tracepass.eu/api/v1/passports/by-serial/{serial}/qr
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.tracepass.eu/api/oauth/authorize, token URL https://app.tracepass.eu/api/oauth/token, scopes: passports:read)

Query parameters

format'svg' | 'png' | 'json'
symbology'qr' | 'datamatrix'

The 2D symbology to render. EN 18220:2026 permits QR Code (ISO/IEC 18004) and Data Matrix (ISO/IEC 16022); both encode the same URL. Data Matrix suits small parts and direct part marking. With datamatrix, an 8-char backgroundColor renders opaque unless its alpha is 00 (fully transparent).

useCompanyBranding'true'
colorstring
backgroundColorstring

Response

QR rendering.

passportIdstring required

MongoDB ObjectId hex string (24 chars).

gtinstring

GS1 GTIN with a valid check digit. Accepts 8 digits (GTIN-8), 12 digits (GTIN-12/UPC-A), 13 digits (GTIN-13/EAN-13), or 14 digits (GTIN-14). All forms are left-padded to 14 digits before storage; stored and returned values are always 14 digits.

serialstring
identifierstring

For non-GS1 passports: the identifierKey string, e.g. did:did:example:123abc. Present when gtin/serial are absent.

publicUrlstring uri required
symbology'qr' | 'datamatrix'

The symbology rendered. qrSvg and qrPngDataUri keep their names for compatibility and hold the Data Matrix image when this is datamatrix.

status'draft' | 'in_review' | 'approved' | 'published' | 'suspended' | 'expired' | 'archived' required
qrSvgstring required

Inline <svg> markup, ready to embed.

qrPngDataUristring required

data:image/png;base64,...

Example response

{
  "passportId": "6650a1b2c3d4e5f6a7b8c9d0",
  "gtin": "04012345000015"
}

Changes

No recorded changes to this operation across all 1 revision of this API.