Digital Product Passport API

Issue a battery passport, register it with the EU DPP Registry, and resolve it at a public URL behind a QR or NFC carrier β€” with three-tier access control deciding who sees what.

Battery passport Β· from 18 Feb 2027 EU DPP Registry live Β· 20 Jul 2026 Free Commission data models Public & free

Not legal advice. Not the official EU DPP Registry. This is a client of the Commission registry (Impl. Reg (EU) 2026/1778) and defaults to its test environment. Validation is structural β€” the accuracy of attribute values, and every registration and disclosure obligation, remains the economic operator's responsibility.

What this is

From 18 February 2027, every EV, LMT and industrial battery over 2 kWh placed on the EU market needs a Digital Product Passport: roughly 80–100 Annex XIII attributes, a unique identifier, a scannable data carrier, and access control that shows different data to different audiences. This API turns the free, Commission-published data models into three calls β€” create β†’ register β†’ resolve.

πŸ“‹ Create

Validate attributes against Annex XIII, mint an ISO/IEC 15459 UID, get back a scannable carrier. Anonymous β€” no key needed.

πŸ›οΈ Register

Submit the UID and registration data to the EU DPP Registry test environment. Production cutover is configuration only.

πŸ” Resolve

The public URL behind the QR/NFC carrier, filtered to the caller's tier β€” the part everyone gets wrong.

Live demo β€” create a battery passport

Builds a real POST /v1/passports request and validates it in your browser using this project's bundled library β€” the same code the server runs. Toggle the tiers to see exactly which attributes each audience receives.

Access tiers β€” the hard part, done right

Every attribute in the data model carries a tier drawn from Battery Regulation (EU) 2023/1542. Resolution at /dpp/{uid} returns only what the caller is entitled to, and names the groups it withheld β€” never their values. Default-deny: an attribute with no explicit tier is treated as competent-authority, so a newly added field can never leak before someone classifies it.

public

Anyone scanning the QR or NFC carrier. No credential. General info, carbon footprint, end-of-life, safety labels, capacity and energy.

legitimate-interest

Suppliers, recyclers, repairers, second-life operators, notified bodies. Bearer key with scope legitimate-interest. Adds cell chemistry, supply chain, hazardous substances, state-of-health and electrochemical data.

competent-authority

National market-surveillance authorities and the European Commission. Bearer key with scope competent-authority. Everything, including declarations, test reports and EORI.

Call the API

Base URL: https://apis.allanninal.dev/dpp

POST /v1/passports anonymous Create a passport

Validates against the versioned Annex XIII model, mints the UID, and returns the carrier and resolve URL. Incomplete attributes return status: "draft" rather than an error. Pass your issuer key if you intend to register β€” a passport created anonymously has no owner and can never be amended or registered.

curl -s -X POST https://apis.allanninal.dev/dpp/v1/passports \
  -H "content-type: application/json" \
  -d '{
    "category": "battery-ev",
    "carrier": "qr",
    "attributes": {
      "manufacturerName": "ACME Cells GmbH",
      "batteryModel": "ACME-EV-75",
      "batteryCategory": "EV",
      "batteryStatus": "original",
      "manufacturingDate": "2027-03-01",
      "ratedCapacityKwh": 75,
      "nominalVoltage": 400,
      "chemistry": "NMC811",
      "stateOfHealth": 100
    }
  }'
GET /v1/dpp/{uid} anonymous (public tier) Resolve, tier-filtered

Resolves by UID. No credential returns the public attributes only; a scoped key returns more. GET /dpp/{uid} serves the same data as a human-readable page β€” that is the URL inside the carrier.

# Public tier (anyone):
curl https://apis.allanninal.dev/dpp/v1/dpp/urn%3Adpp%3Aapis.allanninal.dev%3A000000000001

# Legitimate-interest tier:
curl -H "authorization: Bearer $DPP_LEGIT_KEY" \
  https://apis.allanninal.dev/dpp/v1/dpp/urn%3Adpp%3A...

# Competent-authority tier:
curl -H "authorization: Bearer $DPP_AUTHORITY_KEY" \
  https://apis.allanninal.dev/dpp/v1/dpp/urn%3Adpp%3A...
POST /v1/passports/{id}/register issuer key Register with the EU DPP Registry

Submits the UID and mandatory registration data to the registry β€” test environment by default. Idempotent per (passport, environment), and registry errors are returned verbatim rather than masked as success.

curl -X POST https://apis.allanninal.dev/dpp/v1/passports/{passportId}/register \
  -H "authorization: Bearer $DPP_ISSUER_KEY" \
  -H "content-type: application/json" \
  -d '{ "registryEnv": "test" }'
GET /v1/passports/{id}/carrier?type= anonymous QR Β· Data Matrix Β· NFC

A real symbol, not a picture of one: qr is ISO/IEC 18004 byte mode at error-correction level M with full Reed–Solomon correction and penalty-scored masking; datamatrix is ISO/IEC 16022 ECC 200; nfc is an NDEF URI record as hex, ready to write to a tag. Deterministic β€” the same passport always yields a byte-identical symbol.

Also available: GET /v1/passports (list), GET /v1/passports/{id} (full, owner only), PATCH /v1/passports/{id} (draft update or versioned amendment), and GET /v1/usage. Full contract in openapi.yaml.

Access & rate limits

Creating and publicly resolving passports are free and anonymous. Managing, registering and resolving above the public tier need a scoped key sent as Authorization: Bearer dpp_... β€” the scope is what decides the tier you receive.

issuerCreate, list, fetch in full, amend and register your own passports.
legitimate-interestResolve any passport at the legitimate-interest tier.
competent-authorityResolve any passport at the full tier.

Anonymous callers get 60 requests/minute and 5,000/day per client IP; key holders get 5Γ— the minute budget and 10Γ— the daily one. Every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; throttled requests return 429 with Retry-After.

Reference data (static, no auth)

FAQ

When does the battery passport become mandatory?

18 February 2027, for every EV, LMT and industrial battery over 2 kWh placed on the EU market β€” Regulation (EU) 2023/1542, Article 77 and Annex XIII.

Is this the official EU DPP Registry?

No. The Commission's registry was established by Implementing Regulation (EU) 2026/1778 and went live on 20 July 2026. This API is a client of it and defaults to the test environment. Registering for real also requires enrolling as a verified economic operator (an eIDAS identity check) with the Commission β€” that step happens outside this API.

Which categories are covered?

Version 1 is the battery passport: battery-ev, battery-lmt and battery-industrial. Other ESPR categories β€” textiles, electronics, furniture β€” arrive as new versioned data models as their delegated acts finalise, with no code change.

Do the QR codes actually scan?

Yes. The encoders are full implementations, and every symbol the test suite generates is rasterised and read back with two independent decoders across every version and size, so a regression fails the build instead of shipping a label nobody can scan.

How much does it cost?

Nothing. The reference data is free and open, creating and resolving are free with rate limiting, the code is MIT-licensed, and the data comes from free Commission publications with attribution.

Not technical? Here's the whole idea in simple words

Imagine a restaurant 🍽️. You don't march into the kitchen and start cooking. You tell the waiter what you'd like, and a few minutes later your dish arrives. An API is that waiter β€” but for software. One app asks for something, the API goes and gets it, and hands back a tidy answer. Nobody has to touch the messy kitchen.

1 What an API actually is

API stands for "Application Programming Interface," but you can forget those words. The useful idea is this: it's a polite, reliable messenger that sits between two systems so they can work together without knowing each other's secrets.

πŸ—ΊοΈ

Maps in an app

A ride app asks a maps API "where is this address?"

πŸ’³

Card payments

A shop asks a payment API "is this card good?"

🌦️

Weather widget

A site asks a weather API "what's it like today?"

πŸ”

"Log in with…"

One app asks another "is this really them?"

2 Why it matters for your business

Most businesses lose time and money in the gaps between tools β€” someone exports a spreadsheet here, retypes numbers there, emails a file to a partner, and hopes nobody made a typo. An API closes those gaps.

⏱️ Save time

Work that took hours by hand happens in a blink, on its own.

βœ… Fewer mistakes

No more typos from copying numbers between apps.

πŸ“ˆ Grow easily

Ten customers or ten thousand β€” it keeps up without extra staff.

πŸ’Ά New income

You can even sell access β€” partners pay to use your API.

πŸŒ™ Always on

It answers day and night, weekends and holidays included.

🀝 Better partnerships

Give partners a clean, safe door instead of raw access.

3 The parts that make one

πŸšͺ

A door

A clear, documented place to ask for things.

πŸ›‘οΈ

A guard

Keys and limits so only allowed callers get in.

🧠

A brain

The rules and logic that do the real work.

πŸ—„οΈ

A memory

Where your data safely lives and is looked up.

4 The process, step by step

5 What you actually get

βœ… A live, working API πŸ“– Plain docs anyone can follow πŸ” Keys & safe access control 🚦 Limits so it can't be abused πŸ§ͺ Tests that prove it works 🌐 A demo page to show it off πŸ“¦ Everything owned by you

6 Built to a secure, professional standard

A public API is part of your brand β€” it's a front door the whole internet can knock on. So it's built the way a bank builds a vault, not the way a hobby project throws something online. Every API in this family is shipped to the same standard:

πŸ”’ Encrypted by default

HTTPS everywhere with automatic certificates and HSTS β€” data is never sent in the clear.

🚦 Abuse-resistant

Per-caller rate limits at the gateway stop floods and keep it fair and available for everyone.

🧰 Standards-based

A documented OpenAPI contract, predictable JSON, and clear status codes β€” the conventions every developer already expects.

πŸ›‘οΈ Hardened surface

Locked-down servers, no version banners to probe, input validated, and no secrets in the code.

🧾 Provable & auditable

Versioned data and reproducible results, so an answer can be traced back to its source and defended.

βœ… Tested & monitored

Automated tests prove behaviour before release, and health checks keep it honest in production.

Why that's good for your brand online

A clean, reliable, well-documented API is a quiet but powerful marketing asset. It tells partners and customers you're serious β€” and it earns trust that spreads on its own:

🀝 Partners integrate faster and trust you more πŸ”Ž Public docs get found and shared ⭐ "It just works" becomes your reputation 🧩 Developers recommend tools they enjoy using 🌍 A branded endpoint (your domain) reinforces who built it

πŸͺͺ A real example: this DPP API

This isn't theory β€” the page you're on is served by a real API I built. It tackles a concrete problem from the EU Digital Product Passport: from 18 February 2027, every EV, LMT and industrial battery over 2 kWh sold in the EU must carry a passport that a phone can scan, that is registered with the Commission, and that shows different data to different people.

The question your app asks:

POST /v1/passports
{ "category": "battery-ev", "attributes": { … } }

The clean answer it hands back: a unique identifier, a scannable QR code, and a public web address for that exact battery β€” plus one call to register it with the EU registry, and a resolver that quietly hides the confidential attributes from anyone who isn't entitled to see them.

Building it yourself
Months of spec 😩
With the API
An afternoon ⚑
Who sees what
Decided for you πŸ”

The same building blocks β€” a door, a guard, a brain, a memory β€” pointed at one real problem. The same kit can become an API for your idea.

πŸ‘‹ Want an API for your idea?

This API was designed and built by Allan NiΓ±al, an AI & software engineer who ships friendly, well-made, developer-first APIs and data products. Tell me the problem in plain words β€” product passports, compliance, traceability, or anything else β€” and I'll turn it into something that works.