- Reference
- OCPI 2.2.1 (eMSP)
- Receiver Connector
OpenAPI reference
Receiver Connector
/locations/{country_code}/{party_id}/{location_id}/{evse_uid}/{connector_id}Push a new or updated Connector object. Path ``connector_id`` MUST equal ``body.id`` (2001 on mismatch).
API: OCPI 2.2.1 (eMSP) · Module: Locations (eMSP)
Base path:/locations· Base URL:https://ocpi-api.gridos.co/ocpi/emsp/2.2.1
Overview
PUT /locations/{country_code}/{party_id}/{location_id}/{evse_uid}/{connector_id}Absolute URL: https://ocpi-api.gridos.co/ocpi/emsp/2.2.1/locations/{country_code}/{party_id}/{location_id}/{evse_uid}/{connector_id}
Push a new or updated Connector object. Path connector_id MUST equal body.id (2001 on mismatch).
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 PUT 'https://ocpi-api.gridos.co/ocpi/emsp/2.2.1/locations/NL/ABC/LOC1/EVSE1/1' \
-H "Authorization: Token $OCPI_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"id":"1","standard":"IEC_62196_T2","format":"CABLE","power_type":"AC_3_PHASE","max_voltage":220,"max_amperage":16,"tariff_ids":["11"],"last_updated":"2015-06-29T21:39:01Z"}'Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
country_code | string | Yes | ISO-3166 alpha-2 country code (uppercase). |
party_id | string | Yes | CPO/eMSP party ID (ISO-15118, 3 uppercase alphanumerics). |
location_id | string | Yes | Location.id of the Location object. |
evse_uid | string | Yes | EVSE.uid of the EVSE object. |
connector_id | string | Yes | Connector.id of the Connector object. |
Request body
application/json · Required
Schema: Connector
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
standard | `"CHADEMO" | "CHAOJI" | "DOMESTIC_A" |
format | `"SOCKET" | "CABLE"` | Yes |
power_type | `"AC_1_PHASE" | "AC_2_PHASE" | "AC_2_PHASE_SPLIT" |
max_voltage | integer | Yes | — |
max_amperage | integer | Yes | — |
max_electric_power | integer | No | — |
tariff_ids | string[] | No | — |
terms_and_conditions | string | No | — |
last_updated | string (date-time) | Yes | — |
Request example
{
"id": "1",
"standard": "IEC_62196_T2",
"format": "CABLE",
"power_type": "AC_3_PHASE",
"max_voltage": 220,
"max_amperage": 16,
"tariff_ids": [
"11"
],
"last_updated": "2015-06-29T21:39:01Z"
}Responses
| Status | Description | Schema |
|---|---|---|
200 | Successful Response | ConnectorResponse |
400 | Invalid or missing parameters (HTTP 200, OCPI envelope) | — |
401 | Unauthorized | — |
422 | Validation Error | HTTPValidationError |
200 — successful response
application/json
Schema: ConnectorResponse
| Field | Type | Required | Description |
|---|---|---|---|
status_code | integer | No | Default: 1000 |
status_message | string | No | — |
timestamp | string (date-time) | No | — |
data | Connector | No | Connector |
Response example
{
"status_code": 1000,
"status_message": "Success",
"timestamp": "2024-01-15T10:00:00Z",
"data": {
"format": "SOCKET",
"id": "1",
"last_updated": "2024-01-15T10:00:00Z",
"max_amperage": 32,
"max_electric_power": 22000,
"max_voltage": 400,
"power_type": "AC_3_PHASE",
"standard": "IEC_62196_T2",
"tariff_ids": [
"TARIFF-001"
],
"terms_and_conditions": "https://example.com/terms"
}
}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": 2001,
"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 PUT 'https://ocpi-api.gridos.co/ocpi/emsp/2.2.1/locations/NL/ABC/LOC1/EVSE1/1' \
-H "Authorization: Token $OCPI_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"id":"1","standard":"IEC_62196_T2","format":"CABLE","power_type":"AC_3_PHASE","max_voltage":220,"max_amperage":16,"tariff_ids":["11"],"last_updated":"2015-06-29T21:39:01Z"}'