FDA DSCSA & EU FMD Prescription Drug Serialization API
Deterministic edge engine for US Drug Supply Chain Security Act (DSCSA) 21 U.S.C. 360eee and EU Falsified Medicines Directive (2011/62/EU) compliance.
⚡ Live Pure-Compute Playground
Test deterministic edge parsing with sub-2ms execution across 330+ Cloudflare V8 edge locations. Zero persistent storage, zero cold-starts, pure function $f(x)=y$.
Key Capabilities & Performance Architecture
- ✓ Instant validation of FDA DSCSA 4-element 2D DataMatrix barcodes (AI 01, AI 21, AI 17, AI 10)
- ✓ Deterministic NDC-to-GTIN (5-4-2, 5-3-2, 4-4-2) and GTIN-to-NDC bidirectional converters
- ✓ Modulo-10 character arithmetic checksum validator for GTIN-14 barcodes
- ✓ EPCIS 1.2 XML and EPCIS 2.0 JSON-LD supply chain event parser & schema validator
- ✓ GS1 Verification Router Service (VRS) lightweight request builder & response formatter
Compliance Standards & Specs (6 Specifications)
Explore full structural breakdowns, checksum logic, and field schemas for every supported format.
GS1 Verification Router Service (VRS) Lightweight Messaging Spec
GS1 Verification Router Service (VRS) protocol engine for automated saleable drug returns verification in under 5ms.
View Specification →EPCIS 1.2 XML Pharmaceutical Supply Chain Event Parser
High-speed EPCIS 1.2 XML parser extracting ObjectEvents, AggregationEvents, BizStep, ReadPoint, and GLN identifiers into JSON.
View Specification →EPCIS 2.0 JSON-LD Pharmaceutical Supply Chain Event Parser
Next-generation EPCIS 2.0 JSON-LD parser and schema compliance validator for modern pharmaceutical supply chain architectures.
View Specification →FDA 21 CFR 201.25 Barcode Requirement & 2D DataMatrix Spec
Automated compliance validator for US FDA 21 CFR 201.25 drug product barcode labeling regulations.
View Specification →DSCSA 4-Element 2D DataMatrix Barcode & Matrix Specification
Extract and validate all 4 DSCSA product identifier elements and FNC1 group separators in milliseconds.
View Specification →DSCSA Section 582 Suspect Product Quarantine & Verification Rules
Automate suspect and illegitimate prescription product quarantine checks, lot-level audits, and regulatory verification.
View Specification →API Endpoints & Request Signatures
| Method | Path | Description |
|---|---|---|
POST |
/api/v1/dscsa/validate-barcode |
Validate raw 2D DataMatrix GS1 barcode and extract 4 DSCSA elements |
POST |
/api/v1/dscsa/ndc-to-gtin |
Convert 10-digit NDC to standard 14-digit GTIN with Modulo-10 checksum |
Sample Response JSON Payload
All endpoints deliver strongly-typed envelopes with deterministic parsing and performance metrics.
{
"success": true,
"data": {
"valid": true,
"gtin": "00301234567896",
"serialNumber": "123456789012",
"expirationDate": "2026-08-31",
"lotNumber": "LOT99881",
"ndc": "01234-567-89",
"gtinCheckDigitValid": true,
"status": "VERIFIED"
},
"meta": {
"latency_ms": 1.62,
"version": "1.0.0"
}
}
Multi-Language Integration Code
Copy and paste ready-to-run snippets with your direct API credentials:
curl --request POST \
--url "https://fda-dscsa-eu-fmd-drug-serialization-api-21-usc-360eee.stanzaapi.com/api/v1/dscsa/validate-barcode" \
--header "Content-Type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--data '{
"rawBarcode": "010030123456789621123456789012\u001d1726083110LOT99881"
}'
const response = await fetch("https://fda-dscsa-eu-fmd-drug-serialization-api-21-usc-360eee.stanzaapi.com/api/v1/dscsa/validate-barcode", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.API_KEY || "YOUR_API_KEY"
},
body: JSON.stringify({
"rawBarcode": "010030123456789621123456789012\u001d1726083110LOT99881"
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = "https://fda-dscsa-eu-fmd-drug-serialization-api-21-usc-360eee.stanzaapi.com/api/v1/dscsa/validate-barcode"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
payload = {
"rawBarcode": "010030123456789621123456789012\u001d1726083110LOT99881"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
url := "https://fda-dscsa-eu-fmd-drug-serialization-api-21-usc-360eee.stanzaapi.com/api/v1/dscsa/validate-barcode"
payload := []byte(`{"rawBarcode":"010030123456789621123456789012\u001d1726083110LOT99881"}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-api-key", os.Getenv("API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Frequently Asked Questions
Under DSCSA Section 582, prescription drug packages must carry a 2D DataMatrix barcode with: (1) GTIN-14 / National Drug Code (AI 01), (2) Serial Number up to 20 alphanumeric characters (AI 21), (3) Expiration Date in YYMMDD format (AI 17), and (4) Lot/Batch Number up to 20 characters (AI 10).
The US FDA NDC comes in 10-digit formats (4-4-2, 5-3-2, or 5-4-2). To create a standard 14-digit GTIN, the NDC is zero-padded to an 11-digit HIPAA format, prepended with GS1 company prefix digits, and finalized with a calculated Modulo-10 check digit.
VRS is the interoperable protocol mandated for wholesalers and dispensers to query pharmaceutical manufacturers in real-time to verify saleable drug returns before restocking.