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

Cookie preferences

You choose which cookies are used. You can change your choice at any time with “Cookie settings” in the footer. Privacy policy

Necessary

Always on

Needed for the site to work: your light/dark theme and this cookie choice are stored in your browser. They do not track you.

Analytics

Google Analytics 4 measures how pages are used through statistics, which helps us improve the site. If you accept, it sets cookies and measures your visit in full. If you decline, it sets no cookies, but Google may still receive technical data such as the page viewed, your browser type and IP address.

_ga, _ga_* · up to 2 years · Google