# 2s.io GTIN Barcode Validator

> 2s.io GTIN Barcode Validator is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Validates product barcodes (GTIN-8/12/13/14, UPC-A, EAN-13, ISBN-10/13) using GS1 mod-10/mod-11 check digit logic and returns the canonical 14-digit GTIN-14 form.

## Facts

- Endpoint: GET https://2s.io/api/validate/gtin
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-gtin-barcode-validator-a4f322b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WH9bMmSWE2IDUpbE_FjGk

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-io-gtin-barcode-validator-a4f322b9
```

Example prompt: Is the barcode 036000291452 a valid UPC-A, and what's its canonical GTIN-14 form?

## When to prefer this

Use this endpoint when you need to validate and normalize any GS1 product identifier (UPC, EAN, GTIN, ISBN) to its canonical GTIN-14 form in a deterministic, single call — ideal for ETL pipelines, product master data deduplication, or any workflow where you'd otherwise need to implement GS1 mod-10/mod-11 checksum math yourself. Prefer this over LLM-based validation since it is deterministic and authoritative.

## Known failure modes

- Non-numeric or malformed input returns valid=false with a descriptive reason
- Barcode of unrecognized length not matching any GTIN/ISBN format returns valid=false
- Correct format but wrong check digit returns valid=false with the expected check digit
- Missing required gtin query parameter causes a 400 or error response
- Empty string input returns an error or valid=false

## How this service works

Validate a product barcode — GTIN-8/12/13/14, UPC-A, EAN-13, or ISBN-10/13 — with the GS1 mod-10 check digit (ISBN-10 uses mod-11). Returns {valid, type, gtin14 (canonical 14-digit form, left-padded), checkDigit, reason}. Normalizes every product identifier to one GTIN-14 key so a product-master/ETL pipeline can dedupe and validate SKUs in one deterministic call instead of doing checksum math in an LLM.

## Output

Returns a JSON object with: valid (boolean), type (e.g. 'UPC-A', 'EAN-13', 'ISBN-13'), gtin14 (the canonical 14-digit zero-padded form), checkDigit (the expected check digit), and reason (explanation of why the barcode is valid or invalid).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "gtin": "036000291452"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "gtin"
     ],
     "properties": {
      "gtin": {
       "type": "string",
       "description": "Barcode/identifier (spaces/hyphens allowed). GTIN-8/12/13/14 or ISBN-10/13."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-gtin-barcode-validator-a4f322b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
