# GS1 GLN Validator

> GS1 GLN 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 a 13-digit GS1 Global Location Number (GLN) using the GS1 mod-10 check digit algorithm, returning validity status, parsed check digit, and failure reason.

## Facts

- Endpoint: GET https://2s.io/api/validate/gln
- 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/gs1-gln-validator-2f6faa20
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S9WciUDpxkf0GCwBW0pf0

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 gs1-gln-validator-2f6faa20
```

Example prompt: Can you check whether this GLN is valid: 0614141999996? I want to make sure the check digit is correct before we send the EDI 856 shipment notice.

## When to prefer this

Use this endpoint when you need to verify the structural integrity of a GS1 GLN before using it in EDI transactions, supply chain systems, or trading partner onboarding. It is specifically valuable because it catches transposed-digit errors that a simple length check would miss. Prefer this over manual mod-10 computation or generic barcode validators when working with CPG, retail, or logistics workflows that rely on GS1 standards.

## Known failure modes

- Missing or empty gln query parameter — returns validation error
- GLN is not exactly 13 digits after stripping spaces/hyphens — returns invalid with reason about length
- Check digit does not match GS1 mod-10 calculation — returns valid:false with reason indicating check digit mismatch
- Non-numeric characters (other than allowed spaces/hyphens) — returns invalid with reason
- Payment not provided or insufficient — 402 Payment Required

## How this service works

Validate a GS1 GLN (Global Location Number) — 13 digits with the GS1 mod-10 check digit. GLNs identify trading parties and physical locations (ship-to, bill-to, warehouse) across CPG supply chains and EDI. Returns {valid, gln, checkDigit, reason}. Catches transposed digits a length check misses.

## Output

Returns a JSON object with: valid (boolean indicating if the GLN passes GS1 mod-10 check digit validation), gln (the normalized GLN string), checkDigit (the extracted check digit), and reason (a human-readable explanation if validation fails, e.g. transposed digits or wrong length).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "gln": "0614141999996"
  }
 }
}
```

## 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": [
      "gln"
     ],
     "properties": {
      "gln": {
       "type": "string",
       "description": "13-digit GLN (spaces/hyphens allowed)."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gs1-gln-validator-2f6faa20/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)
