Commands

Remote charging commands on ChargeIndia Hub.

Endpoints

MethodPathCallerAuthDescription
POST/ocpi/2.2.1/commands/{command}eMSPYesSend command to CPO
POST/ocpi/2.2.1/commands/callback/{command_id}CPONoAsync command result

Hub role: RECEIVER

Supported commands

CommandDescription
START_SESSIONRemotely start a charging session
STOP_SESSIONRemotely stop an active session
RESERVE_NOWReserve a connector
CANCEL_RESERVATIONCancel 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

  1. Hub forwards command to CPO
  2. CPO responds immediately (ACCEPTED / REJECTED)
  3. CPO sends async result to Hub: POST /commands/callback/{command_id} (no auth)
  4. 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.