Skip to main content
GET
Compress Application Identifiers into a GS1 Digital Link path segment

Query Parameters

primary_ai
string
required

The primary identifier AI code, e.g. 01 for GTIN.

Required string length: 2 - 4
primary_value
string
required

The primary identifier's value, e.g. 09506000164908.

Required string length: 1 - 256
qualifier
string[]

Repeatable qualifier AI in code:value form, e.g. 10:LOT1.

attribute
string[]

Repeatable data-attribute AI in code:value form, e.g. 17:261231.

Response

OK

A GS1-compressed Digital Link path segment plus how it graded.

ai_map
Ai Map · object
required

The {ai_code: value} map that was compressed, echoed back for confirmation.

is_valid
boolean
required

True when the AI map compressed successfully.

error
string | null

Why compression failed, or null on success.

compressed_segment
string | null

The opaque base64url path segment, or null when compression failed.

Example:

"ARFKk4awWA"

compressed_path
string | null

The GS1-canonical root-relative compressed path (/<compressed_segment>), as served at id.gs1.org, or null when compression failed. Closient's own resolver serves compressed Digital Links under a /c/<segment> prefix instead — see docs.closient.com for why.

Example:

"/ARFKk4awWA"