# WritersLogic GTIN Hierarchy Validator

> WritersLogic GTIN Hierarchy Validator is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Validates up to 100 GTINs by checking their check digits, normalizing to 14-digit form, decoding GS1 prefix and indicator digit, and verifying parent-child packaging hierarchy links.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/gtin-hierarchy?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-gtin-hierarchy-validator-1ca9d362
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yEP-bK2XMv0PMLWppUVjz

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 writerslogic-gtin-hierarchy-validator-1ca9d362 -d '<json body>'
```

Example prompt: Can you validate these GTINs from our product feed — 00012345678905, 9780306406157, and 10012345678902 — and for the last one check that it's correctly linked as the case-level parent of 00012345678905?

## When to prefer this

Use this endpoint when you need fast, offline-style structural validation of GTINs without requiring network registry lookups — ideal for pre-import feed cleaning, order reconciliation, or packaging hierarchy checks. Prefer this over a full GS1 registry lookup when you only need format correctness and hierarchy consistency, not brand or product data. It is especially useful when processing large batches (up to 100) in a single call.

## Known failure modes

- GTIN string contains non-numeric characters — validation fails for that item
- GTIN length is outside valid ranges (8, 12, 13, or 14 digits) — rejected with format error
- Check digit is incorrect — flagged as invalid but other fields may still be decoded
- Parent GTIN provided has an invalid check digit itself — hierarchy check cannot proceed
- Batch exceeds 100 items — request rejected
- Empty items array — request rejected

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

For each submitted GTIN: whether the check digit is valid, the normalized 14-digit representation, the indicator digit, the decoded GS1 prefix with any special classification (restricted circulation, ISBN/ISSN range, coupon), and — when a parent GTIN is provided — whether the two GTINs share the same base item confirming the packaging-level link. Does not perform registry lookup, brand owner resolution, or country-of-origin identification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "items": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "gtin"
    ],
    "properties": {
     "gtin": {
      "type": "string",
      "maxLength": 32,
      "minLength": 1
     },
     "parent": {
      "type": "string",
      "maxLength": 32,
      "description": "Another GTIN that should be a packaging level of the same base item (for example the case GTIN-14 of a consumer unit)."
     }
    }
   },
   "maxItems": 100,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-gtin-hierarchy-validator-1ca9d362/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
