Dieser Artikel liegt noch nicht auf Deutsch vor und wird unten auf Englisch angezeigt.
The same change across many passports — up to 1,000 per request — reported per row: 200 when every row succeeded, 207 when some did not. A recycled passport is skipped and named, never silently changed.
Personalise the samples. Paste a test key and every snippet uses it — and your own model and passport ids.
/v1/passports/bulk-lifecycleApply a lifecycle event to many passports
putInService sets the in-service date and records a PUT_INTO_SERVICE event (a date is required). waste sets status WASTE. recycle ends each passport, exactly like Mark as recycled.
Per-battery readings differ by definition, so they are not a bulk lifecycle event — send them with import updates or as events.
Request body3
passportIdsstring[], 1–1000requiredPassport ids.
event"putInService" | "waste" | "recycle"requiredWhat happened.
datedateoptionalRequired for
putInService.
Headers2
Idempotency-KeystringheaderoptionalOptional. A unique string per logical operation (a UUID is ideal). The first response is stored for 24 hours and replayed for retries; see Idempotency.
X-DPP-Dry-Run"true"headeroptionalOptional, live keys. Validate the write in full and store nothing. Test keys always dry-run; see Test keys.
Responses
- 200OK — Per-row results.
Errors4
- 400
Validation faileddetailsnames each invalid field. - 401
unauthorizedThe key is missing, unknown or revoked. - 403
insufficient_scopeThe key has nowritescope. - 422
date_requiredputInServicewithout adate.
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: 7b3e0c52-1f7d-4b8a-9a52-2f0e6d1c9a44" \-d '{"passportIds": ["cm1q8y0bq0006l70fx9y8z7w6","cm1q8y0bq0008l70fa1b2c3d4"],"event": "putInService","date": "2027-03-01"}'{"requested": 2,"applied": 2,"failed": 0,"results": [{ "id": "cm1q8y0bq0006l70fx9y8z7w6", "ok": true },{ "id": "cm1q8y0bq0008l70fa1b2c3d4", "ok": true }]}/v1/passports/import-updatesUpdate many passports from matched rows
Each row is matched to an existing battery of the model by uniqueIdentifier or serialNumber and can set an in-service date, a status (waste or recycled) and readings. Readings are recorded as events of the type their field belongs to. A row that matches nothing changes nothing and is reported as not_found — this endpoint never creates batteries.
Send dryRun: true first to see how many rows match and how many of those are already published, without writing anything.
Request body3
modelIdstringrequiredThe model whose batteries are matched.
rowsarray, 1–1000required[{ uniqueIdentifier?, serialNumber?, putIntoServiceAt?, status?, readings? }];readingsmaps field names to numbers or strings.dryRunbooleanoptionalMatch and count only.
Headers2
Idempotency-KeystringheaderoptionalOptional. A unique string per logical operation (a UUID is ideal). The first response is stored for 24 hours and replayed for retries; see Idempotency.
X-DPP-Dry-Run"true"headeroptionalOptional, live keys. Validate the write in full and store nothing. Test keys always dry-run; see Test keys.
Responses
- 200OK — Per-row results;
changesnames what was applied.
Errors4
- 400
Validation faileddetailsnames each invalid field. - 401
unauthorizedThe key is missing, unknown or revoked. - 403
insufficient_scopeThe key has nowritescope. - 404
Not foundNo model with this id in your organisation.
curl -X POST "https://dppapi-production.up.railway.app/v1/passports/import-updates" \-H "Authorization: Bearer $DPP_API_KEY" \-H "Content-Type: application/json" \-d '{"modelId": "cm1q8x2k40003l70f9a8s7d6e","rows": [{"serialNumber": "C48-2027-0001","readings": {"cycleCount": 812,"remainingCapacity": 14.1}},{"serialNumber": "C48-2027-0002","status": "waste"}]}'{"requested": 2,"updated": 2,"failed": 0,"results": [{ "key": "C48-2027-0001", "ok": true, "changes": ["cycleCount", "remainingCapacity"] },{ "key": "C48-2027-0002", "ok": true, "changes": ["status:waste"] }]}