Barcode

GET/v0/barcode

Validates barcode data for common linear symbologies: Code 128, Code 39, ITF-14, and ITF (Interleaved 2 of 5). Complements the existing EAN / GTIN / UPC endpoint. If no type is specified, the symbology is auto-detected.

Try it

Query Parameters

ParamTypeRequiredDescription
valuestringYesThe barcode data to validate
typestringNoForce a specific symbology: code-128, code-39, itf-14, itf. Auto-detected if omitted.

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.isvalid.dev/v0/barcode?value=HELLO-2025&type=code-39"

Response Fields

FieldTypeDescription
validbooleanWhether the data is valid for the detected/specified symbology
typestringSymbology: code-128, code-39, itf-14, or itf
datastringThe barcode data (uppercased for Code 39)
encodingstringCode 128 only — optimal code set: A, B, or C
hasCheckDigitbooleanCode 39 only — whether mod-43 check digit was detected
indicatorstringITF-14 only — packaging indicator digit (first digit)
errorstringError message when invalid

Example Response — Code 39

{
  "valid": true,
  "type": "code-39",
  "data": "HELLO-2025",
  "hasCheckDigit": false,
  "checkDigitValid": null
}

Example Response — Code 128

{
  "valid": true,
  "type": "code-128",
  "data": "Order#12345",
  "encoding": "B"
}

Example Response — ITF-14

{
  "valid": true,
  "type": "itf-14",
  "data": "15400141288763",
  "indicator": "1"
}