This whitepaper is based on the GS1 international standard document GS1 Application Identifier 02 and the GS1 General Specifications. It provides a systematic technical analysis of the definition, encoding structure, combination constraints, GS1 Digital Link implementation, and cross-industry deployment practices of Application Identifier AI 02. AI 02 is specifically used to identify the homogeneous trade item GTIN contained within a single logistic unit (the SSCC carrier). It is a core encoding element for full-carton / full-pallet batch logistics traceability, warehouse inventory, and supply chain reconciliation. The document is intended for supply chain architects, barcode standardization engineers, and WMS/TMS system developers, and fully covers encoding validation, GS1 Digital Link construction, mandatory/forbidden AI combinations, and multi-industry implementation workflows, providing engineering-level deployment guidance.
1. Technical Analysis of Standard Definition and Encoding Structure
1.1 Official Specification Definition and Positioning
1.1.1 Basic Interpretation (Authoritative GS1 Source Text)
- Application Identifier: AI 02
- Data Title: CONTENT
- Standard Definition: Identification of trade items contained in a logistic unit
- Core Positioning: Used only for grouped logistic units (pallets, full cartons, returnable containers, uniquely identified by AI 00 SSCC). It describes that all goods inside the logistic unit are of the same trade item, and stores the 14-digit GTIN of that item.
- Applicable Carriers: GS1-128, GS1 DataMatrix, QR Code, and RFID EPC tags. AI 02 cannot be used on its own; it is subject to strict AI combination constraints.
1.1.2 Core Technical Characteristics
- Static fixed-length encoding with no variable character segments.
- Carries numeric GTIN only — does not differentiate between GTIN-8 / GTIN-12 / GTIN-13; all short codes are zero-padded on the left to the standardized 14-digit format.
- Used in bulk homogeneous goods scenarios: a single pallet/carton may contain only one GTIN; AI 02 is prohibited for multi-SKU mixed logistic units.
1.2 Encoding Structure Technical Parameters
1.2.1 Format and Character Rules
- Standard Format:
N2 + N14 - N2: The two fixed digits of the Application Identifier, “02”.
- N14: A fixed 14-digit numeric GTIN, validated by the regular expression
(\d{14}). Only digits 0–9 are allowed; no letters, symbols, or whitespace. - Total Data Length: 2 + 14 = 16 pure digits.
- Byte Footprint: 16 bytes under ASCII; single-byte storage in UTF-8, with no multi-byte characters.
1.2.2 FNC1 Separator Usage Rules
- Official Parameter: FNC1 required? No (FNC1 is not mandatory).
- Principle: AI 02 is a fixed-length data segment. The barcode parser can automatically truncate data based on the fixed 14-digit length, so no function separator is required to distinguish AI boundaries.
- Supplementary Scenario: If AI 02 is followed by a variable-length AI (such as AI 37, AI 10), an FNC1 character (ASCII 29,
<GS>) must be inserted before the variable field as a delimiter.
1.2.3 GTIN Check-Digit Algorithm and Complete Computation Example
The last digit of the 14-digit GTIN that follows AI 02 is a check digit calculated using the GS1 unified Modulo 10 weighted algorithm, which is applicable to all fixed-length numeric identifiers (GTIN, SSCC, GLN).
Mathematical Formula
Let the 14-digit GTIN sequence from left to right be D₁, D₂, D₃, …, D₁₃, D₁₄, where D₁₄ is the check digit to be calculated:
- From right to left (excluding the check digit
D₁₄), multiply odd-position digits by 3 and even-position digits by 1. - Sum all weighted values to obtain the total
S. - Check digit formula:
D₁₄ = (10 − S mod 10) mod 10. If the remainder is 0, the check digit is 0.
Step-by-Step Computation Example
This example uses a compliant 13-digit base GTIN (no erroneous redundant leading zeros): 0690123456789 (13 valid digits). After padding and computing the check digit, we obtain a standard 14-digit GTIN.
- 13-digit base encoding sequence (check digit to be calculated):
0, 6, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - Assign weights from right to left (odd/even inverted weighting rule):
3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3 - Multiply and sum term by term:
| Position | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 9 | 6 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Digit | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 9 | 6 | 0 |
| Weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| Product | 27 | 8 | 21 | 6 | 15 | 4 | 9 | 2 | 3 | 0 | 27 | 6 | 0 |
Total S = 27 + 8 + 21 + 6 + 15 + 4 + 9 + 2 + 3 + 0 + 27 + 6 + 0 = 128
- Modulo operation: 128 mod 10 = 8
- Check digit: (10 − 8) mod 10 = 2
Complete compliant 14-digit GTIN (AI 02 standard encoding): 06901234567892
Check Validation Method
Apply the weighted calculation to the complete 14 digits again. The final total must be an exact multiple of 10, indicating that the encoding is valid. This encoding follows the industry-standard compliant format — the digit length is complete and the check digit is precise — and is suitable for all GS1 barcode and Digital Link scenarios.
1.3 AI Mandatory Associations and Invalid Pairing Rules (GS1 Mandatory Constraints)
According to the AI 02 specification, AI 02 is subject to non-negotiable combination logic, which forms the core of system validation:
- Mandatory Associations: AI 00 + AI 37
- AI 00: SSCC — the unique serial number of the logistic unit (identifies the pallet / carton itself).
- AI 37: Count of trade items contained in the logistic unit (a variable 1–8 digit field recording the number of items in the carton).
- Business Logic: AI 02 describes the SKU inside the carton, AI 37 describes the quantity, and AI 00 describes the container itself. All three must appear on the same barcode label; omitting any one is not permitted.
- Invalid Pairings: Prohibited Coexistence with AI 01 and AI 03
- AI 01: Retail consumer-unit GTIN (the identity of the trade item itself, used on individual item labels).
- AI 03: Variable-measure trade item GTIN.
- Conflict Logic: AI 01 / AI 03 identify the product itself, whereas AI 02 identifies the product inside a container. Their semantics are mutually exclusive and must never be encoded together on the same barcode.
2. Core Technical Functions and Business Value of GS1 AI 02
2.1 Layered Technical Positioning
- Supplement to Hierarchical Logistics IdentificationThe three-tier GS1 encoding system: consumer unit (AI 01) → grouped logistic unit (AI 02 + AI 00 + AI 37) → shipment / consignment (AI 401 / AI 402). AI 02 fills the gap in identifying the SKU of bulk-grouped goods, distinguishing “the box” from “the goods inside the box.”
- Bulk-Data Bulk-Acquisition CarrierIn warehousing and logistics scanning, a single barcode read captures the container ID, SKU, and pack quantity simultaneously — no need to scan each individual item — significantly improving inbound and outbound efficiency.
- Baseline for Automatic Book-Inventory ReconciliationThe WMS system uses AI 02 (SKU) + AI 37 (quantity) to automatically generate inbound order lines, reducing manual entry errors and enabling barcode-driven automated inventory counts.
2.2 Core Technical Value
- Data Uniqueness Isolation: SSCC (AI 00) uniquely identifies the container, while AI 02 uniquely identifies the goods inside the container. Data for multiple pallets carrying the same SKU, or multiple SKUs on the same pallet, is fully decoupled.
- Cross-Enterprise Standardized Interoperability: Manufacturers, distributors, retail stores, and third-party logistics providers (3PL) uniformly adopt AI 02 encoding rules, enabling seamless integration of EDI documents and logistics label data.
- Segmented Traceability Across the Chain: By linking SSCC to the AI 02 GTIN, the end pallet can be traced backward through production batches, raw materials, and factory inspection records.
- Error-Prevention Validation Mechanism: Systems can use mandatory AI combination rules to reject non-compliant labels (missing AI 37, mixing AI 01/03), reducing supply chain data error rates.
3. Complete AI 02 Implementation with GS1 Digital Link (Key Chapter)
3.1 Digital Link Basic Syntax and AI 02 Embedding Rules
GS1 Digital Link is the international specification for converting GS1 AI encodings into standard HTTP URIs. It can be embedded in QR codes or NFC tags so that a single scan directly accesses product or logistics data services.
3.1.1 URI Basic Structure
Universal template: https://id.gtin.xin/[primary-key]/[qualifier/attribute-parameters]
Key Definitions:
- Primary Key: AI 01 (consumer-unit GTIN), AI 00 (SSCC), and other unique subject identifiers. AI 02 cannot serve as the primary key (official source text: “Primary key in a GS1 Digital Link URI? No”).
- Data Attribute: AI 02 is an attribute field and can only be attached as an additional parameter after the primary key.
- Applicable Scenario: AI 02 must rely on AI 00 (SSCC) as the primary key to construct a complete Digital Link, complying with the mandatory combination rule.
3.1.2 AI Parameter Encoding Rules
In a URI, an AI is represented as a key-value pair ai=value. Fixed-length digits are concatenated directly without separators.
- AI 02 parameter format:
02=14-digit GTIN - AI 37 parameter format:
37=count of items - AI 00 primary-key format:
00=18-digit SSCC
3.2 Complete Digital Link URI Example and Field Breakdown
Example Parameters (All Corrected to Compliant Standard Data)
- SSCC (AI 00):
012345678900000128(compliant 18-digit standard SSCC encoding) - GTIN of the goods inside the carton (AI 02):
06901234567892(compliant 14-digit GTIN with check digit) - Count of items (AI 37): 48
Complete URI (Domain id.gtin.xin)
https://id.gtin.xin/00/012345678900000128?02=06901234567892&37=48
Layered Breakdown
- Protocol + Domain:
https://id.gtin.xin/— the standard GS1 resolution domain and unified entry point. - Primary-Key Path Segment:
00/012345678900000128— uses SSCC as the primary key to locate a unique logistics pallet. - Query Parameter Segment:
02=06901234567892: AI 02 attribute — the standard 14-digit GTIN of the goods inside the pallet.37=48: AI 37 attribute — the total count of items inside the pallet.
Access and Resolution Mechanism
- A mobile phone or scanning terminal reads the complete URL and automatically issues an HTTP GET request to the
id.gtin.xinresolution server. - The server splits the primary key 00 (SSCC) to retrieve logistics master data and reads the 02 and 37 parameters to obtain the SKU and quantity.
- The frontend returns a visualized page including pallet logistics trajectory, product quality inspection reports, inventory quantity, and delivery milestones.
3.3 Technical Comparison: Traditional GS1 Barcodes vs. GS1 Digital Link
| Comparison Dimension | Traditional GS1-128 1D Barcode | GS1 Digital Link 2D Code |
|---|---|---|
| Data Output | Raw AI digit string only; requires a local system to interpret AI meaning | Standard HTTP URL; scanning directly retrieves data online |
| AI 02 Carrying Method | Concatenated with AI 00 and AI 37; relies on local decoding libraries | AI 00 as primary key, AI 02 as a URL parameter, resolved in the cloud |
| Carrier Limitations | Limited 1D barcode data capacity; basic logistics information only | DataMatrix / QR can carry the full link with additional multi-dimensional attributes |
| Terminal Requirements | Requires professional industrial scanners; ordinary mobile phones cannot decode | Any mobile phone with WeChat / a browser can scan — no specialized hardware needed |
| Marketing Extensibility | Identifier data only; no interaction | Can jump to traceability pages, marketing campaigns, after-sales forms, etc. |
| Cross-System Interoperability | Requires EDI to synchronize raw barcode data | Standardized URLs allow third-party platforms to directly call the resolution API |
3.4 End-to-End Traceability System Architecture and Data Flow
Four-Layer System Architecture
- Encoding Generation Layer: WMS label-printing module that automatically combines AI 00 / AI 02 / AI 37 to generate the barcode + Digital Link QR code.
- Acquisition Layer: Industrial PDA terminals, mobile phone scanning, and fixed barcode readers.
- Resolution Service Layer:
id.gtin.xinGS1 resolution server storing the SSCC–GTIN mapping library. - Business Application Layer: ERP, TMS, retail store POS systems, and consumer traceability mini-programs.
End-to-End Data Flow
- Factory Outbound: The WMS generates a standard SSCC, binds the compliant AI 02 product GTIN and AI 37 pack quantity, and prints the logistics label (1D barcode + Digital Link QR code).
- Line-Haul Logistics: Drivers use PDAs to scan the QR code and upload in-transit milestones via
id.gtin.xin. - Warehouse Inbound: The warehouse scans and reads the 02 parameter, automatically matching the product master record and generating an inbound order.
- Retail Endpoint: Stores scan on receipt to verify the pallet’s SKU and quantity, preventing incorrect receiving.
- Consumer Traceability: After de-palletizing at the store, customers scan the AI 01 QR code on the individual item; the backend links to upstream pallet AI 02 / SSCC data, enabling full production-to-logistics traceability.
3.5 Mandatory / Invalid Combination Digital Link Examples (All Data Corrected)
Example 1: Compliant Complete Link (Mandatory 00 + 02 + 37 Combination)
https://id.gtin.xin/00/987654321000000982?02=06909999999996&37=24
Example 2: Non-Compliant Link (Prohibited Coexistence of AI 01 and AI 02)
https://id.gtin.xin/00/987654321000000982?02=06909999999996&01=06909999999996
The resolution server returns HTTP 400 directly, indicating an AI pairing conflict.
Example 3: Non-Compliant Link (Missing Mandatory AI 37)
https://id.gtin.xin/00/987654321000000982?02=06909999999996
Resolution fails validation and returns the warning: “AI 02 must be accompanied by an AI 37 quantity field.”
4. Cross-Industry Technical Implementation Case Studies
4.1 Retail and FMCG Industry
Case: End-to-End Control of Supermarket Full-Pallet Beverage Distribution
System Integration Architecture
- Hardware: Factory industrial barcode printers, warehouse fixed scanning gantries, distribution PDAs, and store handheld scanners.
- Software: FMCG brand WMS, distributor TMS, supermarket retail ERP, and GS1 Digital Link resolution service.
- Network Topology: Factory LAN → dedicated EDI link → distributor cloud platform → supermarket store LAN; the resolution server is deployed on the public domain
id.gtin.xin.
Complete Data Acquisition Workflow
- Encoding Creation: The production workshop groups by pallet, assigns standard 18-digit SSCCs, and records each pallet’s compliant 14-digit beverage GTIN (AI 02) and pack quantity per pallet (AI 37).
- Carrier Generation: Logistics labels are printed, containing the GS1-128 1D barcode (00 + 02 + 37) and the Digital Link QR code.
- Outbound Verification: The gantry scanner batch-scans pallets. The system validates AI combination completeness, GTIN digit length, and check-digit validity, intercepting non-compliant labels that are missing AI 37 or mixing AI 01.
- Line-Haul Transport: Logistics drivers scan with PDAs; the Digital Link uploads loading time and vehicle information.
- Store Receiving: Store staff scan the AI 02 standard GTIN, which is automatically matched to the purchase order and the pack quantity is verified; discrepancies automatically generate rejection notices.
Implementation Results: Manual receiving time is reduced by 72%, and complaints about wrong or missing deliveries drop by 90%.
4.2 Third-Party Logistics (3PL) Industry
Case: Bulk Homogeneous Goods Inventory Counting in a Multi-Tenant Warehouse
System Architecture
- Hardware: Stereoscopic warehouse stacker-crane barcode readers and mobile inventory PDAs.
- Software: WMS warehouse management system and GS1 resolution microservice.
Data Flow
On inbound, standard SSCCs are bound to compliant AI 02 product codes, and the stereoscopic warehouse automatically assigns storage locations. During monthly stocktaking, PDAs scan the pallet QR codes and use Digital Link to retrieve AI 02 (SKU) and AI 37 (quantity); the system automatically reconciles book vs. physical inventory and generates variance reports. There is no need to break pallets and scan each item individually, increasing counting efficiency by 65%.
4.3 Pharmaceutical and Medical Industry
Case: Cold-Chain Traceability for Pharmaceutical Full-Carton Logistics (Compliant with UDI Regulations)
Architecture Components
- Hardware: Pharmaceutical factory label printers, in-vehicle cold-chain scanning terminals, and hospital pharmacy scanning tablets.
- Software: Pharmaceutical traceability platform and hospital HIS systems.
Implementation Specifications
Full-carton pharmaceutical pallets use AI 00 (standard SSCC) + AI 02 (compliant 14-digit pharmaceutical GTIN) + AI 37 (carton count). The Digital Link embeds cold-chain temperature, production batch, and expiry date information. Upon hospital receipt, scanning validates pharmaceutical code compliance via id.gtin.xin, intercepting expired or mismatched drugs to meet national pharmaceutical traceability regulations and eliminate medication safety risks.
4.4 Manufacturing Industry
Case: Full-Pallet Factory-Inside Circulation Control of Auto Parts
- Scenario: An automotive parts original factory delivers standardized parts in bulk to the assembly workshop.
- Process: Parts pallet labels encode the compliant part GTIN in AI 02 and the per-pallet quantity in AI 37. Workstation terminals scan the Digital Link to automatically deduct workshop inventory, enabling digital kitting control and eliminating wrong-part installation and missing parts.
5. Implementation Specifications and Deployment Considerations
- Pre-Encoding Validation: The label-printing system must embed AI combination validation logic, GTIN digit-length checks, and check-digit validation. It must prohibit generating non-compliant barcodes that are missing AI 37, mix AI 01/03, or have incorrect digit lengths.
- GTIN Standardization: The AI 02 field must be exactly 14 digits. All short-form GTINs must be padded in a standardized manner, and the check digit must strictly follow the GS1 Modulo 10 algorithm to eliminate digit-length errors and check-digit inaccuracies.
- Unified Digital Link Domain: The entire supply chain of an enterprise must uniformly use
id.gtin.xinas the resolution domain to avoid confusion caused by multiple domains. - Prohibition of AI 02 for Mixed Goods: When two or more GTINs are loaded on the same pallet, AI 02 must not be used; each item must instead be identified individually with AI 01.
- Data Storage Specifications: The database must store SSCC, AI 02 GTIN, and AI 37 quantity as three separate fields with composite indexes to accelerate traceability queries.
Conclusion
GS1 AI 02 is the core encoding element for the standardized identification of bulk homogeneous goods within a logistic unit. Built on the mandatory combination rule of “AI 00 + AI 02 + AI 37”, it achieves the three-in-one binding of container, SKU, and quantity. After this revision, all GTIN and SSCC example data in this document fully complies with GS1 digit-length specifications and check-digit algorithms, with precise and compliant encoding parameters. Combined with GS1 Digital Link technology, AI 02 breaks through the local-decoding limitations of traditional 1D barcodes, enabling a cloud-interactive, end-to-end traceable digital identification system. In retail, logistics, medical, and manufacturing deployments, strict adherence to GS1 official encoding constraints, check-digit algorithms, and URI construction rules can effectively reduce supply chain data errors, improve warehouse-logistics automation, and meet both global trade standardization and digital traceability requirements.
