US FDA DSCSA 4-element & EU FMD 2D DataMatrix barcode parser, Modulo-10 check digit validator, and NDC-to-GTIN converter in sub-5ms.
Official high-performance, asynchronous Rust client library for FDA DSCSA & EU FMD Drug Serialization API, built on the Stanza Micro-API Network. Uses pure Rustls TLS (zero C/OpenSSL dependencies) and Tokio for maximum concurrency and safety.
- 🌐 Online Interactive Sandbox: Test your inputs live
- 📚 API Reference & Schemas: View documentation on Stanza
- ⚡ Platform Overview: Explore the Stanza Developer Network
Add to your Cargo.toml:
[dependencies]
stanzaapi-pharma-dscsa = "1.0.0"
tokio = { version = "1.0", features = ["full"] }Or use cargo add:
cargo add stanzaapi-pharma-dscsause stanzaapi_pharma_dscsa::PharmaDscsaClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Reads STANZA_API_KEY from environment automatically
// Public edge default: https://api.stanzaapi.com/pharma-dscsa
let client = PharmaDscsaClient::new(None, None);
let response = client.validate("(01)00300012345678(21)100000000001(17)261231(10)LOT12345").await?;
if response.success {
println!("Verification Success: {:?}", response.data);
} else {
eprintln!("Validation Error: {:?}", response.error);
}
Ok(())
}{
"success": true,
"data": {
"gtin": "00300012345678",
"serial_number": "100000000001",
"expiration_date": "2026-12-31",
"lot_number": "LOT12345"
}
}- FDA DSCSA & EU FMD Drug Serialization API Interactive Sandbox
- Stanza Developer Directory
- Source Code & Issue Tracker
MIT © Stanza — Powered by Stanza.