---
title: FDA DSCSA & EU FMD Drug Serialization API | 21 USC 360eee & GS1 VRS Engine
description: Validate FDA DSCSA 4-element 2D DataMatrix barcodes (GTIN-14, Serial, Lot, Exp), convert NDC to GTIN, verify EPCIS 1.2/2.0 events, and query VRS verification routers in sub-5ms.
canonical: https://stanzaapi.com/tools/pharma-dscsa/
---

[Home](/)/[API Directory](/tools/)/FDA DSCSA & EU FMD Prescription Drug Serialization API

 <5ms Edge Latency99.9% SLA AvailableVerified: Sep 2026V8 Pure ComputePharmaceutical & Healthcare Compliance

# 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.

[Subscribe & Get API Key →](/tools/pricing)[⚡ Live Playground](#live-playground)[Specs (6)](#specifications)

 Interactive Edge Workbench

## ⚡ 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$.

32KB Demo Cap60 req/min Burst<2ms V8 ComputeZero Data Retention

input.txt0 B

 Reset

1

(01)00300012345678(21)XYZ987654321(10)BATCH2026(17)261231

 RUN VALIDATION (<5ms) [ CHECKSUM: AWAITING RUN ]

output.jsondemo-ready

Status: Ready Copy

```
{
  "status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
```

Sandbox Quota: Free Tier (50 reqs/mo) • Production keys from $29/mo[Get Free Sandbox Key →](/login?email=)

Need 512KB+ Payloads, High-Throughput & 99.9% Production SLA?

Direct API keys include pooled monthly quotas, zero cold-starts, and HIPAA BAA eligibility on the Mega tier.

[Get Production API Key →](/pricing)

## 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 →](/tools/pharma-dscsa/compliance/vrs-verification-router-service)[EPCIS 1.2 XML Event Parser & Schema Validator (FDA DSCSA) — High-speed EPCIS 1.2 XML parser extracting ObjectEvents, AggregationEvents, BizStep, ReadPoint, and GLN identifiers into JSON. — View Specification →](/tools/pharma-dscsa/compliance/epcis-1-2-xml)[EPCIS 2.0 JSON-LD Supply Chain Event Parser & Validator — Next-generation EPCIS 2.0 JSON-LD parser and schema compliance validator for modern pharmaceutical supply chain architectures. — View Specification →](/tools/pharma-dscsa/compliance/epcis-2-0-json-ld)[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 →](/tools/pharma-dscsa/compliance/fda-21-cfr-201-barcode)[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 →](/tools/pharma-dscsa/compliance/gtin-serial-lot-exp-matrix)[DSCSA Section 582 Suspect Product Quarantine & Verification Rules — Automate suspect and illegitimate prescription product quarantine checks, lot-level audits, and regulatory verification. — View Specification →](/tools/pharma-dscsa/compliance/suspect-product-verification)

## 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.

HTTP 200 Response PayloadCopy

```
{
  "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:

cURLCopy

```
curl --request POST \
  --url "https://api.stanzaapi.com/pharma-dscsa/api/v1/dscsa/validate-barcode" \
  --header "Content-Type: application/json" \
  --header "x-api-key: YOUR_API_KEY" \
  --data '{
  "rawBarcode": "010030123456789621123456789012\u001d1726083110LOT99881"
}'
```

Node.js (Fetch)Copy

```
const response = await fetch("https://api.stanzaapi.com/pharma-dscsa/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);
```

Python (Requests)Copy

```
import requests
import json

url = "https://api.stanzaapi.com/pharma-dscsa/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())
```

GoCopy

```
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	url := "https://api.stanzaapi.com/pharma-dscsa/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

What are the 4 mandatory FDA DSCSA barcode elements?

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).

How does NDC to GTIN-14 conversion work?

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.

What is GS1 VRS (Verification Router Service)?

VRS is the interoperable protocol mandated for wholesalers and dispensers to query pharmaceutical manufacturers in real-time to verify saleable drug returns before restocking.

## Complementary Enterprise APIs

Seamlessly orchestrate data pipelines across adjacent financial, regulatory, and supply-chain protocols:

[GS1 2027 Barcode & QR Decoder → — Decode GS1 DataMatrix, Digital Link URIs, and 150+ Application Identifiers.](/tools/gs1-decoder/)[FDA AccessGUDID & IMDRF UDI Decoder → — Verify FDA and EU MDR medical device serialization, expiration dates, and lot numbers.](/tools/udi-decoder/)[Healthcare EDI ANSI X12 → — Map pharmaceutical supply chain track-and-trace events to healthcare EDI transactions.](/tools/x12-parser/)
