Validation
GTIN/UPC/EAN validate API
Validates the GS1 mod-10 check digit for UPC-A, EAN-13, EAN-8, or GTIN-14, auto-detecting the format and emitting the zero-padded canonical GTIN-14. Answers 'Is this barcode number valid?', 'What is the GTIN-14 form?'.
Price$0.04per request
MethodPOST
Route/v1/validate/gtin
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
gtinupceanbarcodecheck-digitmod-10validategs1retail
API URL
Integration docshttps://x402.hexl.dev/v1/validate/gtinExample request
{
"code": "036000291452"
}Example response
{
"valid": true,
"reason": "Valid UPC-A/GTIN-12 (mod-10 OK).",
"normalized": "036000291452",
"detectedFormat": "UPC-A/GTIN-12",
"checkDigit": {
"expected": "2",
"actual": "2"
},
"gtin14": "00036000291452"
}Input schema
{
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"description": "8, 12, 13, or 14 digit product code.",
"examples": [
"036000291452"
]
},
"format": {
"type": "string",
"description": "Optional explicit format: ean-8, upc-a, ean-13, gtin-14, etc.",
"examples": [
"upc-a"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}