Skip to navigation

Set charging preferences on a partner session (2.2.1 / 2.3.0)

Sends the CPO charging preferences (profile type, departure time, energy need) for a session it runs. OCPI 2.2.1 and 2.3.0 only.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionenumRequired

OCPI version: 221 (2.2.1) or 230 (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.

Allowed values:
session_idstringRequired1-36 characters

Query parameters

partner_idintegerRequired>=1

Roaming partner to talk to: the roaming_partner_id from GET /ocpi/partners, not its id.

to_country_codestring or nullOptionalformat: "^[A-Za-z]{2}$"=2 characters

Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with to_party_id; through a Hub the request is refused (400) when neither is set and the target is not cached.

to_party_idstring or nullOptionalformat: "^[A-Za-z0-9]{3}$"=3 characters

Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with to_country_code.

Request

This endpoint expects an object.
profile_typeenumRequired
Allowed values:
departure_timedatetime or nullOptional
energy_needdouble or nullOptional>=0
kWh.
discharge_allowedbooleanOptionalDefaults to false

Response

Successful Response
session_idstring
resultenum or nullOptional
Allowed values:
http_statusinteger or nullOptional
ocpi_status_codeinteger or nullOptional
errorstring or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
504
Gateway Timeout Error