CPO Integration Guide

How Charge Point Operators integrate with ChargeIndia Hub.

This guide covers what CPOs must send to and receive from ChargeIndia Hub.

Your reading path

Follow this order for a complete CPO integration:

  1. Getting StartedOnboardingAuthentication
  2. RoutingHub Receiver Identity
  3. LocationsTariffsSessionsCDRs
  4. Tokens (receive)Commands (receive)
  5. Session LifecycleConnection HealthCertificationSupport

Migrating from peer-to-peer OCPI? See CPO migration.

Your responsibilities

As a CPO, you own charge points and publish operational data. The Hub aggregates your data for connected eMSPs based on routing rules.

Hub forwards your location, tariff, session, and CDR pushes asynchronously to routed eMSPs. Include a valid cdr_token on every session so delivery can route. eMSP receiver behavior is documented under Async Delivery (eMSP-facing).

Send to Hub (authenticated)

ModuleMethodsWhat to push
LocationsPUT, PATCHLocations, EVSEs, connectors
TariffsPUTPricing for your charge points
SessionsPUTSession state updates
CDRsPOSTCompleted charge detail records

Location updates

Push full location objects when creating or significantly changing a site. Use PATCH for incremental EVSE or connector status updates. The Hub forwards these writes asynchronously to routed eMSPs using your CPO country_code and party_id in the path, unchanged from what you send to Hub.

PUT /ocpi/2.2.1/locations/{country_code}/{party_id}/{location_id}

Use your own CPO identifiers in the path and body. Do not use Hub (CIH) party ids. See Hub Receiver Identity (CPO).

Session updates

Push session state as charging progresses. Include cdr_token with the eMSP's country_code and party_id:

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

cdr_token is required

Every session must include a valid cdr_token identifying the eMSP. Without it, the Hub cannot route async session updates to the correct eMSP.

CDR delivery

After a session completes, POST the CDR:

POST /ocpi/2.2.1/cdrs

Receive from Hub (on your platform)

You must implement these receiver endpoints on your OCPI platform:

ModuleMethodPurpose
TokensPUT .../authorizeRealtime token authorization from eMSP via Hub
CommandsPOST .../commands/{command}Remote start, stop, reserve, cancel
VersionsGET /ocpi/versionsHub health monitoring

Token authorization

When an eMSP initiates charging, the Hub forwards authorization to you:

PUT /ocpi/2.2.1/tokens/{emsp_cc}/{emsp_pid}/{token_uid}/authorize

Respond with ALLOWED, BLOCKED, NOT_ALLOWED, or UNKNOWN.

Commands

The Hub forwards commands from eMSPs:

CommandDescription
START_SESSIONBegin a charging session remotely
STOP_SESSIONEnd an active session
RESERVE_NOWReserve a connector
CANCEL_RESERVATIONCancel a reservation

Return an immediate ACCEPTED or REJECTED response, then deliver async results via the Hub callback URL.

Command callbacks

Async command results are sent to Hub (not directly to eMSP):

POST /ocpi/2.2.1/commands/callback/{command_id}

The Hub forwards the result to the eMSP's original response_url.

Health monitoring

The Hub periodically probes GET /ocpi/versions on your platform. Ensure this endpoint is reachable and returns OCPI 2.2.1. See Connection Health.

Hub-initiated catalog pull (optional)

In addition to CPO push, ChargeIndia Hub operators can manually pull your Locations and Tariffs catalog from your OCPI SENDER interface (admin action). This requires:

  • Your version details advertise locations and tariffs with role SENDER
  • Hub credentials registration or endpoint refresh has stored those URLs
  • Hub calls GET /ocpi/2.2.1/locations and GET /ocpi/2.2.1/tariffs (paginated, optional date_from)

Pulled records are upserted into the Hub database by (country_code, party_id, id) and do not modify existing CDRs. CDRs keep their embedded tariff snapshot at charge time.

Integration checklist

  • [ ] Credentials exchange complete
  • [ ] Location/tariff/session pushes use your CPO {country_code}/{party_id} in path and body
  • [ ] Locations pushed for all public charge points (or Hub admin pull configured)
  • [ ] Tariffs pushed for pricing context (or Hub admin pull configured)
  • [ ] Token authorize endpoint live
  • [ ] Command receiver endpoints live
  • [ ] Session PUT with correct cdr_token
  • [ ] CDR POST after session completion
  • [ ] GET /ocpi/versions reachable for health checks