GS1 Barcode & Digital Link Decoder API
Decode GS1 DataMatrix, GS1-128, FNC1 Barcodes and GS1 Digital Link URIs (Sunrise 2027)
The GS1 Barcode & Digital Link Decoder API parses, validates, and cross-converts 2D barcode element strings (GS1 DataMatrix, GS1-128, QR Code) and GS1 Digital Link URIs in real-time. Built for the retail Sunrise 2027 mandate, it bridges legacy POS scanner data with modern web-enabled 2D barcodes.
A single scan can contain dozens of concatenated Application Identifiers (AIs) like GTIN (01), Batch/Lot (10), Expiration Date (17), Serial Number (21), and Net Weight (3102). This API tokenizes raw scanner streams with FNC1 / ASCII GS (0x1D) separators or bracketed notation, validates GS1 Mod-10 check digits, adjusts decimal positions, and standardizes dates to ISO 8601.
Easily generate or deconstruct GS1 Digital Link Web URIs for smart packaging, consumer engagement, warehouse inventory, and healthcare traceability with sub-15ms latency across 300+ Cloudflare edge locations.
Features
- Universal decoding of raw scanner barcodes (FNC1/ASCII GS), bracketed AI strings, and GS1 Digital Link URIs
- Comprehensive GS1 Application Identifier (AI) dictionary covering 70+ standard identifiers
- GS1 Modulo 10 check digit calculation and verification (GTIN-8/12/13/14, SSCC, GLN, GSIN)
- Bidirectional cross-conversion: Barcode Element String <-> GS1 Digital Link URI
- ISO date parsing with GS1 month-end day (DD=00) resolution and metric decimal scaling
- Sub-15ms edge responses with pure compute and zero cold-start bloat
- Fail-closed security with 512KB payload limits and instant API key authentication
Endpoints
| Method | Path | Description | Example |
|---|---|---|---|
POST | /api/v1/decode | Universal decode & cross-convert any GS1 barcode or Digital Link URI | /api/v1/decode |
POST | /api/v1/parse/barcode | Parse raw FNC1/0x1D or bracketed GS1 barcode element strings | /api/v1/parse/barcode |
POST | /api/v1/parse/digital-link | Parse and deconstruct a GS1 Digital Link URI into structured AIs | /api/v1/parse/digital-link |
POST | /api/v1/build/digital-link | Construct a standard GS1 Digital Link URI from structured AIs | /api/v1/build/digital-link |
POST | /api/v1/validate/check-digit | Calculate and verify GS1 Modulo 10 check digit for GTIN/SSCC/GLN | /api/v1/validate/check-digit |
GET | /api/v1/ai/{code} | Lookup GS1 Application Identifier specification and format rules | /api/v1/ai/01 |
GET | /api/v1/ai | List all supported GS1 Application Identifiers | /api/v1/ai |
GET | /health | Service health check | /health |
FAQ
What is the GS1 Sunrise 2027 mandate?
Sunrise 2027 is a global retail initiative transitioning point-of-sale systems from legacy 1D linear barcodes (UPC/EAN) to 2D barcodes (GS1 DataMatrix and QR Codes powered by GS1 Digital Link). This enables packaging to carry batch, expiration, and serial data alongside web links for consumers.
How does the API handle raw barcode scanner inputs with FNC1 / ASCII GS?
When hardware 2D scanners read GS1 DataMatrix barcodes, variable-length fields are delimited by ASCII 29 (0x1D / FNC1). The API natively accepts raw strings containing 0x1D, <GS>, [GS], or ^] delimiters and reliably extracts all variable and fixed-length Application Identifiers.
What is GS1 Digital Link?
GS1 Digital Link is a web URI standard (e.g. https://example.com/01/01234567890128/10/LOT123?17=251231) that turns product barcodes into web addresses while preserving standard GS1 data structures for scanning hardware.
How are GS1 dates like 250200 formatted?
In GS1 standards, dates are encoded as YYMMDD. If day DD is '00', it specifies the last day of that month. The API automatically calculates the exact end of the month (e.g. 2025-02-28 or leap year 2024-02-29) and outputs standardized ISO 8601 strings.
Can I use the API to calculate check digits for GTINs and SSCCs?
Yes. Send any numeric base code to /api/v1/validate/check-digit or omit the final digit, and the API computes the Modulo 10 check digit with weights 3 and 1 according to the official GS1 specification.