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
| Param | Type | Required | Description |
|---|---|---|---|
| value | string | Yes | The barcode data to validate |
| type | string | No | Force 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
| Field | Type | Description |
|---|---|---|
| valid | boolean | Whether the data is valid for the detected/specified symbology |
| type | string | Symbology: code-128, code-39, itf-14, or itf |
| data | string | The barcode data (uppercased for Code 39) |
| encoding | string | Code 128 only — optimal code set: A, B, or C |
| hasCheckDigit | boolean | Code 39 only — whether mod-43 check digit was detected |
| indicator | string | ITF-14 only — packaging indicator digit (first digit) |
| error | string | Error 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"
}