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

Este artículo aún no está disponible en español; se muestra a continuación en inglés.

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.

Preferencias de cookies

Tú decides qué cookies se usan. Puedes cambiar tu elección en cualquier momento desde «Configuración de cookies» en el pie de página. Política de privacidad

Necesarias

Siempre activas

Imprescindibles para que el sitio funcione: tu tema claro/oscuro y esta elección de cookies se guardan en tu navegador. No sirven para rastrearte.

Analítica

Google Analytics 4 mide cómo se usan las páginas mediante estadísticas, lo que nos ayuda a mejorar el sitio. Si aceptas, instala cookies y mide tu visita por completo. Si rechazas, no instala cookies, pero Google aún puede recibir datos técnicos como la página vista, el tipo de navegador y la dirección IP.

_ga, _ga_* · hasta 2 años · Google