Stampwright

GS1 Application Identifiers used in retail 2D codes

Updated July 2026

GS1 defines well over a hundred Application Identifiers. For a retail 2D migration you will use about six.

AIMeaningFormatWhere it goes in a Digital Link
01GTIN14 digitsPath, as the primary key
22Consumer product variantup to 20 charsPath qualifier, first
10Batch / lotup to 20 charsPath qualifier, second
21Serial numberup to 20 charsPath qualifier, third
17Expiration dateYYMMDDQuery string
15Best before dateYYMMDDQuery string

The ordering rule

Path qualifiers must appear in the order 22 → 10 → 21. A URL like /01/00036000291452/21/SN1/10/LOT1 is malformed even though every individual part is valid. A permissive resolver may accept it even though another trading partner's system rejects the order.

Dates and the end-of-month convention

Dates are YYMMDD. A day of 00 is permitted and means "end of that month." For example, 270600 is the end of June 2027. Year interpretation uses a sliding window around the current year, so two digits are unambiguous in practice.

Character set

Variable-length AI values use GS1's CSET 82: digits, upper and lower case letters, and a limited set of punctuation. The space character is not included. A lot code of LOT 2027 is invalid; LOT-2027 is fine. This catches people out constantly because the space looks harmless.

Batch and serial: only if you need them

Encoding lot or serial data means every batch produces a different code, which means variable-data printing. That is a real cost. Add them when the traceability, recall, or expiry workflow needs them.

Check your own catalog

Run a free check for invalid GTINs, duplicates, and destination problems. An account is not required.

Run the free audit