Endpoints
| Method | Path | Caller | Auth | Description |
|---|---|---|---|---|
POST | /ocpi/2.2.1/commands/{command} | eMSP | Yes | Send command to CPO |
POST | /ocpi/2.2.1/commands/callback/{command_id} | CPO | No | Async command result |
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 |
START_SESSION example
POST /ocpi/2.2.1/commands/START_SESSION
Authorization: Token {emsp-token}
Content-Type: application/json
{
"response_url": "https://emsp.example.com/ocpi/callbacks/commands",
"token": {
"uid": "TOKEN001",
"type": "RFID",
"contract_id": "CONTRACT001"
},
"location_id": "LOC001",
"evse_uid": "EVSE001",
"connector_id": "1"
}
STOP_SESSION example
Include session_id in the body:
{
"response_url": "https://emsp.example.com/ocpi/callbacks/commands",
"session_id": "SESSION001"
}
Immediate response
{
"status_code": 1000,
"data": {
"result": "ACCEPTED",
"timeout": 30
}
}
Async callback flow
- Hub forwards command to CPO
- CPO responds immediately (
ACCEPTED/REJECTED) - CPO sends async result to Hub:
POST /commands/callback/{command_id}(no auth) - Hub forwards result to eMSP's
response_url
Rate limit
50 requests/minute per party.
Related docs
OCPI spec
See OCPI 2.2.1 Commands module for full command and result objects.