Docs
Two endpoints. Send a label, or ask for a single barcode.
Barcode endpoint
One key for both APIs. Use the same X-API-Key you use to render labels. A barcode call and a label render count against the same daily allowance, on the same plan.
One symbology, one payload, an image back. Unlike the label endpoint it takes no ZPL: the symbol is encoded directly, so the response is cropped to the barcode rather than sitting on a label you had to size. The same engine backs both, so output matches the playground.
GET /v1/barcodes?type={type}&data={data}&...curl "https://api.arkalabel.io/v1/barcodes?type=code128&data=ARKA-123456789&module=3&height=120" \
-H "X-API-Key: $ARKALABEL_KEY" \
-o barcode.pngThe generator’s Link to this image points at /api/barcode on this site, which proxies to the same endpoint and keeps the key server-side. Call the API host directly from your own code.
Parameters
Always accepted
| type | Symbology. See the table below; an unknown value is refused and the message lists what is supported. |
| data | Content to encode, URL-encoded. Required unless a content type supplies it. |
| mode | standard (default), escaped (_xx hex escapes) or gs1 (identifiers in parentheses). |
| module | Width of the narrowest bar in dots, 1–20. Module size for the 2D symbologies. Default 3. |
| quiet | Blank margin in dots on both axes, 0–500. Default 20. |
| quietx / quiety | Per-axis quiet zone, overriding quiet. |
| rotation | 0, 90, 180 or 270. |
| dpmm | Print density, 1–24. Default 8. |
| fg / bg | Hex colours, 3 or 6 digits, # optional. bg also accepts transparent. |
| format | png (default), svg, pdf, jpeg, gif or tiff. Overrides the Accept header. |
Accepted where the symbology uses them
An option that does not apply is ignored, not refused, and named in X-Warnings. A link built for a Code 39 therefore keeps working when you change the type — minus the options the new symbology has no use for.
| height | Bar height in dots, 1–2000. Linear symbologies. |
| ratio | Wide-to-narrow ratio: 2 or 3. Two-width symbologies only. |
| text | Readable line: below (default), above or none. |
| font / fontsize | sans, serif, mono or ocrb; 6–16pt then 18, 20, 22, 24, 26, 28, 30, 32, 36, 40. |
| gph | Extra length of the guard bars, in dots. The retail codes only. |
| sizew / sizeh | Column and row count. The PDF417 family only. |
| said / san | Structured append file ID and name. 2D symbologies only. |
| ecc | QR error correction: L, M, Q (default) or H. |
Symbologies
38 available. The columns show which options each one uses; a blank means the option is ignored for that type.
Linear (29)
| Symbology | type= | Bar height | Text, font, size | Bar width ratio | Guard height |
|---|---|---|---|---|---|
| Code 128 | code128 | yes | yes | — | — |
| Code 39 | code39 | yes | yes | yes | — |
| Codabar | codabar | yes | yes | yes | — |
| Interleaved 2 of 5 | itf | yes | yes | yes | — |
| ITF-14 | itf14 | yes | yes | yes | — |
| SSCC-18 / NVE-18 | sscc18 | yes | yes | — | — |
| PZN8 | pzn8 | yes | yes | — | — |
| EAN-13 | ean13 | yes | yes | — | yes |
| EAN-8 | ean8 | yes | yes | — | yes |
| UPC-A | upca | yes | yes | — | yes |
| Code 39 Extended | code39ext | yes | yes | yes | — |
| Code 11 | code11 | yes | yes | yes | — |
| MSI | msi | yes | yes | — | — |
| Pharmacode | pharmacode | yes | — | — | — |
| Pharmacode Two-Track | pharmacode2 | yes | — | — | — |
| Industrial 2 of 5 | industrial2of5 | yes | yes | yes | — |
| IATA 2 of 5 | iata2of5 | yes | yes | yes | — |
| Matrix 2 of 5 | matrix2of5 | yes | yes | yes | — |
| Code 93 | code93 | yes | yes | — | — |
| UPC-E | upce | yes | yes | — | yes |
| ISBN-13 | isbn13 | yes | yes | — | yes |
| ISBN-10 | isbn10 | yes | yes | — | yes |
| ISSN | issn | yes | yes | — | yes |
| JAN | jan | yes | yes | — | yes |
| PZN7 | pzn7 | yes | yes | — | — |
| USPS PostNet | postnet | yes | — | — | — |
| USPS PLANET | planet | yes | — | — | — |
| Royal Mail 4-State | rm4scc | yes | — | — | — |
| KIX (Netherlands) | kix | yes | — | — | — |
Two-dimensional (9)
| Symbology | type= | Columns and rows | Append: file ID | Append: file name |
|---|---|---|---|---|
| Data Matrix | datamatrix | — | yes | — |
| Aztec Code | aztec | — | yes | — |
| Aztec Compact | azteccompact | — | yes | — |
| PDF417 | pdf417 | yes | yes | yes |
| Compact PDF417 | pdf417compact | yes | yes | yes |
| Micro QR Code | microqr | — | — | — |
| Swiss QR Code | swissqr | — | — | — |
| UPN QR | upnqr | — | — | — |
| QR Code | qr | — | yes | — |
Content types
A vCard QR is a QR code. So is a Wi-Fi credential, a calendar event or a payment request — the symbology is identical, only the string inside it differs. Rather than list those as separate barcode types, pass content with the fields it needs and data becomes unnecessary. Structural characters are escaped for you, so a semicolon in a company name cannot end a vCard field early.
GET /v1/barcodes?type=qr&content=wifi&ct_ssid=Office&ct_password=hunter2&ct_security=WPA
| text | Any text, encoded exactly as typed. Fields: text* |
| url | A web address. https:// is added when the scheme is missing. Fields: url* |
| vcard | A contact card most phone cameras offer to save. Fields: name*, org, title, phone, email, url, address |
| mecard | The compact contact format older readers understand. Fields: name*, phone, email, url |
| wifi | Scanning offers to join the network. Fields: ssid*, password, security, hidden |
| event | A single event a reader can add to a calendar. Fields: summary*, location, start, end |
| geo | A map pin. Fields: latitude*, longitude* |
| Opens a pre-addressed message. Fields: to*, subject, body | |
| sms | Opens a pre-written text message. Fields: phone*, message |
| phone | Dials the number. Fields: phone* |
| epc | A euro credit transfer request, as European banking apps read it. Fields: name*, iban*, bic, amount, reference, text |
| swiss | The payment slip payload used on Swiss invoices. Fields: iban*, creditor*, amount, currency, debtor, reference, message |
| zatca | The Saudi e-invoicing seal: a TLV sequence in base64. Fields: seller*, vatnumber*, timestamp*, total*, vattotal* |
| gs1link | A GTIN as a resolvable URL. Pairs with the GS1 data mode. Fields: gtin*, domain, lot, serial |
An asterisk marks a required field. Each value is passed as ct_<field>. Content types apply to the 2D symbologies; asking for one on a linear type warns and encodes the data as given. GET /v1/barcodes/templates returns this list as JSON, which is how the generator builds its form.
Data modes
| standard | The data is encoded exactly as typed. |
| escaped | _xx hex escapes become the bytes they name, e.g. _1D for the GS1 separator. |
| gs1 | Application identifiers in parentheses, e.g. (01)09501101020917(10)LOT123. The parentheses are stripped and FNC1 separators inserted, giving GS1-128. |
Response headers
| Content-Type | Per format: image/png, image/svg+xml, application/pdf, and so on |
| X-Warning-Count / X-Warnings | Options that did not apply, and lossy conversions |
| X-Quota-Limit / -Used / -Remaining | Where your key stands this period |
| X-RateLimit-Remaining / Retry-After | Free-tier pacing |
Vector output
format=svg returns the symbol as geometry rather than pixels. That matters for print: a raster barcode scaled to a size the renderer did not anticipate loses its module edges to resampling and stops scanning, where a vector one is exact at any size. The SVG is built from the same encoders as the raster output and carries the same dimensions, so the two describe one symbol — every symbology this API offers, QR included. Rotation is the one thing not applied to vector output, and that is reported in X-Warnings rather than silently ignored.
Colour, font and font size are applied after rasterising, because ZPL itself is black and white. Colour therefore survives PNG and TIFF but not PDF, which is written greyscale and says so in X-Warnings. A transparent background cannot be saved as JPEG and is refused rather than silently flattened.
Error codes
| 400 | Invalid input: an unknown symbology, data the symbology cannot encode, or a value out of range. The message names the offending value. |
| 401 | Missing or invalid API key. |
| 403 | The API key has been disabled. |
| 429 | Quota exhausted, or the free-tier rate exceeded. Check Retry-After. |
| 503 | The rendering engine was unreachable or too slow. |
Errors are JSON: {"error": "…"}. The message names the specific problem rather than describing the class of problem — msi accepts digits only, got 'ARKA-1', not invalid data.