Passports

Render the passport's QR code.

Returns the QR code for a passport. Default response is a raw SVG image so <img src=".../qr"> works directly. Use ?format=png for a raster PNG, or ?format=json for an envelope containing both the SVG markup and a base64 PNG data URI plus the encoded URL + status.

Counts as one v1 passport-read against the daily budget (same counter as the data endpoint).

get/api/v1/passports/{id}/qr

Request

  • Base URL: https://app.tracepass.eu
  • URL: https://app.tracepass.eu/api/v1/passports/{id}/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'

When set to true, foreground colour comes from the company's branding.primaryColor. Ignored if color is also set.

colorstring

6-char hex without #. Wins over useCompanyBranding.

backgroundColorstring

6 or 8 char hex without # (8 = RGBA).

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.