Barcode Check (EAN / UPC / ISBN) API

Validate product barcodes (EAN-8, EAN-13, UPC-A, GTIN-14, ISBN-10/13, ISSN), compute check digits and find the GS1 prefix organisation, e.g. 893 = GS1 Vietnam.

GETPOSThttps://apibox.io.vn/v1/gtin-check

The barcode check API validates the numbers printed under product barcodes. It recognises EAN-8, UPC-A (12 digits), EAN-13 and GTIN-14 / ITF-14, verifies the GS1 mod-10 check digit and returns the normalised 14-digit GTIN used in GS1 data exchange. With compute=true it calculates the missing check digit of a number you are creating.

The first three digits are looked up in the GS1 prefix table: 893 is GS1 Vietnam, 690–699 China, 885 Thailand, 450–459 and 490–499 Japan, 978–979 books (ISBN), 977 magazines (ISSN), 200–299 in-store numbers. Note that the prefix tells which GS1 member organisation licensed the company number, not the country where the product was made. Books also get their ISBN-10 / ISBN-13 forms and periodicals their ISSN; ISBN-10 numbers (with X) are accepted directly.

The prefix table comes from GS1’s official list and is refreshed automatically every week.

Parameters

NameInTypeRequiredDefault
codequery|pathstringyesBarcode number (8, 12, 13 or 14 digits, or ISBN-10).
computequerybooleannofalseThe code has no check digit: compute it.

Example

curl "https://apibox.io.vn/v1/gtin-check?code=8934588012228" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "input": "8934588012228",
  "type": "EAN-13 (GTIN-13)",
  "valid": true,
  "check_digit": 8,
  "expected_check_digit": 8,
  "gtin14": "08934588012228",
  "gs1_prefix": {
    "prefix": "893",
    "range": "893",
    "name": "GS1 Vietnam",
    "country_code": "VN"
  },
  "note": "The prefix tells which GS1 member organisation issued the company prefix, not where the product was made.",
  "vietnam": {
    "gs1_prefix": "893",
    "organisation": "GS1 Việt Nam (Trung tâm Mã số Mã vạch Quốc gia)"
  }
}

Use cases

  • Validate barcodes typed or scanned in POS and inventory apps
  • Check product feeds for marketplaces (Shopee, Lazada, Tiki)
  • Generate check digits for new product codes
  • Convert between ISBN-10 and ISBN-13

FAQ

Does 893 mean “made in Vietnam”?

Not necessarily. 893 means the company number was issued by GS1 Vietnam; the product can be made elsewhere, and Vietnamese products can carry other prefixes.

How is the check digit computed?

Digits are weighted 3 and 1 alternately from the right; the check digit brings the sum to a multiple of 10.

Can it tell me the product name?

No, it validates the number and its prefix only. Product data lives in GS1 registries and retailer databases.

Related APIs

Start with 1,000 free requests every month. Get free API key →