Validate an identifier's syntax
const url = 'https://api.listrar.com/v1/identifiers/validate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"namespace":"gtin","value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.listrar.com/v1/identifiers/validate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "namespace": "gtin", "value": "example" }'Pure syntax: check digit, length, and namespace. Never touches the database and never tells you whether the product exists. namespace: "auto" infers the namespace and returns status: "ambiguous" with candidates when more than one fits.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”The validation result, or ambiguous candidates.
object
Typed result status. Absence (‘not_found’, ‘unknown’) is an answer carried at HTTP 200, never a 404 — see ERROR_MODEL.md design rule 1. ‘not_found’ MUST NOT be softened (06 §9).
REQUIRED when status = ‘unknown’.
object
object
INFERENCE and ESTIMATION can never be promoted to FACT. See 10 §3.
REQUIRED for INFERENCE and ESTIMATION
object
object
What was actually consulted, so a caller can distinguish ‘does not exist’ from ‘not covered’. Present on absence and on batch responses.
object
object
Opaque cursor for the next page; absent means end of results. Cursor pagination only, never offset.
Up to four independent axes, never collapsed into one verdict (12 §5). A class is absent when no rule of that class has been evaluated for this subject — which is not the same as ‘not_assessed’, a recorded verdict.
object
object
object
Example
{ "status": "found", "reason": "NO_SOURCE", "claims": [ { "subject": "gtin14:04012345678901", "predicate": "dpp:carbonFootprintKgCO2e", "claim_type": "FACT", "verification_status": "unverified", "trust_level": "L0" } ], "sources": [ { "kind": "registry" } ], "meta": { "coverage": { "sources_skipped": [ { "reason": "LICENCE_RESTRICTED" } ] } }, "validation": { "technical": "pass", "business": "pass", "regulatory": "pass", "authority": "none" }, "warnings": [ { "severity": "info" } ]}Headers
Section titled “Headers”Echoes the envelope’s request_id.
UNSUPPORTED_NAMESPACE
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "retryable": true, "docs_url": "https://example.com"}UNAUTHENTICATED
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "retryable": true, "docs_url": "https://example.com"}TENANT_QUOTA_EXCEEDED
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "retryable": true, "docs_url": "https://example.com"}RATE_LIMITED
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "retryable": true, "docs_url": "https://example.com"}INTERNAL_ERROR
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "retryable": true, "docs_url": "https://example.com"}