Real-time updates during charging

Intermediate

OCPI 2.1.1

Compare this step across versions

How the CPO keeps the eMSP informed about a Session while energy flows to the vehicle.

What happens while you're charging?

What You'll Learn:
  • How the CPO pushes a new Session to the eMSP with PUT
  • How the CPO sends each change to that Session with PATCH
  • What the eMSP answers
The Players in This Lesson:
CPO
CPO
eMSP
EMSP
Message Flow:
Step 0 of 2
CPO

PUT /sessions/{country_code}/{party_id}/{session_id}

eMSP

Message: New Session

Details: The CPO pushes the Session it just created to the eMSP's Sessions endpoint.

"When the CPO creates a Session object they push it to the eMSPs by calling PUT on the eMSPs Sessions endpoint with the newly created Session object."OCPI 2.1.1 Sessions module · #11-push-model"Response code, as listed in Status Codes, indicates how the request was handled. To avoid confusion with HTTP codes, at least four digits are used."OCPI 2.1.1 Transport and format chapter · #response-format"|1000 |Generic success code"OCPI 2.1.1 Status codes chapter · #1xxx-success
What OCPI 2.1.1 defines for this lesson
Modules in this version
Locations
Sessions
CDRs
Tariffs
Tokens
Commands
Credentials
Hub Client Info
Charging Profiles
Payments
Bookings
No advertised interface-role field

Endpoint descriptions name the module and URL without an interface-role field.

The header carries the token value

The request header carries the shared credentials token value.

Session ID uses case-sensitive text

The Session ID uses text whose letter case matters.