OCPI 2.2.1 testing
What is OCPI 2.2.1 testing?
OCPI 2.2.1 testing extends core roaming validation with newer workflows often required by hubs and advanced roaming setups. Teams validate the classic modules plus newer ones such as ChargingProfiles and HubClientInfo. They also check richer tariff structures and broader interoperability behavior.
Last reviewed
Best for
- Hub-connected roaming stacks that need more than the core OCPI 2.1.1 baseline.
- Teams validating smart-charging-related roaming workflows and newer tariff behavior.
- Implementations migrating from OCPI 2.1.1 to OCPI 2.2.1 and needing side-by-side validation.
Message coverage
Runnable OCPI 2.2.1 conformance cases per module, for each side the workspace can test. Cases the runner cannot express are not counted.
cdrs- 2 cases
- 6 cases
chargingprofiles- 3 cases
- 4 cases
commands- 5 cases
- 6 cases
credentials- 7 cases
- 7 cases
hubclientinfo- 3 cases
- 3 cases
locations- 8 cases
- 14 cases
sessions- 3 cases
- 10 cases
tariffs- 3 cases
- 5 cases
tokens- 5 cases
- 5 cases
versions- 6 cases
- 6 cases
| Module | Testing a CPO | Testing an eMSP |
|---|---|---|
cdrs | 2 cases | 6 cases |
chargingprofiles | 3 cases | 4 cases |
commands | 5 cases | 6 cases |
credentials | 7 cases | 7 cases |
hubclientinfo | 3 cases | 3 cases |
locations | 8 cases | 14 cases |
sessions | 3 cases | 10 cases |
tariffs | 3 cases | 5 cases |
tokens | 5 cases | 5 cases |
versions | 6 cases | 6 cases |
Example OCPI 2.2.1 hub-oriented flow
OCPI 2.2.1 still uses the core credentials and version-discovery flow, but teams often also need to validate newer hub and smart-charging modules introduced in the newer version.
Party A
Party B
Party A → Party B
GET /versionsParty A → Party B
GET /versions/2.2.1Party A → Party B
POST /credentialsParty B → Party A · response
200 OK with token + endpoints
Hub
Party
Hub → Party
PUT /hubclientinfo/{country_code}/{party_id}Party → Hub · response
200 OK
SCSP or eMSP
CPO
SCSP or eMSP → CPO
PUT /chargingprofiles/{session_id}CPO → SCSP or eMSP · response
200 OK(ChargingProfileResponse: ACCEPTED)CPO → SCSP or eMSP · async callback
POST {response_url}(async ChargingProfileResult)
CPO
eMSP
CPO → eMSP
PUT /sessions/{country_code}/{party_id}/{session_id}eMSP → CPO · response
200 OK
Raw frames
Party A -> Party B: GET /versions
Party A -> Party B: GET /versions/2.2.1
Party A -> Party B: POST /credentials
Party B -> Party A: 200 OK with token + endpoints
Hub -> Party: PUT /hubclientinfo/{country_code}/{party_id}
Party -> Hub: 200 OK
SCSP or eMSP -> CPO: PUT /chargingprofiles/{session_id}
CPO -> SCSP or eMSP: 200 OK (ChargingProfileResponse: ACCEPTED)
CPO -> SCSP or eMSP: POST {response_url} (async ChargingProfileResult)
CPO -> eMSP: PUT /sessions/{country_code}/{party_id}/{session_id}
eMSP -> CPO: 200 OKWhat the workspace asserts
The states and enum values an OCPI 2.2.1 frame is validated against, taken from the OCPI 2.2.1 specification objects.
ConnectionStatusHubClientInfo status
PLANNEDCONNECTED
CONNECTEDto and fromOFFLINE
AlsoSUSPENDED
RoleCredentialsRole roleCPOEMSPHUBNAPNSPOTHERSCSP
ChargingProfileResponseTypeChargingProfileResponse resultACCEPTEDNOT_SUPPORTEDREJECTEDTOO_OFTENUNKNOWN_SESSION
ChargingProfileResultTypeChargingProfileResult resultACCEPTEDREJECTEDUNKNOWN
| Enum | Field | Values |
|---|---|---|
Role | CredentialsRole role | CPOEMSPHUBNAPNSPOTHERSCSP |
ChargingProfileResponseType | ChargingProfileResponse result | ACCEPTEDNOT_SUPPORTEDREJECTEDTOO_OFTENUNKNOWN_SESSION |
ChargingProfileResultType | ChargingProfileResult result | ACCEPTEDREJECTEDUNKNOWN |
Supported hub and smart-charging profiles
Teams usually reach for OCPI 2.2.1 when the roaming stack needs more than baseline partner interoperability and has to cover newer hub and charging-control scenarios.
Hub-oriented roaming
- HubClientInfo and broader participant synchronization
- Prepare for hub onboarding and multi-party coordination paths.
ChargingProfiles over roaming
- OCPI 2.2.1 charging-control flows
- Validate schedule-aware and smart-charging-related partner behavior.
Advanced tariff and field coverage
- Newer metadata and richer interoperability requirements
- Exercise upgraded payloads before production partner rollout.
| Profile | Coverage | Typical validation |
|---|---|---|
| Hub-oriented roaming | HubClientInfo and broader participant synchronization | Prepare for hub onboarding and multi-party coordination paths. |
| ChargingProfiles over roaming | OCPI 2.2.1 charging-control flows | Validate schedule-aware and smart-charging-related partner behavior. |
| Advanced tariff and field coverage | Newer metadata and richer interoperability requirements | Exercise upgraded payloads before production partner rollout. |
What to test
- Core roaming module coverage across credentials, locations, sessions, CDRs, tariffs, tokens, and commands.
- ChargingProfiles behavior across the roaming chain.
- HubClientInfo and hub-oriented participant workflows.
- Compatibility with newer roaming and interoperability requirements.
Common scenarios
Hub onboarding
Validate your OCPI 2.2.1 implementation before connecting to hub infrastructure that expects newer module and field coverage.
Smart charging over roaming
Exercise ChargingProfiles-related workflows where charging control needs to pass through the roaming chain.
Migration from 2.1.1
Check field, module, and behavior differences before upgrading an existing roaming stack to OCPI 2.2.1.
Related resources
Test OCPI 2.2.1 workflows before hub integration goes live
Validate newer roaming modules and hub behavior in a controlled environment instead of debugging against live partners.