Skip to content
Documentation Menu

OCPI Roaming

Source: OCPI 2.2.1 Specification

OCPI Roaming describes the Open Charge Point Interface REST protocol used by CPOs and eMSPs to exchange locations, sessions, CDRs, tariffs, and tokens for EV roaming. Roaming begins with a credentials handshake where each party registers a versions endpoint and swaps tokens; the emulator supports both OCPI 2.1.1 and OCPI 2.2.1.

OCPI (Open Charge Point Interface) is the REST API that lets CPOs and eMSPs exchange locations, sessions, CDRs, tariffs, and tokens for roaming. The emulator can play either side so you can validate interoperability without a live roaming partner.

Roles

  • CPO (Charge Point Operator) — exposes locations, pushes sessions and CDRs, and authorizes tokens.
  • eMSP (e-Mobility Service Provider) — consumes locations, issues tokens, and receives session and CDR updates.

The credentials handshake

Roaming starts with a credentials exchange. Each party registers its versions endpoint and swaps tokens:

  1. Partner A sends its token and versions URL to Partner B's credentials.
  2. Partner B fetches versions, picks one, and replies with its own credentials.
  3. Both sides now hold the tokens needed to call each other's modules.

Core modules

ModuleDirectionPurpose
LocationsCPO → eMSPWhere chargers are and their status
SessionsCPO → eMSPLive charging session updates
CDRsCPO → eMSPFinal billing records
TariffsCPO → eMSPPricing
TokenseMSP → CPOAuthorization identifiers
CommandseMSP → CPORemote start/stop, reserve

Versions

The emulator supports both OCPI 2.1.1 (alpha-3 country codes, no hub) and 2.2.1 (alpha-2 + party_id, hub, charging profiles), so you can test against whichever your partner runs.

Go deeper

  • OCPI 2.1.1 Modules — the full 2.1.1 specification, one page per module (Locations, Sessions, CDRs, Tariffs, Tokens, Commands, Credentials, and more).
  • OCPI 2.2.1 Examples — real example payloads by object type (Locations, Sessions, CDRs, Tariffs, Tokens, Credentials, Versions).