GTIN barcode validator: EAN-13, UPC-A (GTIN-12), GTIN-8/14, GLN and SSCC check digits
GTIN barcode validator: validate and convert GS1 identifiers: GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GLN and SSCC. Returns the check-digit verdict, the computed correct check digit, the GTIN-14 form with its indicator digit, and conversion between GTIN-8, -12, -13 and -14. No company-prefix split is returned: GS1's prefix-length table is no longer public data. Also computes a missing check digit from a partial code. Structure only, no product database.
Output (data): valid, type (gtin8|gtin12|gtin13|gtin14|gln|sscc|unknown), normalised, check_digit (the digit that should be there; string|null, null when the length is unsupported), check_digit_ok, gtin14 (zero-padded; string|null, null for sscc and unsupported lengths), indicator (string|null), reason (string|null), also_valid_as (present only for a gtin13, which is also a valid gln: [gln]; also after op=checkdigit and op=convert that produce a gtin13), converted (op=convert only: the value in the requested format; null when the input's check digit is wrong, in which case valid is false, reason is checksum and type and normalised are those of the input). The GS1 company-prefix boundary is not returned.
Deterministic: identical input returns identical output, so the response is served with Cache-Control: private, max-age=31536000, immutable (the paying client may cache it indefinitely; shared caches must not, because the response is paid).
Price: $0.05 USDC per call (x402, Base). Route contract version 1.0.0. Docs: https://api.duoleads.com/docs#id-gs1
Request
- Base URL: https://api.duoleads.com
- URL: https://api.duoleads.com/v1/id/gs1
- Auth: none declared
Query parameters
validate (default), checkdigit (compute the missing final digit) or convert. Accepted: validate, checkdigit, convert.
GS1 code, digits with optional spaces or hyphens. For op=checkdigit, omit the final digit. Accepted: 8, 12, 13, 14 or 18 digits.
Target format. Required when op=convert. Accepted: gtin8, gtin12, gtin13, gtin14.
Response
Paid and settled. data is route-specific; a route that judges its input returns 200 with data.valid: false for a bad value.
Changes
No recorded changes to this operation across all 1 revision of this API.