Skip to main content
POST
Generate a single QR code

Authorizations

X-API-Key
string
header
required

Body

application/json

Request body for the synchronous single-QR endpoint.

Encodes a GS1 Digital Link URL as a QR code. The gtin is the only required identifier; lot, serial, and expiry are GS1 Application Identifier values that, when present, are appended to the Digital Link path/query so a phone scan resolves to the most specific instance available.

gtin
string
required

GTIN barcode (GTIN-8, 12, 13, or 14, with or without separators). Normalized to GTIN-14 server-side before encoding into the Digital Link URL.

Required string length: 8 - 17
Pattern: ^[\d\s\-]{8,17}$
lot
string | null

Optional GS1 AI(10) lot/batch identifier — 1-20 printable ASCII chars, no spaces. Encoded into the Digital Link path as /10/{lot}. When present alongside serial, both are added (lot before serial).

Required string length: 1 - 20
Pattern: ^[\x21-\x7E]{1,20}$
serial
string | null

Optional GS1 AI(21) serial identifier — 1-20 printable ASCII chars, no spaces. Encoded into the Digital Link path as /21/{serial}. Use serial for unit-level traceability when each item carries a unique tag.

Required string length: 1 - 20
Pattern: ^[\x21-\x7E]{1,20}$
expiry
string | null

Optional GS1 AI(17) expiry date as YYMMDD — exactly 6 digits (e.g. 261231 for 2026-12-31). Encoded into the Digital Link query as ?17={expiry}.

Required string length: 6
Pattern: ^\d{6}$
format
enum<string>
default:png

Output image format. svg for resolution-independent vector output; png for raster output sized by size; pdf for single-page vector PDF (path operators in the content stream — for print houses that scale to label size at the press, not in the browser); eps for PostScript vector output that packaging-design tools ingest into Illustrator.

Available options:
svg,
png,
pdf,
eps,
tif
size
integer
default:400

Target image side length in pixels (50-2000). QR codes are square, so this is both width and height. For format='svg', format='pdf', and format='eps' the value is treated as the target width in SVG user units / PostScript points (1pt = 1/72 inch ≈ 0.353mm), so a 400-unit symbol is roughly 140mm wide. Ignored when xdim_mm is set — X-dimension-correct sizing supersedes the pixel heuristic.

Required range: 50 <= x <= 2000
cmyk
boolean
default:false

Emit CMYK process colours instead of RGB. Only valid with format='eps' — any other format returns 422. Use for print houses that ingest the EPS directly into a CMYK workflow, avoiding an RGB→CMYK conversion that can shift module ink density.

xdim_mm
number | null

Target physical X-dimension (module width) in millimetres. When set, the symbol is sized so each module is exactly this wide on the printed surface (via Zint --scalexdimdp), size is ignored, and physical-size metadata travels with the file (PNG pHYs chunk, TIF resolution IFD tags, SVG width/height in mm). GS1 recommends 0.625 mm for consumer packaging; 0.495 mm is the GS1 minimum. Null keeps the legacy pixel-heuristic sizing.

Required range: 0.1 <= x <= 10
dpmm
number
default:11.81

Device resolution in dots per millimetre, used only when xdim_mm is set. Default 11.81 (300 dpi), matching the label/flexo presses we target. Affects the raster pixel grid for PNG/TIF; vector outputs (SVG/EPS) carry physical units regardless.

Required range: 1 <= x <= 200

Response

OK

The response is of type file.