Produce 14 barcode types as PNG/SVG/PDF with GET /v1/barcodes. Parameters, colour, rotation and no-code usage.
GET /v1/barcodes produces a single barcode as an image. Because it works with a single endpoint and query parameters, it can be embedded in an <img src> tag; it also works in code-free environments such as Excel or Google Sheets.
| Parameter | Description | Default |
|---|---|---|
type | Barcode type (code) | code128 |
data | Data to encode | the type's sample |
xdim | Module width (1-10) | 3 |
height | Height (linear barcodes) | automatic |
ec | Error correction (2D: L/M/Q/H) | automatic |
quiet | Quiet zone (module) | per type |
hrt | Human-readable text (below/none) | below |
fg | Foreground colour (RRGGBB) | 000000 |
bg | Background (RRGGBB or transparent) | FFFFFF |
rot | Rotation (0/90/180/270) | 0 |
format | Output (png/svg/pdf) | png |
key | API key (raises the limits) | none |
QR Kod, EAN-13, Code 128, Data Matrix, EAN-8, UPC-A, UPC-E, Code 39, ITF-14, PDF417, Aztec, Codabar, Code 93, MSI
curl "https://api.labelixa.com/v1/barcodes?type=datamatrix&data=DM-4821&xdim=5&fg=2563eb" > code.png
When invalid data or type is given, the API returns the error as an image with HTTP 200 and explains it in the X-Warnings header. This way an <img> always shows a visible result.