Sessions
Sessions in OCPI 2.1.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.
Sources (4)
Example payload · zero-energy-active
{
"id": "EXAMPLE-SESSION",
"kwh": 0,
"auth_method": "WHITELIST",
"currency": "EUR",
"status": "ACTIVE",
"last_updated": "2026-01-01T00:00:00Z",
"start_datetime": "2026-01-01T00:00:00Z",
"auth_id": "EXAMPLE-CONTRACT",
"location": {
"id": "EXAMPLE-LOCATION",
"type": "ON_STREET",
"address": "Example Street 1",
"city": "Utrecht",
"postal_code": "3511AA",
"country": "NLD",
"coordinates": {
"latitude": "52.090700",
"longitude": "5.121400"
},
"evses": [
{
"uid": "EXAMPLE-EVSE",
"status": "AVAILABLE",
"connectors": [
{
"id": "1",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"power_type": "AC_3_PHASE",
"voltage": 230,
"amperage": 32,
"last_updated": "2026-01-01T00:00:00Z"
}
],
"last_updated": "2026-01-01T00:00:00Z"
}
],
"last_updated": "2026-01-01T00:00:00Z"
}
}Example payload · update-cost
{
"total_cost": 0.6
}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
Fetch Session objects of charging sessions last updated between the {date_from} and {date_to} (paginated)
GET/ocpi/ 2.1.1/ sessions/
Source
eMSP
Get the Session object from the eMSP system by its id {session_id}.
GET/ocpi/ 2.1.1/ sessions/ {country_code}/ {party_id}/ {session_id} Send a new/updated Session object
PUT/ocpi/ 2.1.1/ sessions/ {country_code}/ {party_id}/ {session_id} Update the Session object of id {session_id}.
PATCH/ocpi/ 2.1.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.