Developers · Guides

Recycling and end of life

Repurpose, re-use, remanufacture, waste and recycling over the API: status changes, linked successor passports and the 410 resolver answer.

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 pageStatuses

A passport follows the battery through every life it has. The API records each transition — and when the battery is finally recycled, the passport ends in a way scanners can understand.

Statuses

StatusMeaningHowEffect
ORIGINALFirst life.—Default.
REPURPOSEDSecond life for another purpose (e.g. EV to stationary storage).PATCH /passports/{id}/statusNew linked passport, new identifier.
REUSEDSame purpose, new user, after checks.PATCH /passports/{id}/statusNew linked passport, new identifier.
REMANUFACTUREDDisassembled and rebuilt.PATCH /passports/{id}/statusNew linked passport, new identifier.
WASTEDiscarded; awaiting treatment.PATCH …/status or bulk wasteStatus only.
RecycledRecycled.POST /passports/{id}/recycle or bulk recyclePassport ceases; resolver answers 410.

Second life: the linked passport

Article 77(7) gives a repurposed, re-used or remanufactured battery a new passport linked to the original. The API creates it for you: a new identifier and passport, published at once, under the responsible organisation you name (newResponsibleOrgId, default yours). Its state-of-health history starts fresh, marked as reset, because the old readings described a different use.

curl -X PATCH "https://dppapi-production.up.railway.app/v1/passports/cm1q8y0bq0006l70fx9y8z7w6/status" \-H "Authorization: Bearer $DPP_API_KEY" \-H "Content-Type: application/json" \-d '{"status": "REPURPOSED","note": "Second life as 20 kWh home storage, contract 2031-118"}'
201 Created
{"forked": true,"childUid": "C-9PXR4T2KWM7","childPassport": {"id": "cm1qc2k8d0031l70fz1y2x3w4","status": "REPURPOSED","publishedAt": "2031-03-02T08:00:00.000Z","qrResolverUrl": "https://dppapi-production.up.railway.app/p/C-9PXR4T2KWM7"}}

Label the battery with the new QR code (GET /passports/{childPassport.id}/qr.svg). GET /passports/{id} on either passport shows the link in parents or children.

Recycling

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 passport ceases to exist (Art. 77(8)): from now on the resolver answers 410 Gone — not 404 — so anyone scanning the code learns the battery was recycled, not that the passport went missing. The record and its history stay in your account and your exports.

Scanning a recycled battery
GET /p/C-7KQ2M9XHT4R HTTP/1.1HTTP/1.1 410 Gonecontent-type: application/json{ "error": "Passport has ceased (battery recycled)" }

Whole fleets

A recycler confirms a shipment
curl -X POST "https://dppapi-production.up.railway.app/v1/passports/bulk-lifecycle" \-H "Authorization: Bearer $DPP_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: recycling-shipment-2031-0042" \-d '{"passportIds": ["cm1q8y0bq0006l70fx9y8z7w6","cm1q8y0bq0008l70fa1b2c3d4"],"event": "recycle"}'

Passports already recycled are skipped and reported as already_recycled; the rest are applied. Each recycled passport fires passport.recycled.

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