GS1 defines well over a hundred Application Identifiers. For a retail 2D migration you will use about six.
| AI | Meaning | Format | Where it goes in a Digital Link |
|---|---|---|---|
01 | GTIN | 14 digits | Path — the primary key |
22 | Consumer product variant | up to 20 chars | Path qualifier, first |
10 | Batch / lot | up to 20 chars | Path qualifier, second |
21 | Serial number | up to 20 chars | Path qualifier, third |
17 | Expiration date | YYMMDD | Query string |
15 | Best before date | YYMMDD | Query string |
Path qualifiers must appear in the order 22 → 10 → 21. Not the order you find convenient, and not the
numeric order. A URL like /01/00036000291452/21/SN1/10/LOT1 is malformed even though every individual part is
valid — and while your own resolver may accept it, other trading partners' systems will not.
Dates are YYMMDD. A day of 00 is legal and means "end of that month" — 270600 is
the end of June 2027. Year interpretation uses a sliding window around the current year, so two digits are unambiguous in
practice.
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.
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 traceability, recalls, or expiry management justify it — not because the standard allows it.
Free automated audit — invalid GTINs, duplicates, and whether your URLs resolve. No account needed.
Run the free audit