Commands (CPO)

Receive remote charging commands from ChargeIndia Hub and send async callbacks.

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
UNLOCK_CONNECTORUnlock a connector

Endpoints

MethodPathAuthDescription
POST/ocpi/2.2.1/commands/{command}YesReceive 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.

OCPI spec

See OCPI 2.2.1 Commands module for full command and result objects.