POST /v1/codes/barcode-generate
Barcode
EAN-13, UPC-A, Code128 and the rest, with the check digit worked out for you.
Make a retail barcode now No key, no code — 2 credits either way.
curl -X POST "$DOATHING_API/v1/codes/barcode-generate" \
-H "x-api-key: $DOATHING_KEY" \
-H "content-type: application/json" \
-d '{"text": "590123412345", "options": {"symbology": "ean13"}}'
EAN-13, UPC-A, Code128 and the rest, with the check digit worked out for you.
Generate EAN-13, EAN-8, UPC-A, Code128, Code39 or ITF barcodes as PNG or SVG with checksum calculation.
Response
The result carries your remaining balance alongside it, so you can track spend without a second call.
{
"symbology": "ean13",
"input": "590123412345",
"full_code": "5901234123457",
"request_id": "37f01edb-0163-42a1-ac51-0acaef979800",
"credits_remaining": 96
}
Cost
2 credits per call, whether it is run from the site or from the API — the credential differs, the price does not. A new account starts with 20 credits.
A rejected request still costs a credit: the authorizer decrements before the tool validates. A call rejected for a missing or invalid key is free.
Parameters
Generated from the endpoint’s own validation, so this is exactly what it accepts. A body field goes at the top level; an option goes inside options.
| Name | In | Type | Default | Notes |
|---|---|---|---|---|
| text * | body | string | — | |
| symbology | options | string | "code128" | ean13, ean8, upca, isbn13, code128, code39 or itf. one of ean13, ean8, upca, isbn13, code128, code39, itf |
| format | options | string | "png" | png or svg. one of png, svg |
| show_text | options | boolean | true | Print the digits under the bars. |
| module_width | options | number | 0.2 | |
| module_height | options | number | 15 | Bar height in millimetres. |
| quiet_zone | options | number | 6.5 |