Snipget.ai

Identifiers validate upc

Exact
identifiers_validate_upc

Deterministic and authoritative — the canonical answer for this input.

Validate a GS1 retail barcode: UPC-A (12), EAN-13 (13), EAN-8 (8), or GTIN-14 (14). Shared alternating-weight mod-10 check digit. Returns form label, length, check digit, and the GTIN-14 padded form. Processing multiple inputs? Use `identifiers_validate_upc_batch` to do up to 1000 in one call.

Parameters

valuestringrequired

The identifier string to validate.

Call it

curl -X POST https://api.snipget.ai/v1/identifiers/validate/upc \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"value":"036000291452"}'

The Batch tab sends up to 1000 inputs in one call via /v1/identifiers/validate/upc/batch.

Example response

{
  "input": "036000291452",
  "is_valid": true,
  "normalized": "036000291452",
  "form": "UPC-A",
  "length": 12,
  "check_digit": "2",
  "gtin14": "00036000291452"
}

FAQ

What barcodes does it handle?

Retail product barcodes: UPC-A (12 digits), EAN-13, EAN-8, and GTIN-14. It detects which one you passed and confirms the check digit.

Does it tell me what product it is?

No. It validates the barcode number, it does not look up the item, brand, or price. That needs a product database.

What is the gtin14 field for?

It is your code padded with leading zeros to 14 digits, a handy single format to store every barcode type in one consistent column.

How reliable is it?

It is exact and deterministic. A correct barcode always validates, and a scanning or typing slip that breaks the check digit is caught.

What if I paste an odd number of digits?

Lengths other than 8, 12, 13, or 14 return is_valid false with a reason and confidence 0, not an error.

Related tools