- Reference
- OCPI 2.2.1 (CPO)
- List supported OCPI versions (CPO mount)
OpenAPI reference
List supported OCPI versions (CPO mount)
/versionsReturn the list of OCPI versions this platform supports plus the base URL partners should use for each. First call in the 2.2.1 credentials handshake.
API: OCPI 2.2.1 (CPO) · Module: Versions
Base path:/versions· Base URL:https://ocpi-api.gridos.co/ocpi/cpo/2.2.1
Overview
GET /versionsAbsolute URL: https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/versions
Return the list of OCPI versions this platform supports plus the base URL partners should use for each. First call in the 2.2.1 credentials handshake.
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 GET 'https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/versions' \
-H "Authorization: Token $OCPI_TOKEN"Responses
| Status | Description | Schema |
|---|---|---|
200 | Successful Response | VersionsResponse |
401 | Unauthorized | — |
200 — successful response
application/json
Schema: VersionsResponse
| Field | Type | Required | Description |
|---|---|---|---|
status_code | integer | No | Default: 1000 |
status_message | string | No | — |
timestamp | string (date-time) | No | — |
data | Version[] | No | Data. Default: [] |
Response example
{
"data": [
{
"url": "https://example.com/ocpi/2.2.1",
"version": "2.2.1"
}
],
"status_code": 1000,
"status_message": "Success",
"timestamp": "2024-01-15T10:00:00Z"
}401 — unauthorized
application/json
Response example
{
"status_code": 2001,
"status_message": "Unauthorized",
"timestamp": "2025-01-01T00:00:00Z"
}Examples
Shell, Python, and TypeScript (set OCPI_TOKEN when auth is required).
curl -sS -X GET 'https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/versions' \
-H "Authorization: Token $OCPI_TOKEN"