GS1 Digital Link URI Syntax
1 Introduction
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] and the [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 a QR Code®1. The scope of the work accommodates all Class 1 and Class 2 GS1 Keys and Key qualifiers (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 Class 2 Keys, it is up to the Class 2 Issuing Agencies to determine whether it’s fit for their use. For Class 3 GS1 Keys, 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).
1.1 How the GS1 Digital Link standard documents fit together
The original GS1 Digital Link standard comprised 4 key topics, all of which have been subject to revision. These are expected to evolve as separate documents in the near future. At the time of writing, they 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 with exactly the same precision and expressivity as the AI-based element syntax used across the GS1 system, notably in the GS1 General Specifications. The GS1 Digital Link URI syntax distinguishes between primary keys, such as GTIN and GLN, key qualifiers, such as batch/lot and GLN extension, and attributes 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. Compression (GS1 Digital Link Standard) A GS1 Digital Link URI that contains a set of identifiers and attributes may exceed the capacity of some data carriers. This document defines a compression/decompression algorithm that minimises the length of those Web URIs while retaining two critical features: 1) that the compressed form is still a URL on the same domain as the uncompressed form, that is, there is no change in ownership of the URL; 2) that it can be decompressed and the GS1 keys extracted without an online lookup. 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
Footnote: Unless otherwise specified, the term QR Code refers to the widely used ISO/IEC 18004 QR Code, 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 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.
sources of information, both human and machine-readable. This document defines how the keys 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. Resolvers are what makes the standard operational for the GS1 community and the industries served. Semantics (GS1 Digital Link Standard) Devices like scanners and point of sale terminals, PIM systems, product catalogues and more that are designed specifically to work with GS1 identifiers and data carriers, are all programmed to function within that particular framework. GS1 Digital Link puts things like GTINs, SSCCs and GRAIs onto the Web alongside countless other identifiers and ways of working. This document expresses the meaning behind the GS1 Digital Link standard in a way that the Web at large can understand and process. It makes use of, and extends, the GS1 Web Vocabulary.
1.2 Typographical conventions used in this document
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 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.
2 Conformance to GS1 Digital Link URI Syntax
This section is normative The core of this standard is expressed using ABNF grammar [RFC 5234] in section 4 such 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]. 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 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.
3 What is a URI?
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 URNs and URLs are also URIs
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 capability to easily resolve to resources (e.g. information) on the Web. 2. The capability to provide a globally unambiguous name for anything, whether or not the thing exists only on the Web or in the real world. 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-2 A Web URI can act both as a globally unambiguous name for something, as well as providing an easy way to retrieve Web resources (e.g. information) relating to the identified thing
Figure 3-3 provides a brief overview of the internal structural elements of a Web URI:
Figure 3-3 Internal structure 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 Data community 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. 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: Semantics [DL-Semantics] 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 GS1 identification key and an ordered set of optional qualifiers that are used in conjunction with the GS1 identification key to form a compound key that is used to retrieve information about something at a finer level of granularity (e.g. traceability data about an SGTIN, batch/lot-level master data). The query string is appropriate for data attributes of the identified resource 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 key in the URI query string. If a key is repeated, the last defined value for that key takes precedence over any previously defined value.
3.1 The GS1 Digital Link URI
GS1 Digital Link provides a syntax for expressing GS1 identifier keys, key qualifiers and data attributes 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 Codes®, digital watermarks, NFC tags and other technologies will also be able to include GS1 identification keys 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.
4 GS1 Digital Link URI Syntax
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 mn(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 ncomponent where n is one or more digit characters is equivalent to nn(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]
4.1 Removal of convenience alphas and GTIN values expressed using fewer than 14 digits
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 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.
4.2 Character sets
Firstly, a number of character sets are defined for later re-use in subsequent ABNF rules. DIGIT
= "0" / "1" / "2" / "3" / "4" /
"5" / "6" / "7" / "8" / "9"
BOOLEAN
= "0" / "1"
UPPERALPHA = %x41-5A ; A-Z ( ASCII characters 65-90 decimal, 41-5A hex)
LOWERALPHA = %x61-7A ; a-z ( ASCII characters 97-122 decimal, 61-7A hex)
ALPHA
= UPPERALPHA / LOWERALPHA ; A-Z or a-z
HEXDIG
= DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
DoubleQuote = '"' ; the double-quote character "
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: Octothorpe
= "%23" ; percent-encoding of the # character
ForwardSlash
= "%2F" ; percent-encoding of the / character
Percent
= "%25" ; percent-encoding of the % character
Ampersand
= "%26" ; percent-encoding of the & character
Plus
= "%2B" ; percent-encoding of the + character
Comma
= "%2C" ; percent-encoding of the , character
Exclamation
= "%21" ; percent-encoding of the ! character
LeftBracket
= "%28" ; percent-encoding of the ( character
RightBracket
= "%29" ; percent-encoding of the ) character
Asterisk
= "%2A" ; percent-encoding of the * character
Apostrophe
= "%27" ; percent-encoding of the ' character
Colon
= "%3A" ; percent-encoding of the : character
Semicolon
= "%3B" ; percent-encoding of the ; character
LeftAngleBracket
= "%3C" ; percent-encoding of the < character
Equals
= "%3D" ; percent-encoding of the = character
RightAngleBracket
= "%3E" ; percent-encoding of the > character
QuestionMark
= "%3F" ; percent-encoding of the ? character
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].
XSYMBOL
= DoubleQuote / "-" / "." / "_" / Exclamation / Percent /
Ampersand / Plus / Comma / ForwardSlash / Asterisk /
LeftBracket / RightBracket / Apostrophe / Semicolon /
Colon / LeftAngleBracket / RightAngleBracket / Equals /
QuestionMark
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]. YSYMBOL
= "-" / Octothorpe / ForwardSlash
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]. ZSYMBOL
= "-" / "_" / Equals
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]. XCHAR
= DIGIT / UPPERALPHA / LOWERALPHA / XSYMBOL
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). YCHAR
= DIGIT / UPPERALPHA / YSYMBOL
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]. ZCHAR
= DIGIT / UPPERALPHA / LOWERALPHA / ZSYMBOL
4.3 Primary identification keys
The following rules indicate which GS1 Application Identifiers (AI) that are considered as primary identification keys for GS1 Digital Link URI. Please note that as of version 1.3.0 of this standard, the ‘convenience alphas' defined in earlier versions are no longer supported (see section 4.1). gtin-code
= "01"
; GTIN
itip-code
= "8006"
; ITIP
gmn-code = "8013"
; Global Model Number
cpid-code
= "8010"
; CPID
gln-code
= "414"
; Physical Location GLN
payTo-code
= "415"
; GLN of invoicing party
partyGln-code
= "417"
; Party GLN
gsrnp-code
= "8017"
; GSRN of the Provider
gsrn-code
= "8018"
; GSRN of the Recipient
gcn-code
= "255"
; GCN
sscc-code
= "00"
; SSCC
gdti-code
= "253"
; GDTI
ginc-code
= "401"
; GINC
gsin-code
= "402"
; GSIN
grai-code
= "8003"
; GRAI
giai-code
= "8004"
; GIAI
4.4 Key qualifiers
The following rules which GS1 Application Identifiers (AI) are considered as key qualifiers for a GS1 Digital Link URI. cpv-code
= "22"
; Consumer Product Variant
lot-code
= "10"
; Batch/Lot identifier
ser-code
= "21"
; GTIN Serial Number
cpsn-code
= "8011"
; CPID Serial Number
glnx-code
= "254"
; GLN extension
refno-code
= "8020"
; Payment Reference Number
srin-code
= "8019"
; Service Relation Instance Number
tpx-code
= "235"
; third-party controlled serialised
extension to GTIN uic-ext-code
= "7040" ; GS1 UIC with Extension 1 and Importer
Index
4.5 Primary key formats
The following rules express the format of the values of the primary GS1 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, Indicator Digit or Extension Digit. Please refer to the GS1 General Specifications [GENSPECS] for further details. gtin-value
= 14DIGIT
; GTIN-8, GTIN-12 and GTIN-13 SHALL be expressed as
14 digits, with leading zeroes serving as filler digits itip-value
= 14DIGIT 2DIGIT 2DIGIT
; 14 digits then 2 digits then 2 digits
gmn-value
= 1*25XCHAR ; 1-25 characters from 82-chr subset
cpid-value
= 1*30YCHAR ; 1-30 characters from 39-chr subset
gln-value
= 13DIGIT ; exactly 13 digits
payTo-value
= 13DIGIT ; exactly 13 digits
partyGln-value
= 13DIGIT ; exactly 13 digits
gsrnp-value
= 18DIGIT ; exactly 18 digits
gsrn-value
= 18DIGIT ; exactly 18 digits
gcn-value
= 13DIGIT [1*12DIGIT]
; 13 digits then optional 1-12 digits
sscc-value
= 18DIGIT ; exactly 18 digits
gdti-value
= 13DIGIT [1*17XCHAR]
; 13 digits then optional 1-17 characters
; from the 82-character subset
ginc-value
= 1*30XCHAR
; 1-30 characters from the 82-character subset
gsin-value
= 17DIGIT ; exactly 17 digits
grai-value
= 13DIGIT [1*16XCHAR]
; 13 digits then optional 1-16 characters
; from the 82-character subset of ISO/IEC 646
giai-value
= 1*30XCHAR ; 1-30 characters from 82-chr subset
4.6 Key qualifier formats
The following rules express the format of the values of the key qualifiers of primary GS1 identification keys: cpv-value
= 1*20XCHAR ; 1-20 characters from 82-chr subset
lot-value
= 1*20XCHAR ; 1-20 characters from 82-chr subset
ser-value
= 1*20XCHAR ; 1-20 characters from 82-chr subset
cpsn-value
= 1*12DIGIT ; 1-12 digits
glnx-value
= 1*20XCHAR ; 1-20 characters from 82-chr subset
refno-value
= 1*25XCHAR ; 1-25 characters from 82-chr subset
srin-value
= 1*10DIGIT ; 1-10 digits
tpx-value
= 1*28XCHAR ; 1-28 characters from 82-chr subset
uic-ext-value
= 1DIGIT 3XCHAR
; 1 digit then 3 characters from 82-chr subset
4.7 Primary identifier and value concatenation
The following rules express how each primary identifier code and its value should be concatenated (for use within the URI path information) : gtin-comp
= "/" gtin-code "/" gtin-value
itip-comp
= "/" itip-code "/" itip-value
gmn-comp
= "/" gmn-code "/" gmn-value
cpid-comp
= "/" cpid-code "/" cpid-value
gln-comp
= "/" gln-code "/" gln-value
payTo-comp
= "/" payTo-code "/" payTo-value
partyGln-comp
= "/" partyGln-code "/" partyGln-value
gsrnp-comp
= "/" gsrnp-code "/" gsrnp-value
gsrn-comp
= "/" gsrn-code "/" gsrn-value
gcn-comp
= "/" gcn-code "/" gcn-value
sscc-comp
= "/" sscc-code "/" sscc-value
gdti-comp
= "/" gdti-code "/" gdti-value
ginc-comp
= "/" ginc-code "/" ginc-value
gsin-comp
= "/" gsin-code "/" gsin-value
grai-comp
= "/" grai-code "/" "0" grai-value
giai-comp
= "/" giai-code "/" giai-value
4.8 Key qualifier concatenation
The following rules express how each key qualifier and its value should be concatenated (for use within the URI path information) : cpv-comp
= "/" cpv-code "/" cpv-value
lot-comp
= "/" lot-code "/" lot-value
ser-comp
= "/" ser-code "/" ser-value
cpsn-comp
= "/" cpsn-code "/" cpsn-value
glnx-comp
= "/" glnx-code "/" glnx-value
refno-comp
= "/" refno-code "/" refno-value
srin-comp
= "/" srin-code "/" srin-value
tpx-comp
= "/" tpx-code "/" tpx-value
uic-ext-comp
= "/" uic-ext-code "/" uic-ext-value
4.9 Path element order
The following rules express how the URI path information should be structured for each primary GS1 identification key. Note that some primary identifiers such as SSCC do not have any associated key qualifier. Other primary identifiers 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 gtinpath 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. gtin-path
= gtin-comp [cpv-comp] [lot-comp] [ser-comp]
itip-path
= itip-comp [cpv-comp] [lot-comp] [ser-comp]
gmn-path
= gmn-comp
cpid-path
= cpid-comp [cpsn-comp]
gln-path
= gln-comp [glnx-comp]
payTo-path
= payTo-comp refNo-comp
partyGln-path
= partyGln-comp
gsrnp-path
= gsrnp-comp [srin-comp]
gsrn-path
= gsrn-comp [srin-comp]
gcn-path
= gcn-comp
sscc-path
= sscc-comp
gdti-path
= gdti-comp
ginc-path
= ginc-comp
gsin-path
= gsin-comp
grai-path
= grai-comp
giai-path
= giai-comp
upui-path
= gtin-comp tpx-comp
eoid-path
= partyGln-comp uic-ext-comp
fid-path
= gln-comp uic-ext-comp
mid-path
= giai-comp uic-ext-comp
The following rule simply states that any of the above is considered as a gs1path (which will be referenced in a later rule). gs1path
=
gtin-path / itip-path / gmn-path / cpid-path / gln-path / payTo-path / partyGln-path / gsrnp-path / gsrn-path / gcn-path / sscc-path / gdti-path / ginc-path / gsin-path / grai-path / giai-path / upui-path / eoid-path / fid-path / mid-path
4.10 Data attributes
The following rules are concerned with GS1 Application Identifiers that are considered to be data attributes rather than primary identifier 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 AIs that may also be used as primary keys, as defined in sections 4.3, 4.4. In any GS1 Digital Link URI there SHALL be exactly one primary key, followed by any key qualifiers relevant to that primary key as path elements. However, the GS1 General Specifications [GENSPECS] allow combinations of primary keys in a single data carrier. For example, it is possible to encode both a GTIN and a GIAI in a single element string within a data carrier (see the example in section 5.11). Where it is necessary to encode more than one primary key in a single GS1 Digital Link URI, one SHALL be used in the path and the remaining key(s) encoded in the query string as data attributes.
netWeightVMTICode = "3100" / "3101" / "3102" / "3103" / "3104" / "3105" /
"3200" / "3201" / "3202" / "3203" / "3204" / "3205" /
"3560" / "3561" / "3562" / "3563" / "3564" / "3565" /
"3570" / "3571" / "3572" / "3573" / "3574" / "3575"
netWeightVMTIValue
= 6DIGIT
netWeightVMTIParameter = netWeightVMTICode "=" netWeightVMTIValue
lengthVMTICode = "3110" / "3111" / "3112" / "3113" / "3114" / "3115" /
"3210" / "3211" / "3212" / "3213" / "3214" / "3215" /
"3220" / "3221" / "3222" / "3223" / "3224" / "3225" /
"3230" / "3231" / "3232" / "3233" / "3234" / "3235"
lengthVMTIValue = 6DIGIT
lengthVMTIParameter = lengthVMTICode "=" lengthVMTIValue
widthVMTICode = "3120" / "3121" / "3122" / "3123" / "3124" / "3125" /
"3240" / "3241" / "3242" / "3243" / "3244" / "3245" /
"3250" / "3251" / "3252" / "3253" / "3254" / "3255" /
"3260" / "3261" / "3262" / "3263" / "3264" / "3265"
widthVMTIValue = 6DIGIT
widthVMTIParameter = widthVMTICode "=" widthVMTIValue
depthVMTICode = "3130" / "3131" / "3132" / "3133" / "3134" / "3135" /
"3270" / "3271" / "3272" / "3273" / "3274" / "3275" /
"3280" / "3281" / "3282" / "3283" / "3284" / "3285" /
"3290" / "3291" / "3292" / "3293" / "3294" / "3295"
depthVMTIValue = 6DIGIT
depthVMTIParameter = depthVMTICode "=" depthVMTIValue
areaVMTICode = "3140" / "3141" / "3142" / "3143" / "3144" / "3145" /
"3500" / "3501" / "3502" / "3503" / "3504" / "3505" /
"3510" / "3511" / "3512" / "3513" / "3514" / "3515" /
"3520" / "3521" / "3522" / "3523" / "3524" / "3525"
areaVMTIValue = 6DIGIT
areaVMTIParameter = areaVMTICode "=" areaVMTIValue
netVolumeVMTICode = "3150" / "3151" / "3152" / "3153" / "3154" / "3155" /
"3160" / "3161" / "3162" / "3163" / "3164" / "3165" /
"3600" / "3601" / "3602" / "3603" / "3604" / "3605" /
"3610" / "3611" / "3612" / "3613" / "3614" / "3615" /
"3640" / "3641" / "3642" / "3643" / "3644" / "3645" /
"3650" / "3651" / "3652" / "3653" / "3654" / "3655" /
"3660" / "3661" / "3662" / "3663" / "3664" / "3665"
netVolumeVMTIValue = 6DIGIT
netVolumeVMTIParameter = netVolumeVMTICode "=" netVolumeVMTIValue
massPerUnitAreaVMTICode = "3370" / "3371" / "3372" / "3373" / "3374" /
"3375"
massPerUnitAreaVMTIValue
= 6DIGIT
massPerUnitAreaVMTIParameter = massPerUnitAreaVMTICode "="
massPerUnitAreaVMTIValue
grossWeightCode = "3300" / "3301" / "3302" / "3303" / "3304" / "3305" /
"3400" / "3401" / "3402" / "3403" / "3404" / "3405"
grossWeightValue
= 6DIGIT
grossWeightParameter = grossWeightCode "=" grossWeightValue
logisticLengthCode = "3310" / "3311" / "3312" / "3313" / "3314" / "3315" /
"3410" / "3411" / "3412" / "3413" / "3414" / "3415" /
"3420" / "3421" / "3422" / "3423" / "3424" / "3425" /
"3430" / "3431" / "3432" / "3433" / "3434" / "3435"
logisticLengthValue = 6DIGIT
logisticLengthParameter = logisticLengthCode "=" logisticLengthValue
logisticWidthCode = "3320" / "3321" / "3322" / "3323" / "3324" / "3325" /
"3440" / "3441" / "3442" / "3443" / "3444" / "3445" /
"3450" / "3451" / "3452" / "3453" / "3454" / "3455" /
"3460" / "3461" / "3462" / "3463" / "3464" / "3465"
logisticWidthValue
= 6DIGIT
logisticWidthParameter
= logisticWidthCode "=" logisticWidthValue
logisticDepthCode = "3330" / "3331" / "3332" / "3333" / "3334" / "3335" /
"3470" / "3471" / "3472" / "3473" / "3474" / "3475" /
"3480" / "3481" / "3482" / "3483" / "3484" / "3485" /
"3490" / "3491" / "3492" / "3493" / "3494" / "3495"
logisticDepthValue
= 6DIGIT
logisticDepthParameter
= logisticDepthCode "=" logisticDepthValue
logisticAreaCode = "3340" / "3341" / "3342" / "3343" / "3344" / "3345" /
"3530" / "3531" / "3532" / "3533" / "3534" / "3535" /
"3540" / "3541" / "3542" / "3543" / "3544" / "3545" /
"3550" / "3551" / "3552" / "3553" / "3554" / "3555"
logisticAreaValue
= 6DIGIT
logisticAreaParameter
= logisticAreaCode "=" logisticAreaValue
logisticVolumeCode = "3350" / "3351" / "3352" / "3353" / "3354" / "3355" /
"3360" / "3361" / "3362" / "3363" / "3364" / "3365" /
"3620" / "3621" / "3622" / "3623" / "3624" / "3625" /
"3630" / "3631" / "3632" / "3633" / "3634" / "3635" /
"3670" / "3671" / "3672" / "3673" / "3674" / "3675" /
"3680" / "3681" / "3682" / "3683" / "3684" / "3685" /
"3690" / "3691" / "3692" / "3693" / "3694" / "3695"
logisticVolumeValue
= 6DIGIT
logisticVolumeParameter = logisticVolumeCode "=" logisticVolumeValue
processorCode = "7030" / "7031" / "7032" / "7033" / "7034" / "7035" /
"7036" / "7037" / "7038" / "7039"
processorValue = 3DIGIT 1*27XCHAR
processorParameter = processorCode "=" processorValue
contentParameter
= "02=" 14DIGIT
prodDateParameter
= "11=" 6DIGIT
dueDateParameter
= "12=" 6DIGIT
packDateParameter
= "13=" 6DIGIT
bestBeforeDateParameter
= "15=" 6DIGIT
sellByDateParameter
= "16=" 6DIGIT
firstFreezeDateParameter = "7006=" 6DIGIT
harvestDateParameter
= "7007=" 6DIGIT [6DIGIT]
testByDateParameter
= "7011=" 6DIGIT [4DIGIT]
pricePerUnitParameter
= "8005=" 6DIGIT
variantParameter
= "20=" 2DIGIT
varCountParameter
= "30=" 1*8DIGIT
countParameter
= "37=" 1*8DIGIT
mutualParameter
= "90=" 1*30XCHAR
additionalIdParameter
= "240=" 1*30XCHAR
custPartNoParameter
= "241=" 1*30XCHAR
mtoVariantParameter
= "242=" 1*6DIGIT
pcnParameter
= "243=" 1*20XCHAR
secondarySerialParameter = "250=" 1*30XCHAR
refToSourceParameter
= "251=" 1*30XCHAR
amountCode = "3900" / "3901" / "3902" / "3903" / "3904" /
"3905" / "3906" / "3907" / "3908" / "3909"
amountValue
= 1*15DIGIT
amountParameter
= amountCode "=" amountValue
amountISOCode
= "3910" / "3911" / "3912" / "3913" / "3914" /
"3915" / "3916" / "3917" / "3918" / "3919"
amountISOValue
= 3DIGIT 1*15DIGIT
amountISOParameter
= amountISOCode "=" amountISOValue
priceCode
= "3920" / "3921" / "3922" / "3923" / "3924" /
"3925" / "3926" / "3927" / "3928" / "3929"
priceValue
= 1*15DIGIT
priceParameter
= priceCode "=" priceValue
priceISOCode
= "3930" / "3931" / "3932" / "3933" / "3934" /
"3935" / "3936" / "3937" / "3938" / "3939"
priceISOValue
= 3DIGIT 1*15DIGIT
priceISOParameter
= priceISOCode "=" priceISOValue
percentOffCode
= "3940" / "3941" / "3942" / "3943"
percentOffValue
= 4DIGIT
percentOffParameter
= percentOffCode "=" percentOffValue
orderNumberParameter
= "400=" 1*30XCHAR
routeParameter
= "403=" 1*30XCHAR
shipToLocParameter
= "410=" 13DIGIT
billToParameter
= "411=" 13DIGIT
purchaseFromParameter
= "412=" 13DIGIT
shipForLocParameter
= "413=" 13DIGIT
prodServLocParameter
= "416=" 13DIGIT
shipToPostParameter
= "420=" 1*20XCHAR
shipToPostISOParameter
= "421=" 3DIGIT 1*9XCHAR
originParameter
= "422=" 3DIGIT
countryProcessParameter
= "424=" 3DIGIT
countryFullProcessParameter = "426=" 3DIGIT
countryInitialProcessParameter
= "423=" 3DIGIT 1*12DIGIT
countryDisassemblyParameter = "425=" 3DIGIT 1*12DIGIT
originSubdivisionParameter
= "427=" 1*3XCHAR
nhrnPZNParameter
= "710=" 1*20XCHAR
nhrnCIPParameter
= "711=" 1*20XCHAR
nhrnCNParameter
= "712=" 1*20XCHAR
nhrnDRNParameter
= "713=" 1*20XCHAR
nhrnAIMParameter
= "714=" 1*20XCHAR
nhrnUS-FDAParameter
= "715=" 1*20XCHAR
nhrnAICParameter
= "716=" 1*20XCHAR
nsnParameter
= "7001=" 13DIGIT
meatCutParameter
= "7002=" 1*30XCHAR
activePotencyParameter
= "7004=" 1*4DIGIT
catchAreaParameter
= "7005=" 1*12XCHAR
aquaticSpeciesParameter
= "7008=" 1*3XCHAR
fishingGearTypeParameter = "7009=" 1*10XCHAR
prodMethodParameter
= "7010=" 1*2XCHAR
refurbLotParameter
= "7020=" 1*20XCHAR
funcStatParameter
= "7021=" 1*20XCHAR
revStatParameter
= "7022=" 1*20XCHAR
giaiAssemblyParameter
= "7023=" 1*30XCHAR
ufrgtUnitTypeParameter = "7041=" 1*4XCHAR
certificationRefCode
= "7230" / "7231" / "7232" / "7233" / "7234" /
"7235" / "7236" / "7237" / "7238" / "7239"
certificationRefValue
= 2XCHAR 1*28XCHAR
certificationRefParameter = certificationRefCode "=" certificationRefValue
protocolParameter
= "7240=" 1*20XCHAR
aidcMediaTypeParameter
= "7241=" 2DIGIT
vcnParameter
= "7242=" 1*25XCHAR
dobParameter
= "7250=" 8DIGIT
dobTimeParameter
= "7251=" 12DIGIT
bioSexParameter
= "7252=" 1DIGIT
familyNameParameter
= "7253=" 1*40XCHAR
givenNameParameter
= "7254=" 1*40XCHAR
suffixParameter
= "7255=" 1*10XCHAR
fullNameParameter
= "7256=" 1*90XCHAR
personAddrParameter
= "7257=" 1*70XCHAR
birthSequenceParameter = "7258=" 1DIGIT "/" 1DIGIT
babyParameter
= "7259=" 1*40XCHAR
dimensionsParameter
= "8001=" 14DIGIT
cmtNoParameter
= "8002=" 1*20XCHAR
ibanParameter
= "8007=" 1*34XCHAR
prodTimeParameter
= "8008=" 8DIGIT [2DIGIT] [2DIGIT]
opticalSensorParameter
= "8009=" 1*50XCHAR
versionParameter
= "8012=" 1*20XCHAR
itipContentParameter
= "8026=" 14DIGIT 2DIGIT 2DIGIT
digSigParameter
= "8030=" 1*90ZCHAR
couponIDNAParameter
= "8110=" 1*70XCHAR
pointsParameter
= "8111=" 4DIGIT
paperlessCouponIDNAParameter = "8112=" 1*70XCHAR
shipToCompParameter
= "4300=" 1*35XCHAR
shipToNameParameter
= "4301=" 1*35XCHAR
shipToAdd1Parameter
= "4302=" 1*70XCHAR
shipToAdd2Parameter
= "4303=" 1*70XCHAR
shipToSubParameter
= "4304=" 1*70XCHAR
shipToLocalityParameter
= "4305=" 1*70XCHAR
shipToRegParameter
= "4306=" 1*70XCHAR
shipToCountryParameter
= "4307=" 2XCHAR
shipToPhoneParameter
= "4308=" 1*30XCHAR
shipToGeoParameter
= "4309=" 20DIGIT
rtnToCompParameter
= "4310=" 1*35XCHAR
rtnToNameParameter
= "4311=" 1*35XCHAR
rtnToAdd1Parameter
= "4312=" 1*70XCHAR
rtnToAdd2Parameter
= "4313=" 1*70XCHAR
rtnToSubParameter
= "4314=" 1*70XCHAR
rtnToLocParameter
= "4315=" 1*70XCHAR
rtnToRegParameter
= "4316=" 1*70XCHAR
rtnToCountryParameter
= "4317=" 2XCHAR
rtnToPostParameter
= "4318=" 1*20XCHAR
rtnToPhoneParameter
= "4319=" 1*30XCHAR
srvDescriptionParameter
= "4320=" 1*35XCHAR
dangerousGoodsParameter
= "4321=" BOOLEAN
authToLeaveParameter
= "4322=" BOOLEAN
sigRequiredParameter
= "4323=" BOOLEAN
notBeforeDelDateParameter = "4324=" 10DIGIT
notAfterDelDateParameter = "4325=" 10DIGIT
releaseDateParameter
= "4326=" 6DIGIT
maxTempFParameter
= "4330=" 6DIGIT ["-"]
maxTempCParameter
= "4331=" 6DIGIT ["-"]
minTempFParameter
= "4332=" 6DIGIT ["-"]
minTempCParameter
= "4332=" 6DIGIT ["-"]
amountPayPerUnitCode
= "3950" / "3951" / "3952" / "3953" / "3954" /
"3955"
amountPayPerUnitValue
= 6DIGIT
amountPayPerUnitParameter = amountPayPerUnitCode "=" amountPayPerUnitValue
gtinParameter
= gtin-code "=" gtin-value
itipParameter
= itip-code "=" itip-value
gmnParameter
= gmn-code "=" gmn-value
cpidParameter
= cpid-code "=" cpid-value
glnParameter
= gln-code "=" gln-value
payToParameter
= payTo-code "=" payTo-value
partyGlnParameter
= partyGln-code "=" partyGln-value
gsrnpParameter
= gsrnp-code "=" gsrnp-value
gsrnParameter
= gsrn-code "=" gsrn-value
gcnParameter
= gcn-code "=" gcn-value
ssccParameter
= sscc-code "=" sscc-value
gdtiParameter
= gdti-code "=" gdti-value
gincParameter
= ginc-code "=" ginc-value
gsinParameter
= gsin-code "=" gsin-value
graiParameter
= grai-code "=" "0" grai-value
giaiParameter
= giai-code "=" giai-value
internalCode
= "91" / "92" / "93" / "94" / "95" /
"96" / "97" / "98" / "99"
internalValue
= 1*90XCHAR
internalParameter
= internalCode "=" internalValue
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. However, because of their importance in managing stock rotation and checking for expired products, they initially were given convenience alphas. These have now been removed (see section 4.1).
expiryDateParameter
= "17=" 6DIGIT
expiryTimeParameter
= "7003=" 10DIGIT
Note that the following data attributes are intentionally omitted:
-
Extended Packaging URL [ AI (8200) ] is not expected to be used within a GS1 Digital Link URI, as it is an alternate approach to enable extended packaging applications pre-dating the development of the GS1 Digital Link Standard: URI Syntax.
-
Identification of a Made-to-order (MtO) trade item (GTIN) [AI (03)] and Highly Individualised Device Registration Identifier (HIDRI) [AI (8014)] are defined for the Master Unique Device Identifier - Device Identifier (M-UDI-DI) restricted application, and as such are not permitted for use in a GS1 Digital Link URI syntax.
-
See Section 2 Application Standards in the GS1 General Specifications, for more information.
4.10.1 Extension mechanism and reserved keywords
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.
extensionKey = *( DIGIT ) everythingExceptDigitsAndEquals
*( DIGIT / everythingExceptDigitsAndEquals)
extensionValue = *( DIGIT / everythingExceptDigitsAndEquals / "=")
extensionParameter = extensionKey "=" extensionValue
; any other query string parameter permitted by RFC 3986
; including additional arbitrary key=value pairs except as
; restricted in the above paragraph
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.
4.10.2 Constructing the query string
The following rule states that any of the above parameters for data attributes may appear as a query string parameter ( queryStringParam ), referenced later.
queryStringParam = netWeightVMTIParameter / lengthVMTIParameter /
widthVMTIParameter / depthVMTIParameter / areaVMTIParameter / netVolumeVMTIParameter / massPerUnitAreaVMTIParameter / grossWeightParameter / logisticLengthParameter / logisticWidthParameter / logisticDepthParameter / logisticAreaParameter / logisticVolumeParameter / processorParameter / lotParameter / expiryDateParameter / expiryTimeParameter / contentParameter / prodDateParameter / dueDateParameter / packDateParameter / bestBeforeDateParameter / sellByDateParameter / firstFreezeDateParameter / harvestDateParameter / testByDateParameter / aidcMediaTypeParameter / vcnParameter / dobParameter / dobTimeParameter / bioSexParameter / familyNameParameter / givenNameParameter / suffixParameter / fullNameParameter / personAddrParameter / birthSequenceParameter / babyParameter /
pricePerUnitParameter / variantParameter / varCountParameter / countParameter / amountPayPerUnitParameter / additionalIdParameter / custPartNoParameter / mtoVariantParameter / pcnParameter / secondarySerialParameter / refToSourceParameter / amountParameter / amountISOParameter / priceParameter / priceISOParameter / percentOffParameter / orderNumberParameter / routeParameter / shipToLocParameter / billToParameter / purchaseFromParameter / shipForLocParameter / prodServLocParameter / shipToPostParameter / shipToPostISOParameter / originParameter / countryProcessParameter / countryFullProcessParameter / countryInitialProcessParameter / countryDisassemblyParameter / originSubdivisionParameter / nhrnPZNParameter /nhrnCIPParameter / nhrnCNParameter / nhrnDRNParameter / nhrnAIMParameter /
nhrnUS-FDAParameter / nhrnAICParameter / nsnParameter / meatCutParameter / activePotencyParameter / catchAreaParameter / fishingGearTypeParameter / prodMethodParameter / refurbLotParameter / funcStatParameter / revStatParameter / giaiAssemblyParameter / ufrgtUnitTypeParameter / dimensionsParameter / cmtNoParameter / ibanParameter / prodTimeParameter / versionParameter /
digSigParameter
/ couponIDNAParameter / pointsParameter /
itipContentParameter / certificationRefParameter / protocolParameter / aquaticSpeciesParameter / opticalSensorParameter / paperlessCouponIDNAParameter / internalParameter / mutualParameter / extensionParameter /
shipToCompParameter / shipToNameParameter / shipToaAdd1Parameter / shipToaAdd2Parameter / shipToSubParameter / shipToLocalityParameter / shipToRegParameter / shipToCountryParameter / shipToPhoneParameter / shipToGeoParameter /
rtnToCompParameter / rtnToNameParameter / rtnToAdd1Parameter / rtnToAdd2Parameter /
rtnToSubParameter / rtnToLocParameter / rtnToRegParameter / rtnToCountryParameter / rtnToPostParameter / rtnToPhoneParameter / srvDescriptionParameter / dangerousGoodsParameter / authToLeaveParameter / sigRequiredParameter / notBeforeDelDateParameter / notAfterDelDateParameter / releaseDateParameter / maxTempFParameter / maxTempCParameter / minTempFParameter / minTempCParameter / gtinParameter / itipParameter / gmnParameter / cpidParameter / glnParameter / payToParameter / partyGlnParameter / gsrnpParameter / gsrnParameter /
gcnParameter / ssccParameter / gdtiParameter / gincParameter / gsinParameter / graiParameter / giaiParameter
4.11 Constructing the GS1 Digital Link URI
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. scheme
= "http" / "https" / “HTTP” / “HTTPS”
unreserved
= ALPHA / DIGIT / "-" / "." / "_" / "~"
reserved
= gen-delims / sub-delims
pct-encoded
= "%" HEXDIG HEXDIG
gen-delims
= ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims
= "!" / "$" / "&" / "'" / "(" / ")" / "*" /
"+" / "," / ";" / "="
sub-delims-without-equals = "!" / "$" / "&" / "'" / "(" / ")" /
"*" / "+" / "," / ";"
everythingExceptDigitsAndEquals = ALPHA / pct-encoded /
sub-delims-without-equals /
"-" / "." / "_" / "~" /
":" / "@" / "/" / "?"
pchar
= unreserved / pct-encoded / sub-delims / ":" / "@"
segment
= *pchar
reg-name
= *( unreserved / pct-encoded / sub-delims )
dec-octet
= DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255
IPv4address
= dec-octet "." dec-octet "." dec-octet "." dec-octet
IPv6address
= 6( h16 ":" ) ls32
/ "::" 5( h16 ":" ) ls32
/ [ h16 ] "::" 4( h16 ":" ) ls32
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/ [ *4( h16 ":" ) h16 ] "::" ls32
/ [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::"
ls32
= ( h16 ":" h16 ) / IPv4address
; least-significant 32 bits of address
h16
= 1*4HEXDIG
; 16 bits of address represented in hexadecimal
IP-literal
= "[" ( IPv6address / IPvFuture ) "]"
IPvFuture
= "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
host
= IP-literal / IPv4address / reg-name
port
= *DIGIT
hostname
= host [ ":" port ]
Finally, the following four rules define the syntax of a reference GS1 Digital Link URI from the concatenation of previously defined components: queryStringDelim
= "&" / ";"
queryStringComp
=
"?" queryStringParam *( queryStringDelim queryStringParam)
uncompressedGS1webURIPattern
= gs1path [queryStringComp]
referenceGS1webURI
= "https://id.gs1.org" uncompressedGS1webURIPattern
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.
optionalPathSegment = "/" segment
customURIstem
= scheme "://" hostname *optionalPathSegment
uncompressedCustomGS1webURI = customURIstem uncompressedGS1webURIPattern
The formal ABNF syntax for the URI should be read in combination with the GS1 General Specifications [GENSPECS] to ensure appropriate usage of Application Identifiers that represent data attributes of identified things. In particular, section 4.14 of the GS1 General Specifications [GENSPECS] provides guidance about data relationships, including invalid pairs of element strings (see section 4.14.1) and mandatory associations of element strings (see section 4.14.2). In the GS1 General Specifications [GENSPECS], section 2 specifies which identifiers are used for an application, section 3 provides definitions for each Application Identifier, while section 4 explains the management rules for each GS1 identification key. As previously mentioned, some GS1 primary identifier keys include GS1 check digits 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 as cited is: 1. a valid Web URI that can be dereferenced on the Web without further processing; 2. a valid expression of one or more GS1 application identifiers and their values, informationally equivalent to the same data expressed in GS1 AI syntax.
4.12 Canonical GS1 Digital Link URIs
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: the scheme SHALL be HTTPS; the domain name SHALL be id.gs1.org; deprecated convenience string equivalents for AIs SHALL NOT be used; GTIN-8, GTIN-12 and GTIN-13 SHALL remain padded to 14 digits the URI query string (if present) SHALL NOT contain any other key=value pairs except for keys that are GS1 application identifiers; key=value pairs, if present, should be sorted in lexical, not numeric, order of the key; for clarity, this means that the parameters defined in GS1-Conformant Resolver Standard [DLResolution], namely 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: A canonical GS1 Digital Link URI, as defined in this section, is distinct from a reference GS1 Digital Link URI, which is defined as any valid GS1 Digital Link URI on the id.gs1.org domain. The other rules above do not apply to reference GS1 Digital Link URIs. The GS1-Conformant resolver standard [DL-Resolution] states that a trailing slash, while notconformant, should be tolerated by resolvers. That is, a resolver should tolerate
https://example.com/8003/0{grai}/ even though that final / character is not allowed by the
formal ABNF. A canonical GS1 Digital Link URI SHALL NOT include a trailing slash.
5 Examples of GS1 Digital Link URIs
This section is informative
5.1 GTIN
https://id.gs1.org/01/09520123456788
is the canonical Digital Link URI for GTIN 9520123456788 equivalent to the following element string: (01)09520123456788
The following are further valid GS1 non canonical 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
If redirection information has been specified to GS1 by the corresponding licensee of that GTIN or the GS1 Company Prefix (for GTINs constructed from GS1 Company Prefixes), a GS1 Resolver that supports GS1 Digital Link URIs will be able to effectively redirect any requests for that GS1 Digital Link URI to a corresponding URL specified by the licensee.
5.2 GTIN + CPV
https://id.gs1.org/01/09520123456788/22/2A
Is the canonical GS1 Digital Link URIs for GTIN 9520123456788 combined with Consumer Product Variant '2A' and to the following 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
5.3 GTIN + Batch/Lot
https://id.gs1.org/01/09520123456788/10/ABC123
is the canonical GS1 Digital Link URIs for GTIN 9520123456788 combined with Batch/Lot 'ABC123'and equivalent to the following element string: (01)09520123456788(10)ABC123
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
5.4 GTIN + Serial Number (also known as SGTIN)
https://id.gs1.org/01/09520123456788/21/12345
is the canonical GS1 Digital Link URIs for GTIN 9520123456788 combined with Serial Number '12345' and equivalent to the following 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
5.5 GTIN + Batch/Lot + Serial Number + Expiry Date
https://id.gs1.org/01/09520123456788/10/ABC1/21/12345?17=180426
is the canonical GS1 Digital Link URIs 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 element strings: (01)09520123456788(17)180426(10)ABC1(21)12345
The following is also a valid non canonical GS1 Digital Link URIs 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
5.6 GTIN + Net Weight
https://id.gs1.org/01/09520123456788?3103=000195
is the canonical GS1 Digital Link URIs for GTIN 9520123456788 combined with a net weight of
0.195 kg equivalent to the following element strings:
(01)09520123456788(3103)000195 The following is a further valid non canonical GS1 Digital Link URIs for GTIN 9520123456788 combined with a net weight of 0.195 kg :
https://example.com/01/09520123456788?3103=000195
5.7 GTIN + Net weight + Amount payable + Expiration date
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 element string is (01)09520123456788(3103)000195(3922)0299(17)201225 The following GS1 Digital Link URIs are also equivalent, but only the second is canonical as the data attributes have been arranged in the lexical order of the 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
5.8 SSCC
https://id.gs1.org/00/195201234567891232
is the canonical GS1 Digital Link URI for SSCC 195201234567891232 equivalent to the following element string: (00)195201234567891232 The following is a further valid non canonical GS1 Digital Link URI for SSCC 195201234567891232:
https://example.com/00/195201234567891232
5.9 SSCC with specified Content, Count and Batch/Lot
https://id.gs1.org/00/195201234567891232?02=09520123456788&37=25&10=ABC12
is the canonical GS1 Digital Link URIs 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 element strings: (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
5.10 Physical location represented by a GLN or GLN + GLN Extension
https://id.gs1.org/414/9520123456788
is the canonical GS1 Digital Link URI for GLN 9520123456788 equivalent to the following element string: (414)9520123456788
https://id.gs1.org/414/9520123456788/254/32a%2Fb
Is the canonical GS1 Digital Link URIs 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. It is equivalent to the following element strings: (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 URIs for GLN 9520123456788 combined with a GLN extension '32a/b' :
https://example.com/414/9520123456788/254/32a%2Fb
5.11 GIAI + GTIN
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 does matter for resolvers that have a policy of only permitting referral records specified by the respective licensee of the GS1 identification key appearing in the URI path information. It also 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 primary identifiers in a single GS1 Digital Link URI. The equivalent element string is (01)09520123456788(8004)9520614141234567 Although there are no specific rules about which of the ‘two primary keys’ should go in the path and which in the query string, 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 – rather than the manufacturer. The presence of multiple primary keys has an effect on the semantics that can be inferred from the URI. See GS1 Digital Link Standard: Semantics for more on this topic [DLSemantics].
6 AIDC Issues
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 Application Identifiers and their permitted values, through to data carrier positioning and human-readable information and much more besides. The following subsections supplement the General Specifications as they pertain specifically to GS1 Digital Link.
6.1 Recognising a GS1 Digital Link URI
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 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.
6.1.1 Matching an uncompressed GS1 Digital Link URI
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]))?))
6.1.2 Matching a compressed GS1 Digital Link URI
The following regular expression, RE2, will match a compressed or partially compressed GS1 Digital Link URI, with the same caveats as for RE1.
RE2:
^(https?|HTTPS?):(\/\/((([^\/?#]*)@)?([^\/?#:]*)(:([^\/?#]*))?))?([^?#]*)((\
/[0-9A-Za-z_-]{10,}$))
As a further warning, recall that a GS1 Digital Link URI may contain arbitrary path segments between the domain name and the primary key. It is unlikely but possible that those path segments will all be numeric. An even less likely scenario, but still possible, is 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.
6.1.3 Recommended procedure
Noting the limitations of regular expressions in the previous sections, we do not recommend combining RE2 with RE1. Rather, the recommended procedure is that for a given input string: 1. If a given string matches RE1, it plausibly is an uncompressed GS1 Digital Link URI. 2. If it doesn’t match that, but does match RE2, then it plausibly is a compressed GS1 Digital Link URI. 3. If it matches none of the regular expressions here, it definitely is not a conformant GS1 Digital Link URI, compressed or otherwise.
6.2 Human Readable Interpretation (HRI)
This standard defers entirely to the GS1 General Specifications for rules concerning human-readable interpretation.
7 Glossary
The glossary lists the terms and definitions that are applied in this document. Please refer to the www.gs1.org/glossary for the online version. Term Definition Attribute An element string that provides additional information about an entity identified with a GS1 identification key, such as batch number associated with a Global Trade Item Number (GTIN). Brand Owner The organisation that owns the specifications of a trade item, regardless of where and by whom it is manufactured. The brand owner is normally responsible for the management of the Global Trade Item Number (GTIN). Canonical GS1 Digital Link URI The definitive GS1 Digital Link URI for a given resource. See section 4.12 Consumer Often considered as the "recipient" of the supply chain in the past, today’s consumer is an active part of the supply chain and expects more data, with higher accuracy, and greater ease. Consumer Product Variant (CPV) An alphanumeric attribute of a GTIN assigned to a retail consumer trade item variant for its lifetime. Data Field A field that contains a GS1 identification key, an RCN, or attribute information
Term Definition Data titles Data titles are the abbreviated descriptions of element strings which are used to support manual interpretation of barcodes. Dereferencing a URI The use of an appropriate access mechanism (e.g. Web request) to perform an action on the URI's resource (e.g. to retrieve an information representation via HTTP GET or to send data to a resource via an HTTP POST operation). Dereferencing a URI is often considered synonymous with making a Web request or 'looking up' a URI on the Web. Domain name A domain name is an identification string that defines a realm of administrative autonomy, authority or control within the Internet. Domain names are formed by the rules and procedures of the Domain Name System (DNS). Any name registered in the DNS is a domain name. Domain names are used in various networking contexts and application-specific naming and addressing purposes. Domain names provide an abstraction layer that separates a registered name for an organisation or activity from the actual internet addresses (IP addresses) that provide its associated information services such as its Website, its e-mail server etc. The system that connects the domain names with the corresponding IP addresses is the Domain Name System (DNS). Element string The combination of a GS1 Application Identifier and GS1 Application Identifier data field. GS1 Application identifier The field of two or more digits at the beginning of an element string that uniquely defines its format and meaning. GS1 Application identifier data field The data used in a business application defined by one GS1 Application Identifier. GS1 Barcode A data carrier which encodes GS1 Application Identifier element strings. GS1 Barcode using GS1 Application Identifiers All GS1 endorsed barcode symbologies that can encode more than a GTIN namely GS1- 128, GS1 DataMatrix, GS1 DataBar and Composite and GS1 QR Code. GS1 Identification key A unique identifier for a class of objects (e.g. a trade item) or an instance of an object (e.g. a logistic unit). GS1 key qualifier A key qualifier is an additional attribute that is designated for use as part of a compound key (e.g., GTIN + serial number is a compound key, with the serial number being a key qualifier for the GTIN) GS1 Digital Link URI A Web URI conforming to the GS1 Digital Link URI syntax. key=value pair The query string of a URL – the portion after the ? symbol - may contain one or more keys, also known as parameters, and their values. For example, an expiry date (17) can be given a value of 221225 as 17=221225. Multiple key=vale pairs can be included in the query string, separated by the & character. LGTIN (GTIN + Lot/Batch) A compound key formed from the combination of GTIN [ AI (01) ] and Batch/Lot identifier [ AI (10) ]. LGTIN is defined as an EPC Class URN in the current GS1 Tag Data Standard (v1.11), sections 6.4.1 and 7.14, which describes the mapping between the EPC Class URN format for LGTIN and the corresponding element string. Parsing The process of analysing the structure of a sentence or URI structure in order to extract relevant information from it. Note that within the context of EPC URN structures, parsing refers to the ability to extract structural components within the EPC structure, e.g. for the purpose of matching against EPC URN patterns. QR Code® A two-dimensional matrix symbology consisting of square modules arranged in a square pattern. The symbology is characterised by a unique finder pattern located at three corners of the symbol. QR Code® symbols are read by two-dimensional imaging scanners or vision systems Reference GS1 Digital Link URI A GS1 Digital Link URI that uses the id.gs1.org domain Resolver The term ‘resolver’ is not unique to GS1. It is the name for any service that accepts an identifier as input and passes the request about the identified item to information about it. In the GS1 context, a resolver connects a GS1-identified item to one or more online resources that are directly related to it. The item may be identified at any level of granularity, and the resources may be either human or machine readable. Examples include product information pages, instruction manuals, patient leaflets and clinical data, product data, service APIs, marketing experiences and more. GS1 resolvers are defined in [DL-Resolution]
Term Definition Retailer An organisation engaged in the sale and distribution of products to consumers. Also includes online retailers/e-tailers SGTIN (Serialised GTIN) A compound key formed from the combination of a GTIN [AI (01) ] with Serial Number [ AI (21) ] which provides globally unique identification for every instance of a product. The term SGTIN appears in section 6.3.1 and 7.1 of the current GS1 Tag Data Standard, v1.11 Subdomain A subdomain is a domain that is part of a main domain. Although example.com is a subdomain of the top-level domain (.com), we most often think of a subdomain as the part of the hostname that precedes the registered domain name. For example, the registered domain name gs1.org has one subdomain ('www') [ as in www.gs1.org ] that is used for its Website. It also has a subdomain (‘id’) [ as in id.gs1.org] that is used for Web-based data services for GS1. URI Uniform Resource Identifier. A string of characters used to identify a resource. The resource may be an information resource such as a Web page or a thing in the real world, such as a physical object, person or location. URIs refer to the superset of Uniform Resource Names (URNs), Uniform Resource Locators (URLs) and Web URIs (which can function both as globally unambiguous names, while also behaving like URLs by enabling intuitive retrieval of related information via the Web). URI fragment identifier The fragment identifier component of a URI allows indirect identification of a secondary resource by reference to a primary resource and additional identifying information. The identified secondary resource may be some portion or subset of the primary resource, some view on representations of the primary resource, or some other resource defined or described by those representations. A fragment identifier component is indicated by the presence of an octothorpe/hash/number sign ("#") character and terminated by the end of the URI. A typical use of a URI fragment identifier is to provide a direct link to a specific section within a very long Web document such as
https://www.w3.org/TR/dwbp/#DataIdentifiers
URI path information A path consists of a sequence of path segments separated by a slash ("/") character. A path is always defined for a URI, though the defined path may be empty (zero length). The path component contains data, usually organized in hierarchical form, that, along with data in the non-hierarchical query component, serves to identify a resource within the scope of the URI's scheme and naming authority (if any). The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of the URI. URI query string The query component contains non-hierarchical data that, along with data in the path component, serves to identify a resource within the scope of the URI's scheme and naming authority (if any). The query component is indicated by the first question mark ("?") character and terminated by a number sign ("#") character or by the end of the URI. URL Uniform Resource Locator (URL), a specific type of URI colloquially known as Web address. A URL is a URI starting with http or https .
8 Changes since version 1.1
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 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 keys can be included in the query string to accommodate situations where a single URI needs to carry more than one primary 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.
8.1 Changes since version 1.2
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:
-
The final component of GCN, GDTI and GRAI are all optional (previous versions of the GS1 Digital Link URI Syntax suggested at least one serialisation character was required).
-
The final component of GCN is all optional (previous versions of the GS1 Digital Link URI Syntax suggested at least one serialisation character was required).
-
GMN now X..25 in line with changes in the GenSpecs between versions 19 and 21.
-
Harvest date (7007) now accepts 6 or 12 digits but not intermediate numbers of digits.
-
New AI 715, National Healthcare Reimbursement Number – USA NDC, added
-
AIs 90, 240, 241, 242, 243, 250, 251, 400, 403, 8102 corrected all updated to allow CHAR, previously they were shown in GS1 Digital Link as being DIGIT only.
-
AI 723s now 2XCHAR 128XCHAR (previously it had been written as 2*30XCHAR)
-
AI 8008 changed from 8DIGIT 1*4DIGIT to 8DIGIT [2DIGIT] [2DIGIT] which then tolerates 8 digits, 10 digits (if minutes are specified) or 12 digits (if minutes and seconds are specified) but does not tolerate 9 digits or 11 digits.
-
It was recognised that locNoParameter is redundant because we also have glnParameter that expresses exactly the same thing.
8.2 Changes since version 1.2.1
- AI 415, Pay To, reinstated as a primary key (see, in particular, section 4.3)
- Convenience alphas, deprecated in version 1.2.0, and explained in section 4.1, have now been removed so that, for example, ‘gtin’ cannot be used instead of ‘01’ in the path. This change is reflected throughout the document, starting with section 4.3.
8.3 Changes since version 1.3.0
-
Primary key format for AI 01, GTIN, updated to be expressed as a 14-digit format, meaning GTIN-8, GTIN-12 and GTIN-13 SHALL always be prefixed with leading zeroes serving as filler digits.
-
All new implementations of the GS1 Digital Link standard: URI Syntax SHALL express GTIN as a 14-digit string.
8.4 Changes since version 1.4.0
-
Updated references and links to related GS1 Digital Link standards documents.
-
Upper case scheme enabled, to align with RFC 3896.
-
ABNF syntax for GRAI [AI (8003)] corrected to align with GS1 General Specifications, use of "0" as pad character, not as part of GRAI value.
-
Improved consistency of ABNF grammar expressions for data attributes.
-
Missing GS1 Application Identifiers and new character set ZSYMBOL and ZCHAR added to align with GS1 General Specifications, release 24.0
-
Regular expressions updated to align with upper case scheme being enabled in release 1.5.0
-
Section 5.7 title changed from "Best before date" to "Expiration date", to align with the GS1 Digital Link URI examples using Expiration date [AI (17)]
8.5 Changes since version 1.5.0
-
Clarification that example GS1 Digital Link URIs are not configured to any demonstration Web pages
-
New references to ISO/IEC 18975 added
-
"refNo-comp" corrected to be mandatory for "payTo-path"
-
Data attributes added to align with new GS1 Application Identifiers approved for GS1 General Specifications, release 25.0
-
Updated note regarding intentional omission of AIs as data attributes
-
ABNF for primary keys used as data attributes corrected
-
Clarification on key=value pairs used as extension parameters - only the key (not the value) SHALL NOT be all numeric, to avoid conflict with current and future GS1 Application Identifiers
9 References
[BSR] GS1 Barcode Syntax Resource. Freely licensed open source software for generating, parsing and converting between GS1 syntaxes. [DL1] GS1 Digital link version 1.0 Originally titled GS1 Web URI Structure. Mark Harrison, Phil Archer, Dominique Guinard et al. GS1 Ratified Standard, August 2018 https://ref.gs1.org/standards/digital-link/1.0.0/ [DL 1.1] GS1 Digital Link version 1.1 Mark Harrison, Phil Archer, Dominique Guinard et al. GS1 Ratified Standard, February
[DL-Resolution] GS1-Conformant Resolver Standard. Phil Archer, Mark Harrison, Dominique Guinard et al. GS1 ratified standard, see https://ref.gs1.org/standards/resolver/ [DL-Semantics] GS1 Digital Link: Semantics, Mark Harrison, Phil Archer et al.GS1 ratified standard, see
https://ref.gs1.org/standards/digital-link/
[GENSPECS]
GS1 General Specifications V24.0. GS1 Ratified Standard January 2024
https://ref.gs1.org/standards/genspecs/
[GS1 Identification Keys]
https://www.gs1.org/standards/id-keys
[IRIs]
Internationalized Resource Identifiers (IRIs) M Duerst, M. Suignard. IETF January 2005
https://tools.ietf.org/html/rfc3987
[ISO/IEC 18975]
ISO/IEC 18975:2024 Information technology — Automatic identification and data capture techniques — Encoding
and resolving identifiers over HTTP. ISO/IEC JTC 1/ SC 31 November 2024
https://www.iso.org/standard/85540.html
[Linked Data]
Tim Berners-Lee 2006 https://www.w3.org/DesignIssues/LinkedData
[PercentEncoding]
Uniform Resource Identifier (URI): Generic Syntax, section 2.1: Percent-Encoding T Berners-Lee, R Fielding, L Masinter. IETF January 2005 https://tools.ietf.org/html/rfc3986#section-2.1 [REST]
See https://en.wikipedia.org/wiki/Representational_state_transfer [RFC 2606] Reserved Top Level Domain Names D Eastlake, A Panitz. IETF June 1999 https://tools.ietf.org/html/rfc2606 [RFC 3986] Uniform Resource Identifier (URI): Generic Syntax. T Berners-Lee, R Fielding, L Masinter. IETF January 2005
https://tools.ietf.org/html/rfc3986
[RFC 5234]
Augmented BNF for Syntax Specifications: ABNF. D Crocker (ed), P Overell. IETF January 2008
https://tools.ietf.org/html/rfc5234
[RFC 6570]
URI Template. J. Gregorio, R. Fielding, M. Hadley, M. Nottingham, D. Orchard. IETF March 2012
https://tools.ietf.org/html/rfc6570
[RFC 6596]
The Canonical Link Relation. M Ohye, J Kupke. IETF April 2012 https://tools.ietf.org/html/rfc6596 [RFC 6761] Special-Use Domain Names. S Cheshire, M Krochmal. IETF February 2013 https://tools.ietf.org/html/rfc6761 [RFC 7405]
Case-Sensitive String Support in ABNF. P. Kyzivat. IETF December 2014 https://tools.ietf.org/html/rfc7405 [RFC 8615] Well-Known Uniform Resource Identifiers (URIs). M Nottingham. IETF May 2019
https://tools.ietf.org/html/rfc8615