- Reference
- OCPI 2.2.1 (CPO)
- Receiver ClientInfo
OpenAPI reference
Receiver ClientInfo
/hubclientinfo/{country_code}/{party_id}Push new or updated ClientInfo from the Hub to a connected client. Path ``(country_code, party_id)`` MUST match body fields (2001 on mismatch per OCPI 2.2.1 §17.4).
API: OCPI 2.2.1 (CPO) · Module: Hub Client Info (CPO)
Base path:/hubclientinfo· Base URL:https://ocpi-api.gridos.co/ocpi/cpo/2.2.1
Overview
PUT /hubclientinfo/{country_code}/{party_id}Absolute URL: https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/hubclientinfo/{country_code}/{party_id}
Push new or updated ClientInfo from the Hub to a connected client. Path (country_code, party_id) MUST match body fields (2001 on mismatch per OCPI 2.2.1 §17.4).
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/cpo/2.2.1/hubclientinfo/NL/ABC' \
-H "Authorization: Token $OCPI_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"party_id":"EXA","country_code":"NL","role":"CPO","status":"CONNECTED","last_updated":"2025-06-29T20:39:09Z"}'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). |
Request body
application/json · Required
Schema: ClientInfo
| Field | Type | Required | Description |
|---|---|---|---|
party_id | string | Yes | CPO or eMSP ID of the subject party. |
country_code | string | Yes | Country code of the subject party's operation. |
role | `"CPO" | "EMSP" | "HUB" |
status | `"CONNECTED" | "OFFLINE" | "PLANNED" |
last_updated | string (date-time) | Yes | — |
Request examples
Example 1
{
"party_id": "EXA",
"country_code": "NL",
"role": "CPO",
"status": "CONNECTED",
"last_updated": "2025-06-29T20:39:09Z"
}Example 2
{
"party_id": "EMP",
"country_code": "DE",
"role": "EMSP",
"status": "SUSPENDED",
"last_updated": "2025-07-01T08:00:00Z"
}Responses
| Status | Description | Schema |
|---|---|---|
200 | Successful Response | ClientInfoResponse |
400 | Invalid or missing parameters (HTTP 200, OCPI envelope) | — |
401 | Unauthorized | — |
422 | Validation Error | HTTPValidationError |
200 — successful response
application/json
Schema: ClientInfoResponse
| Field | Type | Required | Description |
|---|---|---|---|
status_code | integer | No | Default: 1000 |
status_message | string | No | — |
timestamp | string (date-time) | No | — |
data | ClientInfoOut | No | Read-side DTO -- direct 1:1 mapping onto HubClientInfo ORM columns. |
Response example
{
"data": {
"country_code": "NL",
"last_updated": "2024-01-15T10:00:00Z",
"party_id": "TNM",
"role": "EMSP",
"status": "CONNECTED"
},
"status_code": 1000,
"status_message": "Success",
"timestamp": "2024-01-15T10:00:00Z"
}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/cpo/2.2.1/hubclientinfo/NL/ABC' \
-H "Authorization: Token $OCPI_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"party_id":"EXA","country_code":"NL","role":"CPO","status":"CONNECTED","last_updated":"2025-06-29T20:39:09Z"}'