- Reference
- OCPI 2.1.1 (eMSP)
- Receiver Commands
OpenAPI reference
Receiver Commands
/commands/{command}/{uid}Receive the asynchronous CommandResult that the CPO posts to the eMSP-supplied ``response_url`` after dispatching a command at the Charge Point.
API: OCPI 2.1.1 (eMSP) · Module: Commands (eMSP)
Base path:/commands· Base URL:https://ocpi-api.gridos.co/ocpi/emsp/2.1.1
Overview
POST /commands/{command}/{uid}Absolute URL: https://ocpi-api.gridos.co/ocpi/emsp/2.1.1/commands/{command}/{uid}
Receive the asynchronous CommandResult that the CPO posts to the eMSP-supplied response_url after dispatching a command at the Charge Point.
Requires authentication. Use Authorization: Token <token>. See OCPI credentials.
How to call
Quick Shell sample (set OCPI_TOKEN when auth is required). Full Python and TypeScript under Examples.
curl -sS -X POST 'https://ocpi-api.gridos.co/ocpi/emsp/2.1.1/commands/CMD1/example' \
-H "Authorization: Token $OCPI_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"result":"ACCEPTED"}'Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
command | CommandType | Yes | The command type (e.g. START_SESSION). |
uid | string | Yes | Unique ID used to identify the specific command request. |
Request body
application/json · Required
Schema: CommandResponse
| Field | Type | Required | Description |
|---|---|---|---|
result | `"NOT_SUPPORTED" | "REJECTED" | "ACCEPTED" |
Request examples
Example 1
{
"result": "ACCEPTED"
}Example 2
{
"result": "TIMEOUT"
}Responses
| Status | Description | Schema |
|---|---|---|
200 | Successful Response | CommandResponseEnvelope |
400 | Invalid or missing parameters (HTTP 200, OCPI envelope) | — |
401 | Unauthorized | — |
422 | Validation Error | HTTPValidationError |
200 — successful response
application/json
Schema: CommandResponseEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
status_code | integer | No | Default: 1000 |
status_message | string | No | — |
timestamp | string (date-time) | No | — |
data | CommandResponse | No | CommandResponse |
Response example
{
"status_code": 1000,
"status_message": "Success",
"timestamp": "2015-06-29T22:39:09Z",
"data": {
"result": "ACCEPTED"
}
}400 — invalid or missing parameters (HTTP 200, OCPI envelope)
application/json
Response example
{
"status_code": 2001,
"status_message": "Invalid or missing parameters",
"timestamp": "2025-01-01T00:00:00Z",
"doc_url": "https://github.com/ocpplab/ocpi-gateway/blob/main/docs/errors.md#2001-invalid-parameters",
"errors": [
{
"field": "country_code",
"message": "expected 'NL' to match Token A identity",
"type": "value_error.identity_mismatch"
}
]
}401 — unauthorized
application/json
Response example
{
"status_code": 2000,
"status_message": "Unauthorized",
"timestamp": "2025-01-01T00:00:00Z"
}422 — validation error
application/json
Schema: HTTPValidationError
| Field | Type | Required | Description |
|---|---|---|---|
detail | ValidationError[] | No | Detail |
Response example
{
"detail": [
{
"loc": [],
"msg": "string",
"type": "string",
"input": {
"_type": "Input"
},
"ctx": {
"_type": "Context"
}
}
]
}Examples
Shell, Python, and TypeScript (set OCPI_TOKEN when auth is required).
curl -sS -X POST 'https://ocpi-api.gridos.co/ocpi/emsp/2.1.1/commands/CMD1/example' \
-H "Authorization: Token $OCPI_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"result":"ACCEPTED"}'