1 creditBarcode API — every common symbology
Nine symbologies, check-digit validation, print-resolution PNG or vector SVG.
The Barcode API generates Code 128, EAN-13, EAN-8, UPC-A, ITF-14, Code 39, DataMatrix, PDF417 and GS1-128 barcodes from one REST call. Check digits are validated for EAN/UPC/ITF-14 — an invalid payload returns a readable 400 instead of a barcode that fails at the till. Output is PNG at any DPI or vector SVG, or stamp the code straight onto an existing PDF. One credit per code.
How does the Barcode API work?
One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.
curl -X POST https://www.ashdocs.com/api/v1/tools/barcode \
-H "X-API-Key: ash_live_..." \
-H "Content-Type: application/json" \
-d '{"data":"5901234123457","symbology":"ean13","options":{"format":"svg","height_mm":25}}'Common use cases
- →Product labels and packaging runs
- →Warehouse and asset tags
- →Stamping barcodes onto existing PDFs
Frequently asked questions
Which barcode symbologies are supported?+
Code 128, EAN-13, EAN-8, UPC-A, ITF-14, Code 39, DataMatrix, PDF417 and GS1-128 — one endpoint, chosen via the symbology field.
Does the API validate check digits?+
Yes. EAN, UPC and ITF-14 payloads are validated modulo-10 before rendering, and an invalid check digit returns a clean 400 with a readable message.
PNG or SVG for printing?+
SVG — vector edges stay crisp at any label size. If you need raster, request PNG at 300 DPI or higher.
Can I stamp a barcode onto an existing PDF?+
Yes — pass attach_to_pdf with the file URL, page number and millimetre coordinates, and the response is the stamped PDF.