Learning Hub/Scenarios
Explanations use OCPI 2.2.1. Physical and billing-system events are authored examples.

Part of the lesson OCPI charging session lifecycle

CPO pushes the new Session to the eMSP

Start here
8 min
OCPI 2.1.1, 2.2.1 and 2.3.0Test this flow runs against an eMSP endpoint you have registered. The endpoint test grades your endpoint's answer to each Session push. It does not read the stored Session back.
Test this flow
CPO pushes the new Session to the eMSP

The charger begins delivering energy. The CPO creates a session record and pushes it to the eMSP so the driver can see charging progress in their app.

Sandbox run · OCPI 2.2.1

Run this exchange in the sandbox

Sandbox fault · OCPI 2.2.1

See one rule fail in the sandbox

The CPO sends a Session without its currency

The run sends one Session PUT with no currency, a field every Session carries. The rule binds the sender, so the finding is the sender's. How the eMSP answers is shown as an observation, not a verdict.

"|currency |string(3) |1 |ISO 4217 code of the currency used for this session."OCPI 2.2.1 Sessions module · #mod_sessions_session_object
CPO
EMSP
"When the CPO creates a Session object they push it to the corresponding eMSP by calling PUT on the eMSP's Sessions endpoint with the newly created Session object. Any changes to a Session in the CPO system are sent to the eMSP system by calling PATCH on the eMSP's Sessions endpoint with the updated Session object. Sessions cannot be deleted, final status of a session is: `COMPLETED`. When the CPO is not sure about the state or existence of a Session object in the eMSP's system, the CPO can call GET on the eMSP's Sessions endpoint to validate the Session object in the eMSP's system."OCPI 2.2.1 Sessions module · #mod_sessions_push_model
Explore the sessions module →
Message Flow⚡UUserCChargerCCPOsendereeMSPreceiverStep 5 of 10