Practical URI patterns

GS1 Digital Link examples, explained

Copyable patterns for a GTIN alone, batch or lot, serial number and expiry date—plus the rules behind each URI.

Technical guide Updated September 18, 2026 8 min read

See GS1 Digital Link URI examples for GTIN, batch or lot, serial number and expiry date, with an annotated URL and explanations of path qualifiers and query attributes.

Start with the anatomy, not the punctuation

Anatomy of a product Digital Link
https://id.example.comHTTPS domain/01AI for GTIN/0001234567890514-digit GTIN/10/LOT123lot qualifier?17=271231expiry attribute

The colors are explanatory only. The QR Code contains one uninterrupted URI.

Read the URI as structured GS1 data. Each numeric key is an Application Identifier, so software knows that 01 means GTIN, 10 means batch or lot and 17 means expiration date. Percent-encoding is required when a value contains characters that are not safe in a URL path or query.

Six useful GS1 Digital Link examples

01

GTIN only

https://id.example.com/01/09520123456788

The simplest product Digital Link: primary key AI (01) plus a 14-digit GTIN.

02

GTIN on a brand domain

https://id.brand.example/01/09520123456788

A custom domain is valid. It can route the scan to a brand-managed product experience.

03

GTIN + batch or lot

https://id.example.com/01/09520123456788/10/ABC123

AI (10) qualifies the product identity with a variable-length batch or lot value.

04

GTIN + serial number

https://id.example.com/01/09520123456788/21/12345

AI (21) identifies an individual instance of the trade item.

05

GTIN + expiry date

https://id.example.com/01/09520123456788?17=271231

AI (17) is a data attribute in YYMMDD form, so it appears in the query string.

06

GTIN + lot + serial + expiry

https://id.example.com/01/09520123456788/10/ABC123/21/12345?17=271231

Key qualifiers stay in the path in GS1 order; expiry remains a query attribute.

Note: example.com and .example names are reserved for documentation. These patterns illustrate syntax; they are intentionally not live product destinations.

The placement rules behind the examples

RoleExamplesURI locationWhy
Primary identification keyGTIN (01)PathIdentifies the main resource
Key qualifierCPV (22), lot (10), serial (21)Path, in that orderNarrows identity from product class toward variant, batch or instance
Data attributeExpiry (17), weight (310n)Query stringDescribes the identified item without becoming part of its identity

For example, a lot number helps identify a batch and therefore qualifies the GTIN. An expiry date describes that batch or item, but two otherwise identical items are not different identities merely because a date is present.

Canonical does not mean only valid form

GS1 defines a canonical Digital Link representation using HTTPS, id.gs1.org, numeric AIs, 14-digit GTIN and ordered GS1 query attributes. A valid implementation may use a brand domain and may include an allowed path prefix before the primary key. Canonical form is useful when systems need one predictable representation; it does not prohibit brand-controlled domains.

Valid custom path example
https://id.brand.example/products/01/09520123456788

A URI can be syntactically valid while still being operationally useless—for example, if the domain expires, the route returns an error or the GTIN was never assigned to the product. Syntax validation and destination testing solve different problems.

How to test a Digital Link before use

  • Validate the GTIN check digit and 14-digit representation.
  • Confirm each AI is allowed in its role and values meet length and character rules.
  • Open the URI and test resolver behavior, redirects, languages and failure states.
  • Use the Barcody Digital Link validator for a quick structural check.
  • Use the official GS1 Barcode Syntax Resource and the applicable GS1 specifications for conformance.
  • Verify the final printed symbol and run it through actual target workflows.

Authoritative references