- Reference
- OCPI 2.1.1 (CPO)
- Sender CDRs
OpenAPI reference
Sender CDRs
GET
/cdrs/{cdr_id}Retrieve a specific CDR by its id.
API: OCPI 2.1.1 (CPO) · Module: CDRs (CPO)
Base path:/cdrs· Base URL:https://ocpi-api.gridos.co/ocpi/cpo/2.1.1
Overview
GET /cdrs/{cdr_id}Absolute URL: https://ocpi-api.gridos.co/ocpi/cpo/2.1.1/cdrs/{cdr_id}
Retrieve a specific CDR by its id.
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.1.1/cdrs/CDR1' \
-H "Authorization: Token $OCPI_TOKEN"Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
cdr_id | string | Yes | CDR.id of the CDR object. |
Responses
| Status | Description | Schema |
|---|---|---|
200 | Successful Response | CdrResponse |
401 | Unauthorized | — |
404 | Not Found | — |
422 | Validation Error | HTTPValidationError |
200 — successful response
application/json
Schema: CdrResponse
| Field | Type | Required | Description |
|---|---|---|---|
status_code | integer | No | Default: 1000 |
status_message | string | No | — |
timestamp | string (date-time) | No | — |
data | CDROut | No | CDROut |
Response example
{
"status_code": 1000,
"status_message": "Success",
"timestamp": "2015-06-29T22:39:09Z",
"data": {
"auth_id": "DE8ACC12E46L89",
"auth_method": "WHITELIST",
"charging_periods": [
{
"dimensions": [
{
"type": "TIME",
"volume": 1.973
}
],
"start_date_time": "2015-06-29T21:39:09Z"
}
],
"currency": "EUR",
"id": "12345",
"last_updated": "2015-06-29T22:01:13Z",
"location": {
"address": "F.Rooseveltlaan 3A",
"city": "Gent",
"coordinates": {
"latitude": "51.047599",
"longitude": "3.729944"
},
"country": "BEL",
"evses": [
{
"connectors": [
{
"amperage": 64,
"format": "SOCKET",
"id": "1",
"last_updated": "2015-03-16T10:10:02Z",
"power_type": "AC_1_PHASE",
"standard": "IEC_62196_T2",
"tariff_id": "11",
"voltage": 230
}
],
"evse_id": "BE-BEC-E041503003",
"last_updated": "2015-06-28T08:12:01Z",
"status": "AVAILABLE",
"uid": "3256"
}
],
"id": "LOC1",
"last_updated": "2015-06-29T20:39:09Z",
"postal_code": "9000",
"type": "ON_STREET"
},
"meter_id": "METER-001",
"remark": "Charged at Gent Zuid",
"start_date_time": "2015-06-29T21:39:09Z",
"stop_date_time": "2015-06-29T23:37:32Z",
"tariffs": [
{
"currency": "EUR",
"elements": [
{
"price_components": [
{
"price": 2,
"step_size": 300,
"type": "TIME"
}
]
}
],
"id": "12",
"last_updated": "2015-02-02T14:15:01Z"
}
],
"total_cost": 4,
"total_energy": 15.342,
"total_parking_time": 0.25,
"total_time": 1.973
}
}401 — unauthorized
application/json
Response example
{
"status_code": 2000,
"status_message": "Unauthorized",
"timestamp": "2025-01-01T00:00:00Z"
}404 — not found
application/json
Response example
{
"status_code": 2004,
"status_message": "Resource not found",
"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.1.1/cdrs/CDR1' \
-H "Authorization: Token $OCPI_TOKEN"