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.png

The 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

typeSymbology. See the table below; an unknown value is refused and the message lists what is supported.
dataContent to encode, URL-encoded. Required unless a content type supplies it.
modestandard (default), escaped (_xx hex escapes) or gs1 (identifiers in parentheses).
moduleWidth of the narrowest bar in dots, 1–20. Module size for the 2D symbologies. Default 3.
quietBlank margin in dots on both axes, 0–500. Default 20.
quietx / quietyPer-axis quiet zone, overriding quiet.
rotation0, 90, 180 or 270.
dpmmPrint density, 1–24. Default 8.
fg / bgHex colours, 3 or 6 digits, # optional. bg also accepts transparent.
formatpng (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.

heightBar height in dots, 1–2000. Linear symbologies.
ratioWide-to-narrow ratio: 2 or 3. Two-width symbologies only.
textReadable line: below (default), above or none.
font / fontsizesans, serif, mono or ocrb; 6–16pt then 18, 20, 22, 24, 26, 28, 30, 32, 36, 40.
gphExtra length of the guard bars, in dots. The retail codes only.
sizew / sizehColumn and row count. The PDF417 family only.
said / sanStructured append file ID and name. 2D symbologies only.
eccQR 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)

Symbologytype=Bar heightText, font, sizeBar width ratioGuard height
Code 128code128yesyes——
Code 39code39yesyesyes—
Codabarcodabaryesyesyes—
Interleaved 2 of 5itfyesyesyes—
ITF-14itf14yesyesyes—
SSCC-18 / NVE-18sscc18yesyes——
PZN8pzn8yesyes——
EAN-13ean13yesyes—yes
EAN-8ean8yesyes—yes
UPC-Aupcayesyes—yes
Code 39 Extendedcode39extyesyesyes—
Code 11code11yesyesyes—
MSImsiyesyes——
Pharmacodepharmacodeyes———
Pharmacode Two-Trackpharmacode2yes———
Industrial 2 of 5industrial2of5yesyesyes—
IATA 2 of 5iata2of5yesyesyes—
Matrix 2 of 5matrix2of5yesyesyes—
Code 93code93yesyes——
UPC-Eupceyesyes—yes
ISBN-13isbn13yesyes—yes
ISBN-10isbn10yesyes—yes
ISSNissnyesyes—yes
JANjanyesyes—yes
PZN7pzn7yesyes——
USPS PostNetpostnetyes———
USPS PLANETplanetyes———
Royal Mail 4-Staterm4sccyes———
KIX (Netherlands)kixyes———

Two-dimensional (9)

Symbologytype=Columns and rowsAppend: file IDAppend: file name
Data Matrixdatamatrix—yes—
Aztec Codeaztec—yes—
Aztec Compactazteccompact—yes—
PDF417pdf417yesyesyes
Compact PDF417pdf417compactyesyesyes
Micro QR Codemicroqr———
Swiss QR Codeswissqr———
UPN QRupnqr———
QR Codeqr—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
textAny text, encoded exactly as typed. Fields: text*
urlA web address. https:// is added when the scheme is missing. Fields: url*
vcardA contact card most phone cameras offer to save. Fields: name*, org, title, phone, email, url, address
mecardThe compact contact format older readers understand. Fields: name*, phone, email, url
wifiScanning offers to join the network. Fields: ssid*, password, security, hidden
eventA single event a reader can add to a calendar. Fields: summary*, location, start, end
geoA map pin. Fields: latitude*, longitude*
emailOpens a pre-addressed message. Fields: to*, subject, body
smsOpens a pre-written text message. Fields: phone*, message
phoneDials the number. Fields: phone*
epcA euro credit transfer request, as European banking apps read it. Fields: name*, iban*, bic, amount, reference, text
swissThe payment slip payload used on Swiss invoices. Fields: iban*, creditor*, amount, currency, debtor, reference, message
zatcaThe Saudi e-invoicing seal: a TLV sequence in base64. Fields: seller*, vatnumber*, timestamp*, total*, vattotal*
gs1linkA 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

standardThe data is encoded exactly as typed.
escaped_xx hex escapes become the bytes they name, e.g. _1D for the GS1 separator.
gs1Application identifiers in parentheses, e.g. (01)09501101020917(10)LOT123. The parentheses are stripped and FNC1 separators inserted, giving GS1-128.

Response headers

Content-TypePer format: image/png, image/svg+xml, application/pdf, and so on
X-Warning-Count / X-WarningsOptions that did not apply, and lossy conversions
X-Quota-Limit / -Used / -RemainingWhere your key stands this period
X-RateLimit-Remaining / Retry-AfterFree-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

400Invalid input: an unknown symbology, data the symbology cannot encode, or a value out of range. The message names the offending value.
401Missing or invalid API key.
403The API key has been disabled.
429Quota exhausted, or the free-tier rate exceeded. Check Retry-After.
503The 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.