Barcode Labels Docs

GET /api/v1/barcode

Generate a barcode image (PNG, SVG, or PDF).

Returns just the barcode — no label page, and no human-readable caption unless includetext=true.

Parameters

ParameterRequiredDefaultDescription
textyesThe data to encode (max 7089 chars)
typeyescode128, qr, microqr, datamatrix, upca, upce, ean13, ean8, code39, itf14
formatnopngpng, svg (true vector), or pdf
includetextnofalseRender the human-readable text under the barcode
scaleno3PNG pixel density; for SVG it scales the coordinate grid but output remains resolution-independent
heightno15Bar height in mm for 1D types, 1–100 (ignored for 2D)
rotatenoNN (none), R (90° clockwise), L (90° counter-clockwise), I (180°)

Examples

High-resolution PNG for print:

/api/v1/barcode?text=SKU-12345&type=code128&scale=8&includetext=true

Scalable SVG Data Matrix:

/api/v1/barcode?text=PART-9876&type=datamatrix&format=svg

UPC-A with the standard human-readable digits:

/api/v1/barcode?text=012345678905&type=upca&includetext=true

Response

The image bytes with Content-Type: image/png, image/svg+xml, or application/pdf. Responses include Cache-Control: public, max-age=86400 and an ETag — identical requests are cacheable. CORS is enabled (Access-Control-Allow-Origin: *), so requests work from any origin.

On this page