GTIN hierarchy: GTIN-8/12/13/14 forms, GS1 prefix, packaging-level link

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/gtin-hierarchy · Id gtin-hierarchy

Takes up to 100 GTINs and, for an agent reconciling a product feed or order lines, validates each check digit, converts it to the 14-digit form, reads the indicator digit and GS1 Prefix (restricted-circulation, ISBN/ISSN range, coupon), and, when a parent GTIN is given, checks the two share one base item (the packaging-level link). It does not look up the brand owner, the product or the country of the issuing GS1 organisation, and does not check that a GTIN is registered.

What you get

Stops case and each-level GTINs being mixed up in a feed, and flags in-store (restricted) numbers before they leak into a marketplace listing.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/gtin-hierarchy. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/gtin-hierarchy \
  -H 'content-type: application/json' \
  -d '{"items":[{"gtin":"6291041500213"},{"gtin":"16291041500210","parent":"6291041500213"},{"gtin":"6291041500214"}]}'

Input

FieldTypeRequiredDescription
itemsarray<object>; max 100 itemsyes

Example request body

{
  "items": [
    {
      "gtin": "6291041500213"
    },
    {
      "gtin": "16291041500210",
      "parent": "6291041500213"
    },
    {
      "gtin": "6291041500214"
    }
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
resultsarray<object>no
countsobjectnoItems per status.
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the identifier-text-kit package.

Machine-readable