Gs1 key validate

gs1-key-validate · version 1.0.0 · Identifiers & check digits · free, no key needed

Validate a GTIN-8/12/13/14, GLN, SSCC or GSIN's GS1 mod-10 check digit and look up its 3-digit GS1 prefix meaning.

Use when you need to: validate a gtin barcode number · check digit for an sscc pallet label · is this gln location number valid.

Decide before calling

Read the versioned contract and the supported scope below. Reuse gs1-key-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use gs1-key-validate@1.0.0 for validate a gtin barcode number. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "key": "4006381333931",
  "key_type": "gtin"
}

Response:

{
  "result": {
    "valid": true,
    "reason": null,
    "key_type": "gtin",
    "length": 13,
    "gtin14": "04006381333931",
    "gs1_prefix": "400",
    "prefix_usage": "member_organisation",
    "member_organisation": "GS1 Germany",
    "data_version": "gs1-central-prefix-snapshot-2026-10-01.gs1-syntax-dictionary-unknown-release"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "gs1-key-validate",
  "version": "1.0.0",
  "input": {
    "key": "4006381333931",
    "key_type": "gtin"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/gs1-key-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"key":"4006381333931","key_type":"gtin"}'

The machine-readable contract is at /v1/tools/gs1-key-validate/versions/1.0.0.

CLI

node cli.mjs run gs1-key-validate 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.