An OCPISession is the charging record the CPO shares with the eMSP. In this local example the driver plugs in, then the CPO creates and pushes the record.
What changes in OCPI 2.2.1
Modules in OCPI 2.2.1
Sessions
CDRs
Locations
Tariffs
Tokens
Commands
Credentials
Versions
Hub Client Info
Charging Profiles
Payments · extension
Advertised sender and receiver interfaces
An endpoint declares how another platform can pull or push data. Credentials uses the same interface for both roles.
The header token is encoded
The request header carries an encoded token; the Credentials body still carries the raw token.
Billing records name the Token owner
A charge record names the country and company that own the driver's Token.
Simulated copies · no peer is connected
CPO
Token authorized. No Session yet.
eMSP
Answered: allowed.
Which OCPI exchange does this action illustrate?
The CPO pushes the Session it just created to the eMSP's Sessions endpoint.
Teaching example · request path
PUT /sessions/{country_code}/{party_id}/{session_id}
Sources (2)
"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."OCPI 2.2.1 Sessions module · #mod_sessions_push_model"We also advise that in such cases, platform sending the response leave the `data` field unset in the response format. This applies for example to PUT requests when pushing Session objects, and PATCH requests to add charging periods to Sessions."OCPI 2.2.1 Transport and format chapter · #transport_and_format_response_format
A Session records state, including ACTIVE before any energy has been transferred. The completed charge detail record supports billing; this example does not show a customer debit.
Sources (2)
ACTIVE: The session has been accepted and is active. All pre-conditions were met: Communication between EV and EVSE (for example: cable plugged in correctly), EV or driver is authorized. EV is being charged, or can be charged. Energy is, or is not, being transfered.OCPI 2.2.1 Sessions module · #mod_sessions_sessionstatus_enum"A *Charge Detail Record* is the description of a concluded charging session. The CDR is the only billing-relevant object."OCPI 2.2.1 CDRs module · #mod_cdrs_cdrs_module