{"uid":"cap_o6TX72ZOo4YZO19vFbNG5","slug":"duo-data-utilities-gs1-identifier-validation-conversion-b123ed3e","name":"Duo Data Utilities – GS1 Identifier Validation & Conversion","description":"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, GTIN-12, GTIN-13 and GTIN-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.","url":"https://api.duoleads.com/v1/id/gs1?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["value"],"properties":{"op":{"enum":["validate","checkdigit","convert"],"type":"string","default":"validate","maxLength":64,"description":"validate (default), checkdigit (compute the missing final digit) or convert."},"to":{"enum":["gtin8","gtin12","gtin13","gtin14"],"type":"string","maxLength":64,"description":"Target format. Required when op=convert."},"value":{"type":"string","maxLength":32,"description":"GS1 code, digits with optional spaces or hyphens. For op=checkdigit, omit the final digit."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","route","version","data","meta"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"type":{"type":"string"},"valid":{"type":"boolean"},"gtin14":{"type":["string","null"]},"reason":{"type":["string","null"]},"converted":{"type":["string","null"]},"indicator":{"type":["string","null"]},"normalised":{"type":"string"},"check_digit":{"type":["string","null"]},"also_valid_as":{"type":"array","items":{"type":"string"}},"check_digit_ok":{"type":"boolean"}}},"meta":{"type":"object","required":["request_id","computed_at","price_usd","deterministic","disclaimer"],"properties":{"sources":{"type":"array","items":{"type":"object","required":["id","version","published"]}},"price_usd":{"type":"string"},"disclaimer":{"type":"string"},"request_id":{"type":"string"},"computed_at":{"type":"string","description":"RFC 3339 UTC with milliseconds"},"deterministic":{"type":"boolean"}}},"route":{"const":"/v1/id/gs1"},"version":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"type":"gtin13","valid":true,"gtin14":"05901234123457","reason":null,"indicator":"0","normalised":"5901234123457","check_digit":"7","also_valid_as":["gln"],"check_digit_ok":true},"meta":{"price_usd":"0.05","disclaimer":"Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms","request_id":"01K6B7Q4ZC8H3F2M9WXR5TYN0D","computed_at":"2026-09-28T12:00:00.000Z","deterministic":true},"route":"/v1/id/gs1","version":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_45WB3JS0d9MpGWzVBlIS7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates GS1 identifiers (GTIN-8/12/13/14, GLN, SSCC), verifies check digits, computes missing check digits, and converts between GTIN formats","exampleAgentPrompt":"Can you validate the EAN-13 barcode 5901234123457 and tell me if the check digit is correct, and also give me its GTIN-14 equivalent?","exampleUseCases":[{"title":"Barcode check digit verification at ingest","prompt":"I'm processing a product feed and need to check whether this GTIN-13 barcode 4006381333931 has a valid check digit before importing it into our catalog."},{"title":"Compute missing check digit for label printing","prompt":"I have the partial GTIN-13 code 590123412345 without the last digit — can you calculate what the correct check digit should be?"},{"title":"Convert UPC-A to GTIN-14 for EDI","prompt":"Our EDI system needs GTIN-14 codes but our supplier sent us UPC-A barcodes like 012345678905 — can you convert that to GTIN-14?"}],"resultDescription":"Returns a JSON object with: whether the code is valid, the identifier type (e.g. gtin13, gln), the normalised code, the check digit and whether it is correct, the equivalent GTIN-14, any alternative valid interpretations (e.g. also_valid_as GLN), the reason for invalidity if applicable, and metadata including request ID, timestamp, price, and a determinism flag.","failureModes":["Missing 'value' query parameter returns an error","Non-numeric or malformed input (letters, wrong length) returns an invalid result or error","op=convert without a 'to' parameter returns an error","op=convert targeting a shorter format than the input (e.g. GTIN-8 from a GTIN-14) may be unsupported","Network or payment errors (402 payment required if x402 payment is not completed)"],"whenToPreferThis":"Choose this endpoint when you need purely structural/mathematical GS1 validation or format conversion without consulting a product database. It is ideal for data-pipeline validation, EDI preprocessing, label-printing workflows, or any scenario where you need to verify or compute check digits programmatically at low cost ($0.05/call). It does not look up product information — for that, use a product database API instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:45:31.827Z","isFirstParty":false,"canonicalSlug":"duo-data-utilities-gs1-identifier-validation-conversion-b123ed3e"}