Skip to content
Protocol

OCPI 2.2.1 testing

Validate newer OCPI 2.2.1 roaming and hub workflows including ChargingProfiles, HubClientInfo, richer tariff behavior, and broader hub interoperability.
The workspace's OCPI 2.2.1 log with PUT /chargingprofiles/{session_id} selected, answered 200 with ChargingProfileResponse result ACCEPTED; the asynchronous ChargingProfileResult follows on POST {response_url}.
The workspace's OCPI 2.2.1 log with PUT /chargingprofiles/{session_id} selected, answered 200 with ChargingProfileResponse result ACCEPTED; the asynchronous ChargingProfileResult follows on POST {response_url}.

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

    Testing a CPO
    2 cases
    Testing an eMSP
    6 cases
  • chargingprofiles

    Testing a CPO
    3 cases
    Testing an eMSP
    4 cases
  • commands

    Testing a CPO
    5 cases
    Testing an eMSP
    6 cases
  • credentials

    Testing a CPO
    7 cases
    Testing an eMSP
    7 cases
  • hubclientinfo

    Testing a CPO
    3 cases
    Testing an eMSP
    3 cases
  • locations

    Testing a CPO
    8 cases
    Testing an eMSP
    14 cases
  • sessions

    Testing a CPO
    3 cases
    Testing an eMSP
    10 cases
  • tariffs

    Testing a CPO
    3 cases
    Testing an eMSP
    5 cases
  • tokens

    Testing a CPO
    5 cases
    Testing an eMSP
    5 cases
  • versions

    Testing a CPO
    6 cases
    Testing an eMSP
    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.

  1. Credentials

    1. Party A → Party B

      GET /versions

    2. Party A → Party B

      GET /versions/2.2.1

    3. Party A → Party B

      POST /credentials

    4. Party B → Party A · response

      200 OK with token + endpoints

  2. Hub client info

    1. Hub → Party

      PUT /hubclientinfo/{country_code}/{party_id}

    2. Party → Hub · response

      200 OK

  3. Charging profiles

    1. SCSP or eMSP → CPO

      PUT /chargingprofiles/{session_id}

    2. CPO → SCSP or eMSP · response

      200 OK

      (ChargingProfileResponse: ACCEPTED)

    3. CPO → SCSP or eMSP · async callback

      POST {response_url}

      (async ChargingProfileResult)

  4. Sessions

    1. CPO → eMSP

      PUT /sessions/{country_code}/{party_id}/{session_id}

    2. 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 OK

What 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

  1. PLANNED
  2. CONNECTED

CONNECTEDto and fromOFFLINE

AlsoSUSPENDED

The Hub pushes each party's connection status with PUT /hubclientinfo/{country_code}/{party_id}.
  • Role

    Field
    CredentialsRole role
    Values
    CPOEMSPHUBNAPNSPOTHERSCSP
  • ChargingProfileResponseType

    Field
    ChargingProfileResponse result
    Values
    ACCEPTEDNOT_SUPPORTEDREJECTEDTOO_OFTENUNKNOWN_SESSION
  • ChargingProfileResultType

    Field
    ChargingProfileResult result
    Values
    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

    Coverage
    HubClientInfo and broader participant synchronization
    Typical validation
    Prepare for hub onboarding and multi-party coordination paths.
  • ChargingProfiles over roaming

    Coverage
    OCPI 2.2.1 charging-control flows
    Typical validation
    Validate schedule-aware and smart-charging-related partner behavior.
  • Advanced tariff and field coverage

    Coverage
    Newer metadata and richer interoperability requirements
    Typical validation
    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.

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.