Render

Render a barcode

Twelve symbologies as SVG, PNG, JPG, WebP or PDF. Nothing is stored: the data is inside the bars, which is why there is no dynamic barcode to re-point later.

gs1-datamatrix takes GS1 application identifiers in brackets, such as (01)09506000134352(17)271231(10)LOT42; the encoder adds FNC1 and the separators. Every field is validated first (check digits, YYMMDD dates, lengths, the GS1 character set, and which AIs require which), and a 400 names the field. gs1datamatrix is accepted as an alias.

There is no size in pixels. A barcode's width comes from its data, so scale — units per narrow bar — is the knob. An odd scale is rounded up, because an odd one puts bar edges on half-units and stops the one-unit symbologies decoding.

Needs a key with the render scope, like GET /api/qr.

get/api/barcode

Request

  • Base URL: https://app.qrsalt.com
  • URL: https://app.qrsalt.com/api/barcode
  • Auth: HTTP bearer

Query parameters

symbology'code128' | 'ean13' | 'ean8' | 'upca' | 'code39' | 'itf14' | 'gs1-128' | 'isbn' | 'datamatrix' | 'gs1-datamatrix' | 'pdf417' | 'aztec'

Which barcode to draw. type is accepted as the same thing, and so are bwip-js names such as gs1datamatrix.

typestring

An alias of symbology.

datastring

What the barcode should hold. text and q are accepted as the same thing. Required, at most 1200 characters. For gs1-datamatrix, bracketed application identifiers.

textstring

An alias of data.

qstring

An alias of data.

format'svg' | 'png' | 'jpg' | 'webp' | 'pdf'
scalenumber

Units per narrow bar. Rounded up to an even number.

mmnumber

Printed width of the PDF, in millimetres. Checked for every format; only the PDF reads it.

heightnumber

Bar height in encoder units. One-dimensional symbologies only; a matrix symbology refuses it.

Response

The barcode.

Changes

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