OCPI 2.3.0 API Reference¶
Complete API reference for OCPI 2.3.0 implementation.
Version Endpoints¶
The version endpoints provide information about available OCPI versions and version-specific details.
GET /ocpi/versions- Get list of available OCPI versionsGET /ocpi/2.3.0/details- Get details for OCPI version 2.3.0
CPO Role Endpoints¶
Credentials Module¶
POST /ocpi/cpo/2.3.0/credentials- Create or update credentialsGET /ocpi/cpo/2.3.0/credentials- Get credentials
Locations Module¶
GET /ocpi/cpo/2.3.0/locations- Get list of locationsGET /ocpi/cpo/2.3.0/locations/{country_code}/{party_id}/{location_id}- Get location by IDPUT /ocpi/cpo/2.3.0/locations/{country_code}/{party_id}/{location_id}- Create or update locationPATCH /ocpi/cpo/2.3.0/locations/{country_code}/{party_id}/{location_id}- Partially update location
Sessions Module¶
GET /ocpi/cpo/2.3.0/sessions- Get list of sessionsGET /ocpi/cpo/2.3.0/sessions/{country_code}/{party_id}/{session_id}- Get session by IDPUT /ocpi/cpo/2.3.0/sessions/{country_code}/{party_id}/{session_id}- Create or update sessionPATCH /ocpi/cpo/2.3.0/sessions/{country_code}/{party_id}/{session_id}- Partially update session
CDRs Module¶
GET /ocpi/cpo/2.3.0/cdrs- Get list of CDRsGET /ocpi/cpo/2.3.0/cdrs/{country_code}/{party_id}/{cdr_id}- Get CDR by IDPOST /ocpi/cpo/2.3.0/cdrs- Create new CDR
Tokens Module¶
GET /ocpi/cpo/2.3.0/tokens/{country_code}/{party_id}/{token_uid}- Get token by UIDPUT /ocpi/cpo/2.3.0/tokens/{country_code}/{party_id}/{token_uid}- Create or update tokenPATCH /ocpi/cpo/2.3.0/tokens/{country_code}/{party_id}/{token_uid}- Partially update token
Tariffs Module¶
GET /ocpi/cpo/2.3.0/tariffs- Get list of tariffs
Commands Module¶
POST /ocpi/cpo/2.3.0/commands/{command}- Send command (START_SESSION, STOP_SESSION, RESERVE_NOW, UNLOCK_CONNECTOR)
Charging Profiles Module¶
GET /ocpi/cpo/2.3.0/chargingprofiles/{session_id}- Get active charging profilePUT /ocpi/cpo/2.3.0/chargingprofiles/{session_id}- Set charging profileDELETE /ocpi/cpo/2.3.0/chargingprofiles/{session_id}- Clear charging profile
Hub Client Info Module¶
GET /ocpi/cpo/2.3.0/hubclientinfo- Get hub client infoPUT /ocpi/cpo/2.3.0/hubclientinfo- Create or update hub client info
Payments Module¶
GET /ocpi/cpo/2.3.0/payments/terminals- Get list of terminalsGET /ocpi/cpo/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id}- Get terminal by IDPUT /ocpi/cpo/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id}- Create or update terminalPATCH /ocpi/cpo/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id}- Partially update terminal
EMSP Role Endpoints¶
Credentials Module¶
GET /ocpi/emsp/2.3.0/credentials- Get credentialsPOST /ocpi/emsp/2.3.0/credentials- Create or update credentials
Locations Module¶
GET /ocpi/emsp/2.3.0/locations- Get list of locationsGET /ocpi/emsp/2.3.0/locations/{country_code}/{party_id}/{location_id}- Get location by IDPUT /ocpi/emsp/2.3.0/locations/{country_code}/{party_id}/{location_id}- Create or update locationPATCH /ocpi/emsp/2.3.0/locations/{country_code}/{party_id}/{location_id}- Partially update location
Sessions Module¶
GET /ocpi/emsp/2.3.0/sessions- Get list of sessionsGET /ocpi/emsp/2.3.0/sessions/{country_code}/{party_id}/{session_id}- Get session by IDPUT /ocpi/emsp/2.3.0/sessions/{country_code}/{party_id}/{session_id}- Create or update sessionPATCH /ocpi/emsp/2.3.0/sessions/{country_code}/{party_id}/{session_id}- Partially update session
CDRs Module¶
GET /ocpi/emsp/2.3.0/cdrs- Get list of CDRsGET /ocpi/emsp/2.3.0/cdrs/{country_code}/{party_id}/{cdr_id}- Get CDR by ID
Tokens Module¶
GET /ocpi/emsp/2.3.0/tokens- Get list of tokensPOST /ocpi/emsp/2.3.0/tokens/{country_code}/{party_id}/{token_uid}/authorize- Authorize token
Tariffs Module¶
GET /ocpi/emsp/2.3.0/tariffs- Get list of tariffsGET /ocpi/emsp/2.3.0/tariffs/{country_code}/{party_id}/{tariff_id}- Get tariff by IDPUT /ocpi/emsp/2.3.0/tariffs/{country_code}/{party_id}/{tariff_id}- Create or update tariffDELETE /ocpi/emsp/2.3.0/tariffs/{country_code}/{party_id}/{tariff_id}- Delete tariff
Commands Module¶
POST /ocpi/emsp/2.3.0/commands/{command}/{uid}- Send command result
Charging Profiles Module¶
GET /ocpi/emsp/2.3.0/chargingprofiles/{session_id}- Get active charging profile
Hub Client Info Module¶
GET /ocpi/emsp/2.3.0/hubclientinfo- Get hub client infoPUT /ocpi/emsp/2.3.0/hubclientinfo- Create or update hub client info
PTP Role Endpoints¶
Payments Module¶
GET /ocpi/ptp/2.3.0/payments/terminals- Get list of terminalsGET /ocpi/ptp/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id}- Get terminal by IDPOST /ocpi/ptp/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id}- Create terminalPATCH /ocpi/ptp/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id}- Partially update terminalPOST /ocpi/ptp/2.3.0/payments/financial_advice- Send financial adviceGET /ocpi/ptp/2.3.0/payments/financial_advice_confirmations- Get list of financial advice confirmationsGET /ocpi/ptp/2.3.0/payments/financial_advice_confirmations/{country_code}/{party_id}/{confirmation_id}- Get financial advice confirmation by IDPUT /ocpi/ptp/2.3.0/payments/financial_advice_confirmations/{country_code}/{party_id}/{confirmation_id}- Create or update financial advice confirmation
Schemas¶
For detailed schema documentation, see the Quick Start Guide and check the FastAPI auto-generated documentation at /docs when running the application.