API & MCP

Everything a person can do on Barcode Generator (EAN-13, UPC-A, Code 128), a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Barcode Generator (EAN-13, UPC-A, Code 128)

Make an EAN-13, UPC-A or Code 128 barcode. EAN/UPC check digits are calculated (or verified), Code 128 switches between code sets A, B and C for the shortest symbol, and the result prints at GS1 sizes with quiet zones and a test square.

Inputs of Barcode Generator (EAN-13, UPC-A, Code 128)
FieldTypeDefaultDescription
symbologyselect (ean13, upca, code128)"ean13"Barcode type
datatext"400638133393"Data. EAN-13: 12 digits (the check digit is added) or 13 digits (it is checked). UPC-A: 11 or 12 digits. Code 128: up to 80 ASCII characters.
magnificationnumber1Size (magnification). EAN/UPC: 1 = 0.33 mm modules (GS1 nominal); Code 128: 1 = 0.30 mm modules.
heightnumber22.85Bar height (mm)
textbooleantruePrint the digits under the bars
layoutselect (one, sheet)"one"Print layout
captiontext—Caption above the barcode
paperselect (a3, a4, a5, a6, b5, letter, legal, tabloid, halfletter)"a4"Paper size

Example request

EAN-13 with the check digit added

curl -X POST https://printshopbarcode.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"symbology":"ean13","data":"400638133393"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "printshop-barcode": { "type": "http", "url": "https://printshopbarcode.usefulweb.app/mcp" }
  }
}