curl -i https://thingidentity.com/ehFB342CDE795211411234538566CB0AFC4
curl -i https://thingidentity.com/exMBZFlvQMDly-mRqD
curl -H "Accept: application/linkset+json" https://thingidentity.com/eh30164596F40C0E5CBE991A83
HTTP/2 307
location: /en-us/acme/level-bubbles/product-information-page?17=220630&21=32a%2Fb
cache-control: public, s-maxage=600, stale-while-revalidate=600
access-control-allow-origin: *
{ "status": 400, "error": "INVALID_GS1_DIGITAL_LINK" }
Resolve a compressed GS1 Digital Link
Resolve a GS1 Digital Link compressed in the EPC binary encoding, as eh (hexadecimal) or ex (Base64url).
GET
/
{compressedLink}
curl -i https://thingidentity.com/ehFB342CDE795211411234538566CB0AFC4
curl -i https://thingidentity.com/exMBZFlvQMDly-mRqD
curl -H "Accept: application/linkset+json" https://thingidentity.com/eh30164596F40C0E5CBE991A83
HTTP/2 307
location: /en-us/acme/level-bubbles/product-information-page?17=220630&21=32a%2Fb
cache-control: public, s-maxage=600, stale-while-revalidate=600
access-control-allow-origin: *
{ "status": 400, "error": "INVALID_GS1_DIGITAL_LINK" }
A compressed GS1 Digital Link carries the GTIN, its serial number and other Application Identifiers in one short
path segment, in the EPC binary encoding of the
GS1 EPC Tag Data Standard 2.3. The
code generator writes these links when
And these two, as a DSGTIN+ carries a date:
The filter value and the hostname encoded in the EPC are ignored: the link resolves on the host it was scanned
on.
compression is
EPC_HEX or EPC_BASE64.
The resolver decodes the segment into the uncompressed link and resolves it exactly like
GET /01/{gtin}: same query parameters, headers, redirects, linkset and
status codes. For example, these three requests get the same answer:
/eh30164596F40C0E5CBE991A83
/exMBZFlvQMDly-mRqD
/01/09528765123457/21/123456789123
/ehFB342CDE795211411234538566CB0AFC4
/01/79521141123453/21/32a%2Fb?17=220630
Path parameters
string
required
eh followed by the EPC in hexadecimal (case-insensitive), or ex followed
by the EPC in Base64url (A-Z, a-z, 0-9, -, _, no padding). 3 to 1024
characters in total. A trailing slash is ignored.Supported EPC schemes
Every scheme carries a GTIN and a serial number (AI21).
| Header | Scheme | Also carries |
|---|---|---|
30 | SGTIN-96 | Numeric serial number, without leading zeros. |
36 | SGTIN-198 | Serial number of up to 20 characters. |
F7 | SGTIN+ | Other Application Identifiers. |
FB | DSGTIN+ | A date (AI 11, 13, 15, 16, 17, 7006 or 7007), and other Application Identifiers. |
FC | DSGTIN++ (with a hostname) | The same as FB. |
FD | SGTIN++ (with a hostname) | The same as F7. |
How the link is decoded
- The consumer product variant (
22), lot (10), serial (21) and235become the key qualifiers of the uncompressed link, in that order. They are what the linksetanchorshows and what a redirect to the brand’s custom domain uses. - Every other Application Identifier, the date of a DSGTIN+ included, becomes a query parameter placed before the scan’s own query string.
Responses
The same asGET /01/{gtin}. A segment that does not decode is
400 Bad Request with INVALID_GS1_DIGITAL_LINK:
- a character outside the alphabet, or a segment shorter than 3 or longer than 1024 characters,
- a header other than those listed above,
- an Application Identifier the EPC encoding does not know, or data left after the last one (other than zero padding),
- the same Application Identifier twice with different values,
- a decoded link that is not a valid GS1 Digital Link, for example a GTIN with a wrong check digit.
curl -i https://thingidentity.com/ehFB342CDE795211411234538566CB0AFC4
curl -i https://thingidentity.com/exMBZFlvQMDly-mRqD
curl -H "Accept: application/linkset+json" https://thingidentity.com/eh30164596F40C0E5CBE991A83
HTTP/2 307
location: /en-us/acme/level-bubbles/product-information-page?17=220630&21=32a%2Fb
cache-control: public, s-maxage=600, stale-while-revalidate=600
access-control-allow-origin: *
{ "status": 400, "error": "INVALID_GS1_DIGITAL_LINK" }