Primary identification keys
The following rules indicate which GS1 Application Identifiers (GS1 AI) for simple GS1 identifiers are considered as primary identification keys for GS1 Digital Link URI.
Release 1.7.0, Ratified Aug 2026
Enabling consistent representation of GS1 identification keys within web addresses to link to online information and services
Ⓒ 2026 GS1 AISBL Disclaimer
This section and its subsections are informative
GS1 defines a wide range of identifiers that underpin the supply chain and retail industry across the world. This document assumes the reader is familiar with these and the concept of GS1 Application Identifiers. If not, please see information on GS1 identification keys [GS1 ID Keys] and the GS1 General Specifications [GENSPECS] for further background.
This work has been motivated by a number of trends. For example: the desire among retailers to move to 2D barcodes that can carry more information than just the GTIN; the problems of multiple barcodes causing scanning errors through conflicts which suggests a need for a single but multipurpose barcode; the growing expectation among consumers that more information is available online about the products they’re considering buying; the brand owner concept of the pack as a media channel linking to multimedia experiences, and more.
As a result of this standard, it is possible to represent GS1 identification keys consistently within Web addresses as well as within barcodes containing Web addresses, such that a single identification approach can support both product identification for supply chain applications and a link to online material for consumer and business partner interactions. It’s this dual functionality and enormous flexibility that is currently not possible when, for example, Brand Owners embed an unstructured Web page address in QR Code symbology.
Note: Unless otherwise specified, the term ‘QR Code symbology’ refers to the widely used ISO/IEC 18004 QR Code symbology, excluding the GS1 QR Code that recognises the FNC1 character. ‘QR Code’ is a registered trademark of Denso Wave, a subsidiary of Denso Corporation. Both the ISO/IEC 18004 QR Code symbology and GS1 QR Code follow the encoding scheme described in ISO/IEC 18004 Information technology — Automatic identification and data capture techniques — QR Code bar code symbology specification, 3rd edition 2015-02-01.
The scope of the work accommodates all Tier 1 and Tier 2 GS1 identifiers and GS1 identifier extensions (e.g., serial number, batch number, consumer product variant) and other relevant attributes as the same technologies are equally applicable to SSCCs, GLNs, GIAIs, GRAIs, GSRNs etc. While the syntax can support Tier 2 GS1 identifiers, it is up to the Tier 2 Issuing Agencies to determine whether it’s fit for their use. For Tier 3 GS1 identifiers, GS1 welcomes bilateral discussions with Issuing Agencies to see where alignment is possible.
This GS1 standard references a number of third-party standards from the Internet Engineering Task Force (IETF) and the World Wide Web Consortium (W3C).
The original GS1 Digital Link standard comprised 4 key topics, all of which have been subject to revision. These have evolved as separate documents and are published as follows:
URI syntax (this document)
This document provides some of the background to the design of GS1 Digital Link, highlighting existing techniques and practices that underpin the World Wide Web, and applying those to the GS1 system. The normative portions set out the detailed syntax of Web addresses (HTTP URIs) that encode GS1 identifiers and GS1 informative data with exactly the same precision and expressivity as the GS1 AI-based GS1 element string syntax used across the GS1 system, notably in the GS1 General Specifications [GENSPECS]. The GS1 Digital Link URI syntax distinguishes between primary identification keys that express simple GS1 identifiers, such as GTIN and GLN, key qualifiers that express GS1 identifier extensions, such as batch/lot and GLN extension (forming compound GS1 identifiers), and attributes that express GS1 informative data such as expiry date and ship-to address. The GS1 Digital Link URI syntax is the foundation on which all other aspects of the standard are built and is synonymous with the term “GS1 Digital Link”.
Resolution (GS1-Conformant Resolver Standard)
A GS1 Digital Link URI is a particular form of URL and can be used in exactly the same way as any other URL (this is an important design feature). However, it can also be the gateway to multiple sources of information, both human and machine-readable. This document [DL-Resolution] defines how the GS1 identifiers in a GS1 Digital Link URI can be ‘resolved’ to those information sources in such a way that information systems and apps can discover them automatically and selectively via link types and link sets. Resolvers are what makes the standard operational for the GS1 community and the industries served.
Compression (GS1 Digital Link URI: Compression Technical Standard for EPC binary strings)
GS1 identifiers can be very efficiently encoded using the EPC binary syntax defined in the GS1 EPC Tag Data Standard [TDS]. EPC identifiers are read from passive UHF Gen2 tags as binary or hexadecimal strings. However, some data carriers (notably NFC tags or passive hybrid NFC/UHF Gen2 tags) support the reading of a URI. This document [DL-CompressionEPC] explains how GS1 identifiers in EPC binary syntax can be expressed as a special compressed form of a GS1 Digital Link URI and read from such tags for decoding/decompression into the equivalent GS1 Digital Link URI. This specification supersedes the compression/decompression algorithm defined in the legacy GS1 Digital Link Standard [DL-Legacy].
Semantics (GS1 Digital Link Standard)
This chapter of the GS1 Digital Link Standard [DL-Legacy] provides precise detail concerning what is expressed using GS1 Digital Link URIs (or using GS1 element strings), the implied hierarchical relationships between related GS1 Digital Link URIs and how we can express facts about entities identified using GS1 Digital Link URIs, in a structured machine-interpretable format using established Semantic Web/ Linked Data technology [Linked Data]. This document explains how the GS1 Web Vocabulary [WebVoc] is used for this purpose, however this work has evolved to be part of a broader effort to define the semantics or all GS1 Application Identifiers, and will be supported in a separate document once completed.
This document includes a lot of examples of GS1 Digital Link URIs such as:
https://example.org/414/{gln}/254/{glnExtension}
https://example.org/01/{gtin}
{?exp
}
The use of the monospace font indicates that the text has meaning for computers. Further, these examples follow the convention used in [RFC 6570]. The places where the values of variables should be inserted are written in braces, so, for example, {gtin} means "insert GTIN value here". All other text in the URI is a literal string to be used as written. As explained in [RFC 2606] and [RFC 6761], the domains example.com, example.org and example.net are second-level domain names reserved by the Internet Assigned Numbers Authority (IANA) for use in documentation. These should be understood as a placeholder for any registered second-level domain name.
Note: The example GS1 Digital Link URIs provided throughout this document are not configured to redirect to a demonstration Web page.
This section is normative
The core of this standard is expressed using ABNF grammar [RFC 5234] in section 4such that conformance can be determined with certainty. GS1 makes tools available that may be used to confirm conformance, in particular, the GS1 Barcode Syntax Resource [BSR] which is explained further in section 6.1.4.
Note that a GS1 Digital Link URI, like any Web URI or URL, does not have any intrinsic meaning. It may be treated in exactly the same way as any URL. It is only if it is parsed by a GS1-aware system that GS1 Application Identifiers and their values can be extracted and processed. Examples of such systems include scanners that may treat a GS1 Digital Link URI as an alternative syntax to GS1 element strings, and conformant GS1 resolvers. Applications SHALL NOT assume that a URL that follows the syntax defined in this standard will point to a resolver. One way to test whether a Web URI does or does not point to a GS1 conformant resolver is to check for the presence of a Resolver Description File in the relevant Well-Known location /.well-known/gs1resolver [RFC 8615]. Details of the Resolver Description File are defined in GS1-Conformant Resolver Standard [DL-Resolution].
NOTE: This standard discusses complete URIs encoded in data carriers such as QR codes, Data Matrix codes and NFC tags. The potential use of software to construct those URIs from components discovered through scans of, for example, UPC/EAN barcodes or GS1 DataMatrix symbols, is out of scope.
This section is informative
This section provides some clarification about what a Uniform Resource Identifier (URI) is, how URIs relate to Uniform Resource Names (URNs) and Uniform Resource Locators (URLs), as well as providing an explanation of the main structural elements within a Web URI.
Figure 3-1 shows a Venn diagram in which we see that Uniform Resource Identifier is the broad term that includes Uniform Resource Names (URNs) and Uniform Resource Locators (URLs) as well as URIs with various protocols including http or https, ftp, mailto, tel etc. This means that every URL and every URN is also a URI, since URI is the broader umbrella term. Furthermore, Internationalized Resource Identifiers (IRIs) are an even broader category that support characters from the Universal Character Set/Unicode, whereas URIs only support the ASCII character set. IRIs are defined in [IRIs]. GS1 Digital Link URIs are a subset of Web URIs that conform to this GS1 technical standard.
Figure 3-2 shows another Venn diagram. This time, it shows two capabilities:
The first capability is usually associated with URLs and Web addresses.
The second capability is usually associated with URNs.
Web URIs exist at the intersection of these two capabilities; in terms of their syntax, they look like URLs because they specify http or https as their protocol - and they can be configured to behave like URLs in terms of supporting Web requests via the http/https Web protocol. However, they are also a perfectly valid way of assigning a globally unambiguous name for anything, whether in the real world or online. Note that 'globally unambiguous' does not mean globally unique; two different things should have distinct URIs in any situation where we want to be able to distinguish between them. However, there may be many URIs that all refer to the same thing, even within the same URI namespace or domain name. It is also possible to use Linked Data [Linked Data] to make an assertion between two URIs to formally express that they both refer to the same thing, even if the URIs are different strings.
.
Figure 3-3 provides a brief overview of the internal structural elements of a Web URI:
Figure 3-3 shows the structural elements of a Web URI. The scheme indicates the protocol and (at the time of writing) is always http:// or https:// (use of HTTPS is more secure and is therefore recommended as best practice). The hostname is typically a registered Internet domain name or a subdomain of such a registered domain name. Following the domain name, the remainder of the Web URI is case sensitive. The URI path information consists of a number of strings separated by the forward slash character. Although this is just a string, it is often used by the Linked Datacommunity and in REST interfaces [REST] to represent a collection of resources organised in a conceptually hierarchical way, with the broadest (most general, least specific) category appearing towards the left of the URI path information and with the narrowest (most specific) category appearing towards the right of the URI path information.
This design pattern provides a hint to humans that related Web URIs may exist and can be formed by successively truncating the Web URI path information from right to left, removing each successive segment preceded by its forward slash ( "/" ) character. These related Web URIs may provide information about an object at a broader, more general, less specific granularity.
However, this is only a legible hint to humans. Computer software would typically treat the entire URI (at least up to the fragment identifier) as an opaque indivisible string and would not attempt such truncation. Instead, they will look for explicit links to related URIs, ideally expressed with semantic annotation, using Linked Data properties [Linked Data]. These aspects – the machine-processable semantics or meaning of a GS1 Digital Link URI – are explored and defined in detail in GS1 Digital Link Standard [DL-Legacy].
The query string enables multiple key=value pairs to be sent to a Web resource. The URI query string appears after the URI path information and consists of everything between the "?" at the end of the path information and the end of the URI or the "#" symbol indicating the start of the fragment identifier. Within the URI query string, key=value pairs may be concatenated using & or ; as a delimiter.
The URI fragment identifier is optional and appears after the query string (if present) and preceded by the "#" character. The URI fragment identifier is typically used to provide a link to an internal subsection of an information resource. The Linked Data community do make use of URIs with fragment identifiers, although the fragment identifier is not useful for passing key=value pairs. Importantly, fragment identifiers are not sent to the server but are handled entirely within the client.
Web URIs provide essentially two options for expressing the values of GS1 Application Identifiers - either within the URI path information or within the URI query string. The URI path information is the most appropriate place for expressing a simple GS1 identifier as a primary identification key, and an ordered set of optional GS1 identifier extensions as key qualifiers, used in conjunction with the simple GS1 identifier to form a compound GS1 identifier that is used to retrieve information about something at a finer level of granularity (e.g. traceability data about an serialised GTIN, batch/lot-level master data). The query string is appropriate for GS1 informative data, which are descriptive data attributes of the identified resource that have no intrinsic hierarchy, such as expiry date, weight etc., as well as being a natural extension point for any additional arbitrary key=value pairs that cannot be expressed using GS1 Application Identifiers (see section 4.10.1 ); for example, the query string could include a key=value pair to indicate a specific stakeholder role or a specific action or activity or type of service to be accessed. It should be noted that no key=value pair should be repeated with the same primary identification key in the URI query string. If a primary identification key is repeated, the last defined value for that primary identification key takes precedence over any previously defined value.
GS1 Digital Link provides a syntax for expressing GS1 identifiers, with or without GS1 identifier extensions and GS1 informative data in a format that can be used on the Web in an intuitive manner (via a straightforward HTTP request) to enable consumers and others to directly access relevant information and services about products, assets, locations, etc. A GS1 Digital Link URI can be encoded natively in any data carrier that can support the encoding of a Web address (URL). This means that additional data carriers such as QR Code symbology, digital watermarks, NFC tags and other technologies will also be able to include GS1 identifiers, while continuing to provide links to relevant information. When the data carrier is created and such a URL is embedded within it, a scanning device can extract the entire URL and no further processing by the scanning device, or software therein, is required to construct the URL that is used to access a server where relevant information is stored.
This section and all its subsections are normative
This section specifies the structure of GS1 Digital Link URIs using the Augmented Backus-Naur Form (ABNF) syntax as defined in [RFC 5234] and updated by [RFC 7405]. ABNF formally expresses how strings of characters (including URIs) are constructed by concatenating smaller components in a sequential order and is machine-processable.
Those smaller components may be defined in terms of further sub-components and/or in terms of sequences of character sets that are also defined by rules.
ABNF also supports repeating components and optional components. Optional components are enclosed within square brackets.
A sequential group of one or more components may be enclosed within round brackets.
Repeating components use the
m*n(component)
notation to indicate that the component within the round brackets may appear at least
m
times and at most
n
times. Default values are
m
=0,
n
=infinity. If either or
m
or
n
are omitted, their default values are assumed.
Everything following a semicolon on a line is considered to be an explanatory comment.
The notation
n(component)
or
n
component
where
n
is one or more digit characters is equivalent to
n*n(component)
, indicating that the component must appear exactly n times.A number of comments are provided to explain the meaning of rules.
ABNF is designed primarily to express formal syntax in standards documents. It may also be used to validate strings against that syntax, however, there are limitations. It has no negation option (string SHALL NOT contain “xyz”) and it does not support non-greedy matching. For this reason, there are some features of the GS1 Digital Link URI syntax that cannot be tested using ABNF-based parsers. In particular, those with a custom path will fail ABNF-based validation.
In common with the GS1-Conformant resolver standard [DL-Resolution], the GS1 Digital Link URI syntax is itself conformant with Encoding and resolving identifiers over HTTP [ISO/IEC 18975].
Earlier versions of the formal grammar below, developed initially for the first version of the GS1 Digital Link standard [DL1], supported ‘convenience alphas’ in place of commonly used GS1 Application Identifiers. For example, ‘01’ could be replaced by ‘gtin’, ‘414’ by ‘gln’ etc. These were introduced in an effort to make GS1 Digital Link URIs more developer-friendly. Experience has shown that the opposite is true as it introduced complexity, confusion and inconsistency for implementations of the standard. At the time of writing, there are many implementations of GS1 Digital Link by scanning equipment manufacturers and barcode generating tools. The majority of these do not recognise convenience alphas and the small number of known implementations that do are being updated to remove them. Convenience alphas were marked as deprecated in version 1.2 of the standard and have been removed completely as of version 1.3.0.
As of version 1.4.0, the GS1 Digital Link standard: URI syntax now expects the GTIN value to be expressed using 14 digits, for consistency with how a GTIN value is expressed in GS1 element strings. This means that the value of a GTIN-8, GTIN-12 or GTIN-13 SHALL be prefixed with leading zeroes serving as filler digits to reach a total of 14 digits, exactly as explained in section 2.1.1.10 of the GS1 General Specifications.
Important:For reasons of backwards compatibility, only existing infrastructure for GS1 Digital Link SHOULD continue to support legacy expressions of GS1 Digital Link URIs. Legacy expressions of GS1 Digital Link URIs include GTIN values with fewer than 14 digits and the deprecated convenience alphas. New implementations are not expected to support legacy expressions and deprecated features.
Firstly, a number of character sets are defined for later re-use in subsequent ABNF rules.
The following characters must be represented using percent-encoding (see section 2.1 of RFC 3986 [PercentEncoding]) when used as literal characters within URIs, since many of these have special meanings within Web URIs:
The following group of symbol characters is permitted within the 82-character subset of ISO/IEC 646, indicated in Figure 7.11-1 of the GS1 General Specifications [GENSPECS].
The following group of symbol characters is permitted within the 39-character subset of ISO/IEC 646, indicated in Figure 7.11-2 of the GS1 General Specifications [GENSPECS].
The following group of symbol characters is permitted within the 64-character subset of ISO/IEC 646, indicated in Figure 7.11-3 of the GS1 General Specifications [GENSPECS].
The following character set corresponds to all permitted characters within the 82-character subset of ISO/IEC 646, indicated in Figure 7.11-1 of the GS1 General Specifications [GENSPECS].
The following character set corresponds to all permitted characters within the 39-character subset of ISO/IEC 646, indicated in Figure 7.11-2 of the GS1 General Specifications [GENSPECS]. It is currently only used within the value of the Components and Parts Identifier (CPID).
The following character set corresponds to all permitted characters within the 64-character subset of ISO/IEC 646, indicated in Figure 7.11-3 of the GS1 General Specifications [GENSPECS].
The following rules indicate which GS1 Application Identifiers (GS1 AI) for simple GS1 identifiers are considered as primary identification keys for GS1 Digital Link URI.
The following rules indicate which GS1 Application Identifiers (GS1 AI) for GS1 identifier extensions are considered as key qualifiers for a GS1 Digital Link URI. The combination of a primary identification key and key qualifier forms a compound GS1 identifier.
The following rules express the format of the values of the primary identification keys.
Note : the GS1 General Specifications [GENSPECS] define further restrictions on some of these values, particularly for those which include a GS1 check digit, GS1 check character pair, indicator digit or extension digit. Please refer to the GS1 General Specifications [GENSPECS] for further details.
The following rules express the format of the values of the key qualifiers of primary identification keys:
The following rules express how each primary identification key code and its value should be concatenated (for use within the URI path information):
The following rules express how each key qualifier and its value should be concatenated (for use within the URI path information):
The following rules express how the URI path information should be structured for each primary identification key. Note that some primary identification keys such as SSCC do not have any associated key qualifier. Other primary identification keys such as GTIN, may have multiple key qualifiers. The square bracket notation indicates that the enclosed key qualifier component may be omitted but the sequence in which they appear is important and must be preserved. For example, the rule for gtin-path would permit any of these:
/01/09520123456788/22/2A/10/ABC123/21/12345XYZ
/01/09520123456788/10/ABC123/
/01/09520123456788/10/ABC123/21/12345XYZ
/01/09520123456788/21/12345XYZ
but does not permit strings such as:
/01/09520123456788/21/12345XYZ/10/ABC123
in which the sequential ordering of the key qualifier components is not preserved.
The following rule simply states that any of the above is considered as a gs1path (which will be referenced in a later rule).
The following rules are concerned with GS1 Application Identifiers for GS1 informative data that are considered to be data attributes rather than primary identification keys or key qualifiers. Data attributes and their values SHALL be expressed via the URI query string as key=value pairs.
Note that ‘data attributes’ MAY include GS1 AIs that may also be used as primary identification keys and key qualifiers, as defined in sections 4.3 and 4.4. This is because the GS1 General Specifications [GENSPECS] defines GS1 element strings which allow multiple GS1 identifiers (i.e., simple GS1 identifiers or compound GS1 identifiers). For example, it is possible to encode both a GTIN and a GIAI in a single GS1 element string within a data carrier (see the example in section 5.11). Where it is necessary to encode more than one GS1 identifier in a single GS1 Digital Link URI, one GS1 identifier SHALL be expressed as the primary identification key (with any relevant key qualifiers) in the path and the remaining GS1 identifier (with any relevant key qualifiers) SHALL be expressed as a data attribute in the query string.
Batch/Lot, which is defined as a key qualifier in sections 4.5 and 4.6, may also be used as a data attribute in conjunction with an SSCC [AI (00)] and a CONTENT [ AI (02)] in order to indicate that the SSCC contains GTINs of a specific batch/lot. For this reason, lotParameter is defined for use within the URI query string.
lotParameter = lot-code "=" lot-value
Expiry Date [ AI (17)] and Expiry Date/Time [ AI (7003)] are data attributes.
expiryDateParameter = "17=" 6DIGIT
expiryTimeParameter = "7003=" 10DIGIT
Note that the following data attributes are intentionally omitted:
The URI query string is a natural extension point within the syntax that can accommodate additional key=value pairs to express data attribute parameters that cannot be expressed using GS1 Application Identifiers. Examples of such usage may be to express a specific role, action, activity or type of service to be accessed. The following extensionParameter is based on the ABNF rule for query appearing in [RFC 3986] and serves as the main extension point for the GS1 Digital Link URI syntax. It permits multiple arbitrary key=value pairs to be included within the query string of a GS1 Digital Link URI. Any key=value pairs used for extension data SHALL NOT use all-numeric keys to avoid conflict with existing and future keys used for GS1 Application Identifiers either in terms of semantics or syntax; nor should they be used to express a value (such as a value for net weight) if that value can be expressed using GS1 Application Identifiers as data attributes. As detailed in GS1-Conformant Resolver Standard [DL-Resolution], the keywords
linkType and context are also reserved and SHALL NOT be used except as defined in those sections.
For example, 23P=12098 is a valid extensionParameter, whereas
236=12098 is an invalid extensionParameter because as an all-numeric key, it might in future collide with [AI (236)], which is reserved for future assignment as a GS1 Application Identifier. Please refer to section 4.11
Constructing the GS1 Digital Link URI to see further details about the rule for
everythingExceptDigitsAndEquals.
The following rule states that any of the above parameters for data attributes may appear as a query string parameter (queryStringParam), referenced later.
The following rules are derived from rules appearing in [RFC 3986] and are used for defining the general structure of a Web URI. These are particularly relevant for GS1 Digital Link URIs that are not under the id.gs1.org domain.
Finally, the following four rules define the syntax of a reference GS1 Digital Link URI (see section 4.12 ) from the concatenation of previously defined components:
The following rules define the syntax of a non-reference GS1 Digital Link URI from the concatenation of previously defined components. An example of usage of a non-reference GS1 Digital Link URI is when a company chooses to use their own registered Internet domain name to construct the Web URI but aligns with this specification for the format of the final part of the URI path information and query string. Note that zero or more path segments are permitted to appear after the hostname or domain name and before the start of the gs1uriPattern defined in this specification.
The formal ABNF syntax for the URI should be read in combination with the GS1 General Specifications [GENSPECS] to ensure appropriate usage of GS1 Application Identifiers that represent data attributes of identified things. In particular, section 4.13 of the GS1 General Specifications [GENSPECS] provides guidance about data relationships, including invalid pairs of element strings (see section 4.13.1) and mandatory associations of element strings (see section 4.13.2). In the GS1 General Specifications [GENSPECS], section 2 specifies which GS1 identifiers are used for an application, section 3 provides definitions for each GS1 Application Identifier, while section 4 explains the management rules for each GS1 identification key.
As previously mentioned, some GS1 identifiers include GS1 check digits or GS1 check character pairs and some also include indicator digits or extension digits that are to be used for specific purposes. Section 7 of the GS1 General Specifications [GENSPECS] provides details of AIDC validation rules and section 7.2.7 explains the GS1 check digit calculation. Nothing in this GS1 specification changes the existing validation rules that apply to the values of GS1 Application Identifiers; this document only specifies how valid GS1 AI values shall be expressed in the GS1 Digital Link structure.
Any URI that conforms to the formal syntax as defined above and that respects the relevant rules specified in the GS1 General Specifications [GENSPECS] as cited is:
A GS1 Digital Link URI can be constructed in any domain name, may contain additional key=value pairs in the query string and so on. This flexibility is a deliberate feature of the standard to support its use in as many scenarios as possible and to ensure brands can remain in control of the domains they use.
However, in some contexts (e.g., to support carriers that cannot embed a Web URI) it is necessary to identify a single well-known or default version of the GS1 Digital Link URI. This is defined in [RFC 6596] as the canonical URI. We define the canonical URI as follows:
linkType
and
context
,
and their values, are not included in the canonical GS1 Digital Link.
It follows that the canonical version of
http://example.com/01/09520123456788/22/2A?linkType=gs1:traceability
is
https://id.gs1.org/01/09520123456788/22/2A
Some further points of clarification:
This section is informative
https://id.gs1.org/01/09520123456788
is the canonical Digital Link URI for GTIN
9520123456788
equivalent to the following GS1 element string:
(01)09520123456788
The following are further valid non canonical GS1 Digital Link URIs for GTIN
9520123456788
using a custom domain name e.g., example.com instead of
id.gs1.org
https://brand.example.com/01/09520123456788
https://brand.example.com/some-extra/pathinfo/01/09520123456788
https://id.gs1.org/01/09520123456788/22/2A
is the canonical GS1 Digital Link URI for GTIN
9520123456788
combined with Consumer Product Variant
'2A'
and equivalent to the following GS1 element string:
(01)09520123456788(22)2A
The following are further valid non canonical GS1 Digital Link URIs for GTIN
9520123456788
combined with Consumer Product Variant
'2A'.
https://brand.example.com/01/09520123456788/22/2A
https://retailer.example.com/01/09520123456788/22/2A
https://id.gs1.org/01/09520123456788/10/ABC123
is the canonical GS1 Digital Link URI for GTIN
9520123456788
combined with Batch/Lot
'ABC123'
and equivalent to the following GS1 element string:
(01)09520123456788(10)ABC
123
The following are further non canonical valid GS1 Digital Link URIs for GTIN
9520123456788
combined with Batch/Lot
'ABC123'
https://brand.example.com/01/09520123456788/10/ABC123
https://retailer.example.com/01/09520123456788/10/ABC123
https://id.gs1.org/01/09520123456788/21/12345
is the canonical GS1 Digital Link URI for GTIN
9520123456788 combined with Serial Number '12345'
and equivalent to the following GS1 element string:
(01)09520123456788(21)12345
The following are further valid GS1 Digital Link URIs for GTIN
9520123456788
combined with Serial Number
'12345'
https://brand.example.com/01/09520123456788/21/12345
https://retailer.example.com/01/09520123456788/21/12345
https://id.gs1.org/01/09520123456788/10/ABC1/21/12345?17=180426
is the canonical GS1 Digital Link URI for GTIN
9520123456788
combined with Batch/Lot
'ABC1'
and Serial Number
'12345'
and with an expiry date of 26th April 2018, equivalent to the following GS1 element string:
(01)09520123456788(17)180426(10)ABC1(21)12345
The following is also a valid non canonical GS1 Digital Link URI for GTIN
9520123456788
combined with Batch/Lot
'ABC1' and Serial Number
'12345'
and with an expiry date of 26th April 2018.
https://example.com/01/09520123456788/10/ABC1/21/12345?17=180426
https://id.gs1.org/01/09520123456788?3103=000195
is the canonical GS1 Digital Link URI for GTIN
9520123456788
combined with a net weight of 0.195 kg equivalent to the following GS1 element string:
(01)09520123456788(3103)000195
The following is a further valid non canonical GS1 Digital Link URI for GTIN
9520123456788
combined with a net weight of 0.195 kg :
https://example.com/01/09520123456788?3103=000195
https://example.com/01/09520123456788?3103=000195&3922=0299&17=201225
This GS1 Digital Link URI includes three data attributes for the given GTIN, which can be in any order in the query string. The equivalent GS1 element string is:
(01)09520123456788(3103)000195(3922)0299(17)201225
The following GS1 Digital Link URIs are also equivalent, but only the final is canonical as the data attributes have been arranged in the lexical order of the GS1 AIs.
https://id.gs1.org/01/09520123456788?3103=000195&3922=0299&17=201225
https://id.gs1.org/01/09520123456788?17=201225&3103=000195&3922=0299
https://id.gs1.org/00/195201234567891232
is the canonical GS1 Digital Link URI for SSCC
195201234567891232
equivalent to the following GS1 element string:
(00)195201234567891232
The following is a further valid non canonical GS1 Digital Link URI for SSCC
195201234567891232:
https://example.com/00/195201234567891232
https://id.gs1.org/00/195201234567891232?02=09520123456788&37=25&10=ABC123
is the canonical GS1 Digital Link URI for SSCC
195201234567891232
containing a count [AI (37)] of 25 instances of Content [AI (02)]
09520123456788
having Batch/Lot identifier [AI (10)]
'ABC123'
equivalent to the following GS1 element string:
(00)195201234567891232(02)09520123456788(37)25(10)ABC123
The following is a further non canonical valid GS1 Digital Link URI for SSCC
195201234567891232
containing a count [AI (37)] of 25 instances of Content [AI (02)]
09520123456788
having Batch/Lot identifier [ AI (10)]
'ABC123':
https://example.com/00/195201234567891232?02=09520123456788&37=25&10=ABC123
https://id.gs1.org/414/9520123456788
is the canonical GS1 Digital Link URI for GLN
9520123456788
equivalent to the following GS1 element string:
(414)9520123456788
https://id.gs1.org/414/9520123456788/254/32a%2Fb
is the canonical GS1 Digital Link URI for GLN
9520123456788
combined with a GLN extension
'32a/b'.
Note that because the forward slash character has a special meaning within Web URIs, it is replaced with
%2F, its percent encoding, when it is being used as a literal value, rather than as a URI path separator, as defined in section 4.2.
It is equivalent to the following GS1 element string:
(414)9520123456788(254)32a/b
The following is also a valid but non canonical GS1 Digital Link URIs for GLN
9520123456788:
https://example.com/414/9520123456788
The following is a further valid non canonical GS1 Digital Link URI for GLN
9520123456788
combined with a GLN extension
'32a/b':
https://example.com/414/9520123456788/254/32a%2Fb
https://example.com/8004/9520614141234567?01=09520123456788
https://example.com/01/09520123456788?8004=9520614141234567
Both of these GS1 Digital Link URIs express the same combination of GS1 Application Identifiers. However, they are not equivalent. For the first example, in which the GIAI appears in the URI path information, the issuer of that GIAI asset identifier is the authority, whereas for the second example in which the GTIN is in the URI path information, the licensee of the GTIN (typically the brand owner or manufacturer) is the authority for that GS1 Digital Link URI. Although both identify an item with GIAI
9520614141234567
that is an instance of GTIN
9520123456788, the choice of which identifier to place in the URI path information makes a difference from a semantic perspective. The first example expresses that "this thing is an asset identified by this GIAI – and it is/was also a product identified by this GTIN." The second example expresses that this is a product and that it also carries this asset identifier. The second example is unlikely to be encoded by the manufacturer or brand owner in a data carrier except when an instance of a product is manufactured for a specific known customer/asset owner. Most mass-produced products are made to stock rather than made to order/bespoke. This is an example where there are two GS1 identifiers in a single GS1 Digital Link URI, but only one can be expressed as the primary identification key. The equivalent GS1 element string is
(01)09520123456788(8004)9520614141234567
Although there are no specific rules about which of the two GS1 identifiers should go in the path as the primary identification key and which in the query string as a data attribute, the order is likely to be determined by the context. In this example, the GIAI will be assigned by the owner of the item who purchased it from the manufacturer who assigned the GTIN. In this scenario, it is the owner who would create the GS1 Digital Link URI and therefore it is very likely to be the GIAI that goes in the path – the owner’s primary identification key – rather than the manufacturer. The presence of multiple GS1 identifiers and the decision on which serves as the primary identification key has an effect on the semantics that can be inferred from the URI. See GS1 Digital Link Standard for more on this topic [DL-Legacy].
This section is normative
The use of GS1 Digital Link URIs in data carriers is governed by the GS1 General Specifications [GENSPECS]. That document defines the full GS1 system from the semantics of individual GS1 Application Identifiers and their permitted values, through to data carrier positioning and human-readable information and much more besides.
The following subsections supplement the GS1 General Specifications [GENSPECS] as they pertain specifically to GS1 Digital Link.
There is no special character that can be included in a data carrier to indicate that what follows is a GS1 Digital Link URI. This is because there is no special character in any data carrier to indicate that what follows is a URL – and GS1 Digital Link URIs are URLs. This is a deliberate and important design feature: a general purpose scanning application, such as a consumer’s mobile device, can scan a GS1 Digital Link URI and treat it like any other URL.
Applications might, however, want to recognise a GS1 Digital Link URI and, for example, make use of the GS1 identifiers or execute specific queries against a resolver. Therefore, some processing is necessary by the scanner to determine whether the string of characters is or is not conformant to this and other GS1 standards.
A scanner working within the GS1 system that recognises GS1 Digital Link SHALL only pass on the scanned string if it has determined that it is plausibly a conformant GS1 Digital Link URI. It is not required to carry out a full validation, which is left to the receiving application.
We offer a method based on regular expression matches for making this determination in sections 6.1.1 to 6.1.3, and a method using the GS1 Barcode Syntax Resource in section 6.1.4, but any method is acceptable. It does not give an absolute assurance that the string is a conformant GS1 Digital Link URI, rather it detects strings that are definitely not and plausibly are GS1 Digital Link URIs. This is in line with many scanning applications that will recognise the presence of indicator characters at the start of a barcode and act accordingly but will not process the scanned string further before passing it to a receiving application.
The following regular expression will match a valid uncompressed GS1 Digital Link URI as defined in this specification. It is unlikely, although, not impossible, that it will match a URL that is not also a conformant GS1 Digital Link URI. Failure to match means it definitely is not an uncompressed GS1 Digital Link URI.
In addition to the GS1 Digital Link syntax, all regular expressions provided below support the inclusion of a user name and port number in the URL. These are rarely used in practice but are part of the formal URL syntax.
RE1:
^(https?|HTTPS?):(\/\/((([^\/?#]*)@)?([^\/?#:]*)(:([^\/?#]*))?))?([^?#]*)(((\/(01|8006|8013|8010|414|415|417|8017|8018|255|00|253|401|402|8003|8004)\/)(\d{4}[^\/]+)(\/[^/]+\/[^/]+)?[/]?(\?([^?\n]*))?(#([^\n]*))?))
The following regular expression, RE2, will match a compressed or partially compressed GS1 Digital Link URI as defined in the GS1 Digital Link standard [DL-Legacy], with the same caveats as for RE1.
RE2:
^(https?|HTTPS?):(\/\/((([^\/?#]*)@)?([^\/?#:]*)(:([^\/?#]*))?))?([^?#]*)((\/[0-9A-Za-z_-]{10,}$))
The following regular expression, RE3, will match a compressed or partially compressed GS1 Digital Link URI using the ‘eh’ or ‘ex’ flags, as defined in GS1 Digital Link URI: Compression Technical Standard for EPC binary strings [DL-CompressionEPC], with the same caveats as for RE1.
RE3:
^(https?|HTTPS?):(\/\/((([^\/?#]*)@)?([^\/?#:]*)(:([^\/?#]*))?))?([^?#]*)((\/(eh[0-9a-f]*|ex[a-zA-Z0-9_-]*)$))
As a further warning, recall that a GS1 Digital Link URI may contain arbitrary path segments between the domain name and the primary identification key. It is unlikely but possible that those path segments will all be numeric. For legacy compressed GS1 Digital Link URIs, it is also possible that the compression algorithm may create an all-numeric output. RE2 must allow for this but the downside is that a URL like https://example.com/0123/456789012340123, which is not a valid uncompressed GS1 Digital Link URI and will fail to match RE1, will match RE2. RE3 does not have this specific limitation, since compressed strings matched by RE3 must begin with the eh or ex flag as defined by the GS1 Digital Link URI: Compression Technical Standard for EPC binary strings [DL-CompressionEPC].
NOTE: The GS1 Digital Link standard [DL-Legacy] defines a legacy algorithm for compression/decompression, that will not be maintained after version 1.1.4. Compressed GS1 Digital Link URIs that use the legacy specification are not expected to be used in any future Application Standards and are not approved for use in open supply chain standards. Compressed GS1 Digital Link URIs using the ‘eh’ or ‘ex’ flags defined by the GS1 Digital Link URI: Compression Technical Standard for EPC binary strings [DL-CompressionEPC] are the form expected to be used in future Application Standards and approved for use in open supply chain standards. For further information please refer to Application Standard Profile 4 in the GS1 General Specifications [GENSPECS].
Noting the limitations of regular expressions in the previous sections, we do not recommend combining RE2 or RE3 with RE1. Rather, the recommended procedure is that for a given input string:
If a given string matches RE1, it plausibly is an uncompressed GS1 Digital Link URI.
If it doesn’t match that, but does match RE2 or RE3, then it plausibly is a compressed GS1 Digital Link URI.
If it matches none of the regular expressions here, it definitely is not a conformant GS1 Digital Link URI, compressed or otherwise.
While Regular Expressions provide a pattern-matching mechanism to determine whether a given data string is plausibly a GS1 Digital Link URI, the GS1 Barcode Syntax Resource [BSR] applies a dictionary-driven approach: https://ref.gs1.org/tools/gs1-barcode-syntax-resource/.
Unlike static patterns, the BSR first evaluates whether the input string resembles a URI and then validates the GS1 Application Identifiers and their associated values according to the rules defined by the GS1 General Specifications [GENSPECS] and this specification. This enables the BSR to determine whether the data string can be interpreted as a conformant GS1 Digital Link URI and processed as such by a GS1-aware system.
The BSR can detect a wide range of syntactical errors, including common errors related to GS1 AI structure, value formats, and data relationships. However, it does not aim to address all possible validation scenarios. In particular, it may not detect complex or context-dependent issues, such as ambiguous or non-compliant character usage within URI components. Such checks may require additional processing that may be developed as a user-specific requirement, beyond the scope of the BSR.
This standard defers entirely to the GS1 General Specifications [GENSPECS] for rules concerning human-readable interpretation.
The glossary lists the terms and definitions that are applied in this document. Please refer to the ref.gs1.org/glossary for the online version.
The single GS1 Digital Link standard version 1.1 [DL 1.1] has been split into four separate documents:
GS1 Digital Link Standard: URI syntax (this document)
GS1-Conformant Resolver Standard (formerly, GS1 Digital Link Standard: Resolution)
GS1 Digital Link Standard: Compression and decompression
GS1 Digital Link Standard: Semantics
The canonical version of a GS1 Digital Link URI, section 4.12 , is now defined as using HTTPS and the key=value pairs in the query string are now sorted in lexical order of the AIs.
AIs in the 410-416 range, except 414 and 417, have been removed from the list of primary identification keys ( section 4.3 ).
The ABNF grammar has been updated to support new AIs in the range 4300-4326 introduced in the GS1 General Specifications as a result of GS1 Scan4Transport.
AIs 3950 – 3953 added
ABNF for extension parameters made more precise to match normative text
All primary identification keys can be included in the query string to accommodate situations where a single URI needs to carry more than one primary identification key ( section 4.10 ).
Convenience alphas deprecation notice (previously section 4.1 , 4.13)
New paragraph emphasising that GS1 Digital Link URIs do not have to, and SHALL NOT be assumed to, point to a resolver ( section 2 ).
Updated introduction.
Example GS1 identifiers changed to use the 952 prefix.
AIDC Considerations section added, including regular expressions for determining strings that definitely are not, or plausibly are, GS1 Digital Link URIs.
A number of minor inaccuracies were detected in how the URI syntax reflected the definition of GS1 identifiers. The purpose of the update to this version (1.2.1) was simply to correct these errors. The identifiers affected are:
locNoParameter
is redundant because we also have
glnParameter
that expresses exactly the same thing.