Developers · API endpoints

Dynamic data (events)

Record and read the dynamic data of a battery: state of health, cycles, throughput, temperature exposure, negative events.

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

Bu makale İngilizce olarak mevcuttur.

Dynamic data — Annex XIII Point 4 — is append-only: each reading is an event with a type and a payload keyed by API field names. The passport keeps the history; nothing is overwritten. The BMS telemetry guide shows how to stream it.

Personalise the samples. Paste a test key and every snippet uses it — and your own model and passport ids.

POST/v1/passports/{id}/events
write scope

Record dynamic data

Appends one event. Put several readings of the same type in one payload.

Set bmsHistoryInvalidatedByReset when a BMS software reset has invalidated earlier state-of-health history (Art. 14).

Parameters1

  • idstringpathrequired

    The passport id.

Request body3

  • eventTypestringrequired

    SOH_READING, CYCLE_COUNT, LIFETIME_METRIC, OPERATING_CONDITION, NEGATIVE_EVENT, PUT_INTO_SERVICE, STATUS_CHANGE, REPAIR, PERFORMANCE_VALUE or BMS_SOFTWARE_RESET.

  • payloadobjectrequired

    Readings keyed by API field name, e.g. { "cycleCount": 812 }.

  • bmsHistoryInvalidatedByResetbooleanoptional

    Earlier history is no longer valid. Default false.

Headers2

  • Idempotency-Keystringheaderoptional

    Optional. 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"headeroptional

    Optional, live keys. Validate the write in full and store nothing. Test keys always dry-run; see Test keys.

Responses

  • 201Created — The stored event.

Errors6

Webhooks fired

Response fields · 201

object
  • idstring
  • eventTypestring

    One ofPUT_INTO_SERVICEREPAIRSOH_READINGLIFETIME_METRICCYCLE_COUNTSTATUS_CHANGENEGATIVE_EVENTOPERATING_CONDITIONPERFORMANCE_VALUEBMS_SOFTWARE_RESET

  • payloadobject

    Keyed by field name — see /field-catalog, fields of kind dynamic.

  • recordedAtstring · date-time
  • bmsHistoryInvalidatedByResetboolean
POST /v1/passports/{id}/events
curl -X POST "https://dppapi-production.up.railway.app/v1/passports/cm1q8y0bq0006l70fx9y8z7w6/events" \-H "Authorization: Bearer $DPP_API_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: 7b3e0c52-1f7d-4b8a-9a52-2f0e6d1c9a44" \-d '{"eventType": "OPERATING_CONDITION","payload": {"stateOfCharge": 64,"operatingTemperature": 31.5,"timeExtremeHighTemp": 42,"timeChargingExtremeLowTemp": 0}}'
201 Created · The stored event.
{"id": "cm1qa1d7e0009l70f1k2j3h4g","passportId": "cm1q8y0bq0006l70fx9y8z7w6","eventType": "OPERATING_CONDITION","payload": {"stateOfCharge": 64,"operatingTemperature": 31.5,"timeExtremeHighTemp": 42,"timeChargingExtremeLowTemp": 0},"recordedAt": "2027-06-02T07:30:00.000Z","sourceOrgId": "cm1q7v0aa0000l70f1a2b3c4d","bmsHistoryInvalidatedByReset": false}
GET/v1/passports/{id}/events
read scope

List dynamic data

A passport’s events, a page at a time, filtered by time and type.

Parameters5

  • idstringpathrequired

    The passport id.

  • limitintegerqueryoptional

    Page size, 1–200. Default 50.

  • cursorstringqueryoptional

    The next_cursor of the previous page. Omit for the first page.

  • sinceISO 8601 date-timequeryoptional

    Only events recorded at or after this instant.

  • event_typestringqueryoptional

    Only this event type, e.g. SOH_READING.

Responses

  • 200OK — A page of events.

Errors3

Response fields · 200

object
  • has_morebooleanrequired
  • next_cursorstring | nullrequired

    Pass as cursor to get the next page.

GET /v1/passports/{id}/events
curl "https://dppapi-production.up.railway.app/v1/passports/cm1q8y0bq0006l70fx9y8z7w6/events?event_type=SOH_READING&since=2027-01-01T00%3A00%3A00Z" \-H "Authorization: Bearer $DPP_API_KEY"
200 OK · A page of events.
{"data": [{"id": "cm1qa1d7e0009l70f1k2j3h4g","eventType": "SOH_READING","payload": { "remainingCapacity": 14.6, "capacityFade": 2.7 },"recordedAt": "2027-06-02T07:30:00.000Z","bmsHistoryInvalidatedByReset": false}],"has_more": true,"next_cursor": "eyJpZCI6ImNtMXE4eTBicTAwMDZsNzBmeDl5OHo3dzYifQ"}

Çerez tercihleri

Hangi çerezlerin kullanılacağını siz seçersiniz. Tercihinizi istediğiniz zaman alt bilgideki “Çerez ayarları”ndan değiştirebilirsiniz. Gizlilik politikası

Gerekli

Her zaman açık

Sitenin çalışması için gereklidir: açık/koyu tema seçiminiz ve bu çerez tercihiniz tarayıcınızda saklanır. Sizi izlemek için kullanılmazlar.

Analitik

Google Analytics 4, sayfaların nasıl kullanıldığını istatistiklerle ölçer ve siteyi iyileştirmemize yardımcı olur. Kabul ederseniz çerez bırakır ve ziyaretinizi tam olarak ölçer. Reddederseniz çerez bırakmaz, ancak Google yine de görüntülenen sayfa, tarayıcı türü ve IP adresi gibi teknik veriler alabilir.

_ga, _ga_* · en çok 2 yıl · Google