This guide covers what CPOs must send to and receive from ChargeIndia Hub.
Your reading path
Follow this order for a complete CPO integration:
- Getting Started → Onboarding → Authentication
- Routing → Hub Receiver Identity
- Locations → Tariffs → Sessions → CDRs
- Tokens (receive) → Commands (receive)
- Session Lifecycle → Connection Health → Certification → Support
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)
| Module | Methods | What to push |
|---|---|---|
| Locations | PUT, PATCH | Locations, EVSEs, connectors |
| Tariffs | PUT | Pricing for your charge points |
| Sessions | PUT | Session state updates |
| CDRs | POST | Completed 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:
| Module | Method | Purpose |
|---|---|---|
| Tokens | PUT .../authorize | Realtime token authorization from eMSP via Hub |
| Commands | POST .../commands/{command} | Remote start, stop, reserve, cancel |
| Versions | GET /ocpi/versions | Hub 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:
| Command | Description |
|---|---|
START_SESSION | Begin a charging session remotely |
STOP_SESSION | End an active session |
RESERVE_NOW | Reserve a connector |
CANCEL_RESERVATION | Cancel 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
locationsandtariffswith roleSENDER - Hub credentials registration or endpoint refresh has stored those URLs
- Hub calls
GET /ocpi/2.2.1/locationsandGET /ocpi/2.2.1/tariffs(paginated, optionaldate_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/versionsreachable for health checks