Developers · Core concepts

Why there is no DELETE

Battery passports must stay available for ten years, so the API never removes records. What to do instead: recycle, change status, or delete in the app with an audit trail.

Version
v1.0.0
Base URL
https://dppapi-production.up.railway.app/v1
Format
JSON · OpenAPI 3.1
FeedbackLast updated

Cet article n'est pas encore disponible en français ; il est affiché ci-dessous en anglais.

On this pageThe rule

The rule

The API never removes a record. Any DELETE request made with an API key is refused with 403, whatever the key’s scopes:

403 · any DELETE with an API key
{"error": "method_not_allowed_for_api_keys"}

Why

Under Regulation (EU) 2023/1542, a battery passport has to remain available for ten years (Art. 77). The identifier printed on the battery must keep resolving, and what the passport claimed has to stay answerable long after it was published. An integration that can delete passports can also break that obligation by accident — a sync job with a bad filter, a test script pointed at production.

So deletion is a deliberate act by a person, not something a machine does. It happens in the app, by a signed-in user, and is written to the audit trail with who did it and when.

What to do instead

You want to…Do this
Correct a value on a modelPATCH /models/{id} with the corrected fields. The change is recorded in the audit trail.
Record that a battery was recycledPOST /passports/{id}/recycle. The passport ceases and the resolver answers 410.
Mark many batteries as waste or recycledPOST /passports/bulk-lifecycle with event waste or recycle.
Remove something created by mistakeDelete it in the app, signed in. Every deletion is written to the audit trail.
Stop an integration from writingRevoke its key in the app. Nothing it wrote is removed.
Stop webhook deliveriesPATCH /webhooks/{id} with enabled: false. The endpoint and its delivery log are kept.

Recycling a battery

When a battery is recycled its passport ceases to exist (Art. 77(8)). Recording it is a write, not a delete: the passport moves to WASTE and its lifecycle state to CEASED_RECYCLED, a status change is appended to the history, and from then on the public resolver answers 410 Gone — so anyone scanning the code learns the battery was recycled rather than that the passport is missing.

curl -X POST "https://dppapi-production.up.railway.app/v1/passports/cm1q8y0bq0006l70fx9y8z7w6/recycle" \-H "Authorization: Bearer $DPP_API_KEY" \-H "Content-Type: application/json" \-d '{"note": "Received by recycler, certificate R-2031-0042"}'

The body is optional; note (up to 500 characters) is kept on the history entry.

Préférences en matière de cookies

Vous choisissez les cookies utilisés. Vous pouvez modifier votre choix à tout moment via « Paramètres des cookies » en bas de page. Politique de confidentialité

Nécessaires

Toujours actifs

Indispensables au fonctionnement du site : votre thème clair/sombre et ce choix de cookies sont enregistrés dans votre navigateur. Ils ne servent pas à vous suivre.

Analyse

Google Analytics 4 mesure l’utilisation des pages au moyen de statistiques, ce qui nous aide à améliorer le site. Si vous acceptez, il dépose des cookies et mesure votre visite en détail. Si vous refusez, il ne dépose aucun cookie, mais Google peut tout de même recevoir des données techniques, comme la page consultée, le type de navigateur et l’adresse IP.

_ga, _ga_* · jusqu’à 2 ans · Google