Hub role: RECEIVER
Supported commands
| Command | Description |
|---|---|
START_SESSION | Remotely start a charging session |
STOP_SESSION | Remotely stop an active session |
RESERVE_NOW | Reserve a connector |
CANCEL_RESERVATION | Cancel a reservation |
UNLOCK_CONNECTOR | Unlock a connector |
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
POST | /ocpi/2.2.1/commands/{command} | Yes | Receive command from eMSP via Hub |
POST | /ocpi/2.2.1/commands/callback/{command_id} | Yes (CPO token) | Send async command result to Hub |
The Hub forwards commands from eMSPs to your platform. Inbound requests include OCPI 2.2.1 Message Routing headers (OCPI-from-* = eMSP, OCPI-to-* = your CPO). Accept them; do not require Credentials-style omission. See Message routing headers.
Return an immediate ACCEPTED or REJECTED response, then deliver async results to Hub, not directly to the eMSP:
POST /ocpi/2.2.1/commands/callback/{command_id}
Authorization: Token {cpo-token}
Content-Type: application/json
You must authenticate as the CPO that owns the command. Wrong or missing auth → HTTP 401. Hub then forwards the CommandResult to the eMSP response_url using the eMSP's stored Hub credentials.
Callback after ACCEPTED
If you return immediate ACCEPTED but the charger never starts, you must still POST the callback with a final CommandResult (TIMEOUT, REJECTED, etc.). Hub does not invent that callback for the eMSP. See Failure scenarios.
Rate limit
50 requests/minute per party.
Related docs
OCPI spec
See OCPI 2.2.1 Commands module for full command and result objects.