GS1 Digital Link
QR Igniter implements the GS1 Digital Link standard for encoding product information in QR codes. This enables interoperability with global supply chain systems and consumer-facing applications.
Reference
For the official GS1 Digital Link specification, see GS1 Digital Link Quick Start Guide.
What is GS1 Digital Link?
GS1 Digital Link is a standard that combines GS1 identifiers (like GTINs) with web addresses, enabling a single QR code to provide:
- Product identification for supply chain
- Consumer engagement (product info, recipes, etc.)
- Regulatory compliance information
- Traceability data
URI Structure
https://domain.com/{AI}/{value}/{AI}/{value}?{AI}={value}
Example:
https://qr2.ignited.cloud/01/09506000134352/10/BATCH123/21/SERIAL456?17=251231
Supported Application Identifiers
| AI | Name | Format | Example |
|---|---|---|---|
| 01 | GTIN | 14 digits | 09506000134352 |
| 10 | Batch/Lot Number | Alphanumeric (1-20) | BATCH123 |
| 21 | Serial Number | Alphanumeric (1-20) | SERIAL456 |
| 17 | Expiry Date | YYMMDD | 251231 |
| 22 | Consumer Product Variant | Alphanumeric (1-20) | CPV001 |
GTIN Formats
QR Igniter supports all GTIN formats, automatically padding to 14 digits:
| Format | Digits | Example | GTIN-14 |
|---|---|---|---|
| GTIN-8 (EAN-8) | 8 | 12345670 | 00000012345670 |
| GTIN-12 (UPC-A) | 12 | 012345678905 | 00012345678905 |
| GTIN-13 (EAN-13) | 13 | 1234567890123 | 01234567890123 |
| GTIN-14 | 14 | 12345678901234 | 12345678901234 |
Check Digit Calculation
GTINs include a check digit (final digit) calculated using the GS1 algorithm:
1. Multiply each digit by weight (3,1,3,1,3,1...)
2. Sum the products
3. Check digit = (10 - (sum mod 10)) mod 10
Example for 950600013435:
9×3 + 5×1 + 0×3 + 6×1 + 0×3 + 0×1 + 0×3 + 1×1 + 3×3 + 4×1 + 3×3 + 5×1
= 27 + 5 + 0 + 6 + 0 + 0 + 0 + 1 + 9 + 4 + 9 + 5 = 66
Check digit = (10 - (66 mod 10)) mod 10 = (10 - 6) mod 10 = 4
GTIN = 9506000134354
Identification Levels
| Level | AIs Used | Use Case |
|---|---|---|
| Product Level | 01 only | General product information |
| Batch Level | 01 + 10 | Recall tracking, quality control |
| Serialized Level | 01 + 21 | Individual item tracking, anti-counterfeiting |
Resolution Process
1. User scans QR code containing Digital Link URI
2. Scanner opens URL in browser/app
3. Resolver parses URI to extract AIs
4. Resolver looks up destination based on:
- GTIN
- Batch/Lot (if present)
- Serial (if present)
5. User redirected to appropriate destination
Backend Implementation
Parsing URIs (Gs1UriParser)
use App\Services\Gs1\Gs1UriParser;
$parser = new Gs1UriParser();
$result = $parser->parse('https://qr2.ignited.cloud/01/09506000134352/10/BATCH123');
$result->gtin; // "09506000134352"
$result->batchLot; // "BATCH123"
$result->isValid(); // true
Building URIs (Gs1UriBuilder)
use App\Services\Gs1\Gs1UriBuilder;
$builder = new Gs1UriBuilder('https://qr2.ignited.cloud');
$uri = $builder
->setGtin('09506000134352')
->setBatchLot('BATCH123')
->setSerialNumber('SERIAL456')
->build();
// https://qr2.ignited.cloud/01/09506000134352/10/BATCH123/21/SERIAL456
Mobile App Implementation
Gs1ParserService (Flutter)
final parser = Gs1ParserService();
final result = parser.parse(scannedData);
if (result.isValid) {
print(result.gtin); // Product ID
print(result.gtin14); // 14-digit padded
print(result.batchLot); // Batch number
}
URL Encoding
Special characters in AI values must be URL-encoded:
| Character | Encoded |
|---|---|
| / | %2F |
| + | %2B |
| & | %26 |
| = | %3D |
| Space | %20 |
Resources
Next Steps
- Creating QR Codes - Create GS1-compliant QR codes
- System Architecture - Technical overview