Sessions
Sessions in OCPI 2.2.1
A Session is the charging record shared between platforms. ACTIVE permits a Session with no transferred energy. Finish it with COMPLETED; OCPI does not delete Sessions. PATCH leaves omitted fields unchanged. A PATCH includes last_updated. The Reservation flow says RESERVED while its SessionStatus enum says RESERVATION. ChargerDojo accepts either value.
Sources (7)
Example payload · zero-energy-active
{
"id": "EXAMPLE-SESSION",
"kwh": 0,
"auth_method": "WHITELIST",
"currency": "EUR",
"status": "ACTIVE",
"last_updated": "2026-01-01T00:00:00Z",
"country_code": "NL",
"party_id": "EXA",
"start_date_time": "2026-01-01T00:00:00Z",
"cdr_token": {
"country_code": "NL",
"party_id": "EXB",
"uid": "EXAMPLE-TOKEN",
"type": "RFID",
"contract_id": "EXAMPLE-CONTRACT"
},
"location_id": "EXAMPLE-LOCATION",
"evse_uid": "EXAMPLE-EVSE",
"connector_id": "1"
}Example payload · update-cost
{
"total_cost": {
"excl_vat": 0.6
},
"last_updated": "2026-01-01T00:01:00Z"
}Which endpoints does this module define?
These paths illustrate the requests. Use the URLs advertised by your partner, replace the placeholders and choose the matching interface. A listed method does not establish that this site's simulator implements it.
CPO · sender interface
Fetch Session objects of charging sessions last updated between the {date_from} and {date_to}(paginated).
GET/ocpi/ 2.2.1/ sessions/ Setting Charging Preferences of an ongoing session.
PUT/ocpi/ 2.2.1/ sessions/ {session_id}/ charging_preferences
Source
eMSP · receiver interface
Retrieve a Session object from the eMSP's system with Session.id equal to {session_id}.
GET/ocpi/ 2.2.1/ sessions/ {country_code}/ {party_id}/ {session_id} Send a new/updated Session object to the eMSP.
PUT/ocpi/ 2.2.1/ sessions/ {country_code}/ {party_id}/ {session_id} Update the Session object with Session.id equal to {session_id}.
PATCH/ocpi/ 2.2.1/ sessions/ {country_code}/ {party_id}/ {session_id}
Source
Try an endpoint
Send a request to this site's OCPI endpoints and read the answer. It never reaches your own system.