Skip to main content
Version: Next

Identifiers API

The Identifiers API manages identifier schemes, identifiers, and links — the building blocks that connect physical or logical entities (products, facilities, organisations) to their digital credentials via an Identity Resolver (IDR). Identifier schemes define the rules for a class of identifiers (e.g. GTIN, ABN), identifiers are specific values under those schemes, and links are published references from an identifier to credential resources on an upstream IDR service.

Interactive API documentation

The Reference Implementation includes a Swagger UI at /api-docs with full request/response schemas you can try directly from the browser. The endpoint descriptions below focus on behaviour and internal logic — refer to Swagger for exact payload shapes. All endpoints require authentication — see Authentication for how to obtain a Bearer token.

Concepts

What is an identifier scheme?

An identifier scheme is a type definition for a class of identifiers — for example, GTIN (Global Trade Item Number), ABN (Australian Business Number), or SSCC (Serial Shipping Container Code). A scheme defines:

  • name — a human-readable label (e.g. "GTIN-14").
  • primaryKey — the key used in URI construction (e.g. "gtin", "abn").
  • validationPattern — a regular expression that every identifier value under this scheme must match.
  • linkTemplate — an ISO 18975 template for constructing resolver URIs (e.g. "/{primaryKey}/{value}").

Schemes are scoped to a tenant, but system-default schemes (created by the platform) are visible to all tenants.

Registrars

Every scheme belongs to a registrar — the authority that manages identifiers of that type (e.g. GS1 for GTINs). The registrarId is required when creating a scheme. See the Registrars API for managing registrar records.

Qualifiers

A scheme can optionally define qualifiers — sub-identifier dimensions that further refine an identifier. Common examples include batch number and serial number under a GTIN scheme. Each qualifier has:

FieldDescription
keyMachine-readable key (e.g. "lot", "ser")
descriptionHuman-readable label
validationPatternRegex for validating qualifier values
orderOptional sort order for display

When updating a scheme's qualifiers, the entire qualifier set is replaced — existing qualifiers are deleted and the new list is created in their place.

IDR service instance linkage

A scheme can optionally override which IDR service instance is used for link resolution via idrServiceInstanceId. If not set, resolution falls back to the registrar's IDR instance, then to the tenant's system default. See Link resolution chain for the full precedence order.

What is an identifier?

An identifier is a specific value under a scheme — for example, "09506000134352" under a GTIN scheme, or "51824753556" under an ABN scheme. When creating an identifier, its value is validated against the scheme's validationPattern; if the value does not match, the request is rejected with a 400 error.

Identifiers are strictly tenant-scoped — unlike schemes, they are not shared across tenants.

Relationship to master data entities

Identifiers can be linked to organisations, facilities, and products as either a primary identifier or one of several secondary identifiers. These relationships are managed on the entity side (e.g. primaryIdentifierId and secondaryIdentifierIds on a facility record), not on the identifier itself.

Links are published references from an identifier to credential resources hosted on an upstream IDR service. When you publish a link, the Reference Implementation:

  1. Resolves the appropriate IDR service instance.
  2. Calls the upstream IDR to register the link.
  3. Stores a local audit record (a LinkRegistration) capturing what was published.

Each link includes a linkType (the relationship type), a targetUrl (the credential resource URL), and a mimeType.

IDR resolution chain

When publishing, retrieving, updating, or deleting links, the system must determine which IDR service instance to use. The resolution follows a three-tier precedence chain:

  1. Scheme-levelIdentifierScheme.idrServiceInstanceId (highest priority)
  2. Registrar-levelRegistrar.idrServiceInstanceId
  3. System default — the tenant's primary IDR service instance, or the system-wide default

The first non-null value in this chain is used.

Desynchronisation handling

Because links exist on both the local database (as audit records) and the upstream IDR, the two can fall out of sync — for example, if a link is removed directly on the IDR outside of the Reference Implementation. The API handles this gracefully:

  • GET a link — if the link exists locally but is missing upstream, the response includes desync: true and a warning message, with the link field set to null.
  • PATCH a link — if the upstream link no longer exists, returns 409 Conflict with desync: true and an error message advising deletion of the local record.
  • DELETE a link — if the upstream link is already absent, the local record is still cleaned up (no error is raised).

Identifier Scheme Endpoints

Create an identifier scheme

POST /api/v1/schemes

Creates a new identifier scheme with optional nested qualifiers. The scheme is associated with a registrar and scoped to the authenticated tenant.

Required FieldDescription
registrarIdID of the parent registrar
nameHuman-readable scheme name
primaryKeyKey identifier used in URI construction (e.g. "gtin")
validationPatternRegex for validating identifier values
linkTemplateISO 18975 link template for URI construction
Optional FieldDescription
idrServiceInstanceIdOverride IDR service instance for this scheme
qualifiersArray of qualifier definitions (each requires key, description, validationPattern)

List identifier schemes

GET /api/v1/schemes

Returns identifier schemes for the authenticated tenant (including system defaults) with optional filtering. Results are paginated.

ParameterTypeDefaultDescription
registrarIdstringFilter by registrar ID
limitinteger20Maximum results per page (clamped to 100)
offsetinteger0Number of results to skip

Get an identifier scheme

GET /api/v1/schemes/{id}

Retrieves a specific identifier scheme by its database ID. The response includes the full qualifier list and the parent registrar. Returns schemes owned by the authenticated tenant or system defaults.


Update an identifier scheme

PATCH /api/v1/schemes/{id}

Updates one or more fields of an existing identifier scheme. At least one updatable field must be provided. System-default schemes cannot be updated — only schemes owned by the authenticated tenant.

Updatable FieldDescription
nameScheme name (must be non-empty if provided)
primaryKeyPrimary key identifier
validationPatternRegex validation pattern
linkTemplateISO 18975 link template
idrServiceInstanceIdIDR service instance ID (set to null to clear)
qualifiersReplacement qualifier array (replaces all existing qualifiers)

Delete an identifier scheme

DELETE /api/v1/schemes/{id}

Permanently deletes an identifier scheme. Only schemes owned by the authenticated tenant can be deleted — system defaults are protected.

Identifier Endpoints

Create an identifier

POST /api/v1/identifiers

Creates a new identifier after validating its value against the scheme's validationPattern. The scheme must exist and be accessible to the authenticated tenant (either tenant-owned or a system default).

Required FieldDescription
schemeIdID of the identifier scheme
valueThe identifier value (validated against scheme pattern)

List identifiers

GET /api/v1/identifiers

Returns identifiers for the authenticated tenant with optional filtering. Results are paginated.

ParameterTypeDefaultDescription
schemeIdstringFilter by identifier scheme ID
limitinteger20Maximum results per page (clamped to 100)
offsetinteger0Number of results to skip

Get an identifier

GET /api/v1/identifiers/{id}

Retrieves a specific identifier by its database ID. The response includes the full scheme with its registrar and qualifiers.


Update an identifier

PATCH /api/v1/identifiers/{id}

Updates the value of an existing identifier. The new value is re-validated against the scheme's validationPattern.

Updatable FieldDescription
valueNew identifier value (re-validated against scheme pattern)

Delete an identifier

DELETE /api/v1/identifiers/{id}

Permanently deletes an identifier. Only identifiers owned by the authenticated tenant can be deleted.

POST /api/v1/identifiers/{id}/links

Publishes one or more links for an identifier to the upstream IDR service. Each link is registered on the IDR and a local audit record is stored. Target URLs are validated for SSRF protection.

Required FieldDescription
linksNon-empty array of link objects (each requires linkType, targetUrl, mimeType; optional title)
Optional FieldDescription
qualifierPathQualifier path appended to the IDR link
descriptionDescription of the item being identified

GET /api/v1/identifiers/{id}/links

Returns link registration audit records for a specific identifier. The identifier must exist and belong to the authenticated tenant. Results are paginated.

ParameterTypeDefaultDescription
limitinteger20Maximum results per page (clamped to 100)
offsetinteger0Number of results to skip

GET /api/v1/identifiers/{id}/links/{linkId}

Retrieves a link by its IDR link ID. The response combines the live link data fetched from the upstream IDR with the local audit record. If the link exists locally but is missing from the upstream IDR, the response includes a desynchronisation warning.

Response FieldDescription
linkLive link data from the upstream IDR (or null if desynced)
localRecordThe local LinkRegistration audit record
desynctrue if the link is missing upstream (only present when desynced)
warningHuman-readable desync explanation (only present when desynced)

PATCH /api/v1/identifiers/{id}/links/{linkId}

Updates a link on the upstream IDR and syncs the local audit record. The href field is SSRF-validated if provided. If the upstream link no longer exists, returns 409 Conflict with a desynchronisation error.

Updatable FieldDescription
hrefNew target URL (SSRF-validated)
relNew link relationship type
typeNew MIME type

DELETE /api/v1/identifiers/{id}/links/{linkId}

Deletes a link from both the upstream IDR and the local audit record. If the link has already been removed from the upstream IDR (out-of-band), the local record is still cleaned up — no error is raised.