- Reference
- OCPI 2.2.1 (CPO)
- Sender Location
OpenAPI reference
Sender Location
/locations/{location_id}Retrieve a specific Location object from the Sender (CPO).
API: OCPI 2.2.1 (CPO) · Module: Locations (CPO)
Base path:/locations· Base URL:https://ocpi-api.gridos.co/ocpi/cpo/2.2.1
Overview
GET /locations/{location_id}Absolute URL: https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/locations/{location_id}
Retrieve a specific Location object from the Sender (CPO).
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/locations/LOC1' \
-H "Authorization: Token $OCPI_TOKEN"Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
location_id | string | Yes | Location.id of the Location object. |
Responses
| Status | Description | Schema |
|---|---|---|
200 | Successful Response | LocationResponse |
401 | Unauthorized | — |
404 | Not Found | — |
422 | Validation Error | HTTPValidationError |
200 — successful response
application/json
Schema: LocationResponse
| Field | Type | Required | Description |
|---|---|---|---|
status_code | integer | No | Default: 1000 |
status_message | string | No | — |
timestamp | string (date-time) | No | — |
data | LocationOut | No | LocationOut |
Response example
{
"status_code": 1000,
"status_message": "Success",
"timestamp": "2024-01-15T10:00:00Z",
"data": {
"address": "F.Rooseveltlaan 3A",
"charging_when_closed": true,
"city": "Gent",
"coordinates": {
"latitude": "51.04759",
"longitude": "3.72994"
},
"country": "BEL",
"country_code": "NL",
"directions": [
{
"language": "en",
"text": "Enter via main gate"
}
],
"energy_mix": {
"energy_sources": [
{
"percentage": 100,
"source": "SOLAR"
}
],
"is_green_energy": true
},
"evses": [
{
"capabilities": [
"RFID_READER",
"REMOTE_START_STOP_CAPABLE"
],
"connectors": [
{
"format": "SOCKET",
"id": "1",
"last_updated": "2024-01-15T10:00:00Z",
"max_amperage": 32,
"max_voltage": 400,
"power_type": "AC_3_PHASE",
"standard": "IEC_62196_T2",
"tariff_ids": [
"TARIFF-001"
]
}
],
"evse_id": "BE-BEC-E041503001",
"last_updated": "2024-01-15T10:00:00Z",
"status": "AVAILABLE",
"uid": "3256"
}
],
"facilities": [
"PARKING_LOT"
],
"id": "LOC-001",
"images": [],
"last_updated": "2024-01-15T10:00:00Z",
"name": "Gent Zuid Parking",
"opening_times": {
"twentyfourseven": true
},
"operator": {
"name": "Charge Point Operator NL",
"website": "https://example.com"
},
"owner": {
"name": "Gent Municipality"
},
"parking_type": "PARKING_GARAGE",
"party_id": "CPO",
"postal_code": "9000",
"publish": true,
"publish_allowed_to": [
{
"issuer": "MobilityPlus",
"visual_number": "DF000-2001-8999-1"
}
],
"related_locations": [],
"state": "Oost-Vlaanderen",
"suboperator": {
"name": "CPO NL Sub"
},
"time_zone": "Europe/Brussels"
}
}401 — unauthorized
application/json
Response example
{
"status_code": 2001,
"status_message": "Unauthorized",
"timestamp": "2025-01-01T00:00:00Z"
}404 — not found
application/json
Response example
{
"status_code": 2003,
"status_message": "Unknown location",
"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 GET 'https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/locations/LOC1' \
-H "Authorization: Token $OCPI_TOKEN"