Skip to content

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 versions
  • GET /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 credentials
  • GET /ocpi/cpo/2.3.0/credentials - Get credentials

Locations Module

  • GET /ocpi/cpo/2.3.0/locations - Get list of locations
  • GET /ocpi/cpo/2.3.0/locations/{country_code}/{party_id}/{location_id} - Get location by ID
  • PUT /ocpi/cpo/2.3.0/locations/{country_code}/{party_id}/{location_id} - Create or update location
  • PATCH /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 sessions
  • GET /ocpi/cpo/2.3.0/sessions/{country_code}/{party_id}/{session_id} - Get session by ID
  • PUT /ocpi/cpo/2.3.0/sessions/{country_code}/{party_id}/{session_id} - Create or update session
  • PATCH /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 CDRs
  • GET /ocpi/cpo/2.3.0/cdrs/{country_code}/{party_id}/{cdr_id} - Get CDR by ID
  • POST /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 UID
  • PUT /ocpi/cpo/2.3.0/tokens/{country_code}/{party_id}/{token_uid} - Create or update token
  • PATCH /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 profile
  • PUT /ocpi/cpo/2.3.0/chargingprofiles/{session_id} - Set charging profile
  • DELETE /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 info
  • PUT /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 terminals
  • GET /ocpi/cpo/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id} - Get terminal by ID
  • PUT /ocpi/cpo/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id} - Create or update terminal
  • PATCH /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 credentials
  • POST /ocpi/emsp/2.3.0/credentials - Create or update credentials

Locations Module

  • GET /ocpi/emsp/2.3.0/locations - Get list of locations
  • GET /ocpi/emsp/2.3.0/locations/{country_code}/{party_id}/{location_id} - Get location by ID
  • PUT /ocpi/emsp/2.3.0/locations/{country_code}/{party_id}/{location_id} - Create or update location
  • PATCH /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 sessions
  • GET /ocpi/emsp/2.3.0/sessions/{country_code}/{party_id}/{session_id} - Get session by ID
  • PUT /ocpi/emsp/2.3.0/sessions/{country_code}/{party_id}/{session_id} - Create or update session
  • PATCH /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 CDRs
  • GET /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 tokens
  • POST /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 tariffs
  • GET /ocpi/emsp/2.3.0/tariffs/{country_code}/{party_id}/{tariff_id} - Get tariff by ID
  • PUT /ocpi/emsp/2.3.0/tariffs/{country_code}/{party_id}/{tariff_id} - Create or update tariff
  • DELETE /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 info
  • PUT /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 terminals
  • GET /ocpi/ptp/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id} - Get terminal by ID
  • POST /ocpi/ptp/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id} - Create terminal
  • PATCH /ocpi/ptp/2.3.0/payments/terminals/{country_code}/{party_id}/{terminal_id} - Partially update terminal
  • POST /ocpi/ptp/2.3.0/payments/financial_advice - Send financial advice
  • GET /ocpi/ptp/2.3.0/payments/financial_advice_confirmations - Get list of financial advice confirmations
  • GET /ocpi/ptp/2.3.0/payments/financial_advice_confirmations/{country_code}/{party_id}/{confirmation_id} - Get financial advice confirmation by ID
  • PUT /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.