This server implements the GS1 Digital Link v1.6.0 standard for Digital Product Passports. It provides intelligent routing based on the client device type, supporting both barcode scanners and consumer smartphones.
/01/{gtin}/10/{batch}/21/{serial}
https://dev.id.codes/01/05012345678900/10/LOT2024A/21/SN12345?17=261231
| AI | Name | Location | Format |
|---|---|---|---|
| 01 | GTIN | Path | 14 digits |
| 22 | CPV (optional) | Path | Max 20 chars |
| 10 | Batch/Lot | Path | Max 20 chars |
| 21 | Serial | Path | Max 20 chars |
| 17 | Expiry Date | Query | YYMMDD |
| 11 | Production Date | Query | YYMMDD |
| 15 | Best Before | Query | YYMMDD |
| 422 | Country of Origin | Query | 3 digits |
gtin, lot, ser)
were removed from the GS1 standard in November 2022. This server uses ONLY numeric AI codes.
Legacy /gtin/ URLs are redirected to the correct format for backward compatibility.
/01/05012345678900/10/LOT2024A
/01/05012345678900/10/LOT2024A?17=261231
/01/05012345678900/10/LOT2024A/21/SN12345?17=261231
Test with curl (simulates barcode scanner):
curl http://localhost:5000/01/05012345678900/10/LOT2024A
Test with browser (simulates consumer):
http://localhost:5000/01/05012345678900/10/LOT2024A
/01/{gtin} - GTIN only/01/{gtin}/10/{batch} - GTIN + Batch/01/{gtin}/10/{batch}/21/{serial} - Full path/gtin/{gtin} - Legacy (redirects to /01/)/health - Health check/stats - Request statistics