API

barcode

Runs in your own browser. Covers EAN/UPC, Code 128, GS1-128, ITF-14, Data Matrix and the rest. Separate from `qr-code`: a QR is one symbology, this is the rest of them, and the check digits differ per family.

v1 beta browser · 1 tokens

Call it

POST https://tembrica.com/v1/tools/barcode/runs
Authorization: Bearer $TIMBRICA_KEY
Idempotency-Key: <your retry-safe key>
Content-Type: application/json

Input

FieldTypeRequiredNotes
value string yes The data to encode. Must satisfy the chosen symbology — EAN-13 wants 12 or 13 digits, Code 128 takes free text.
max length: 2000
type string no Barcode symbology, as the page names it.
one of: ean13, ean8, upca, upce, code128, gs1_128, itf14, datamatrix
default: code128
format string no Export format. SVG stays sharp at print size.
one of: png, svg
default: png

Browser recipe

This tool runs in your own browser. The work order you receive carries this recipe with the placeholders filled in; the selectors below are a versioned contract, not implementation detail — they do not change without a version bump.

{
    "engine": "dom",
    "steps": [
        {
            "action": "select",
            "selector": "[data-tmb-api=\"type\"]",
            "value": "{{type}}"
        },
        {
            "action": "set",
            "selector": "[data-tmb-api=\"value\"]",
            "value": "{{value}}"
        },
        {
            "action": "wait",
            "selector": "[data-tmb-api=\"download\"][data-tmb-format=\"{{format}}\"]",
            "timeout_s": 60
        },
        {
            "action": "click",
            "selector": "[data-tmb-api=\"download\"][data-tmb-format=\"{{format}}\"]"
        }
    ],
    "result": {
        "kind": "download",
        "settles": "automatically"
    }
}

Errors it can return

validation_failed  insufficient_tokens 

History

  • v1 — 2026-08-02 — Initial release (browser lane).

This contract cannot change without a new version and a line above: a test compares the published schema, pricing and limits against a committed lockfile and fails the build otherwise. Subscribe to /v1/changelog to be told when something moves.