Dokaz API › Docs › Barcode API

EAN-13 and UPC-A barcode API with check digit

Retail barcodes carry a GS1 check digit, and a wrong one means a scanner at the till rejects the product. This endpoint computes it when you leave it off, and when you include it, refuses a wrong one with a 400 that says what it should be - it never silently fixes your data.

With text=1 the digits are printed the retail way: the first digit outside the bars, the rest in two groups, guard bars extended.

Request

curl "https://api.dokaz.net/v1/barcode?data=400638133393&type=ean13&text=1"

curl "https://api.dokaz.net/v1/barcode?data=03600029145&type=upca&text=1" -o upca.svg

x-barcode-text is the full 13 digits including the computed check digit (here 4006381333931). Use type=upca with 11 or 12 digits for UPC-A.

Try it live — this runs against the free tier from your browser.

Pricing

100 calls a day are free with no key. Need more? Starter is $9/month for 10,000 calls across every product, key issued instantly.

Questions

Do you issue barcode numbers?

No. Numbers for products sold in shops come from GS1 in your country. This renders the number you own.

What happens with a wrong check digit?

A 400 with the digit it should have been. For example 4006381333932 is refused: the check digit for 400638133393 is 1.

Related