- Reference
- OCPI 2.2.1 (CPO)
- Sender CDRs
OpenAPI reference
Sender CDRs
/cdrsFetch CDRs from the CPO system, last updated between date_from and date_to (paginated).
API: OCPI 2.2.1 (CPO) · Module: CDRs (CPO)
Base path:/cdrs· Base URL:https://ocpi-api.gridos.co/ocpi/cpo/2.2.1
Overview
GET /cdrsAbsolute URL: https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/cdrs
Fetch CDRs from the CPO system, last updated between date_from and date_to (paginated).
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/cdrs?date_from=2025-01-01T00%3A00%3A00Z&date_to=2025-01-01T00%3A00%3A00Z&offset=0&limit=50' \
-H "Authorization: Token $OCPI_TOKEN"Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
date_from | string (date-time) | No | Only return objects with last_updated after this DateTime (inclusive). |
date_to | string (date-time) | No | Only return objects with last_updated before this DateTime (exclusive). |
offset | integer | No | The offset of the first object returned. Default is 0. |
limit | integer | No | Maximum number of objects to GET. |
Responses
| Status | Description | Schema |
|---|---|---|
200 | Successful Response | CdrsListResponse |
401 | Unauthorized | — |
422 | Validation Error | HTTPValidationError |
200 — successful response
application/json
Schema: CdrsListResponse
| Field | Type | Required | Description |
|---|---|---|---|
status_code | integer | No | Default: 1000 |
status_message | string | No | — |
timestamp | string (date-time) | No | — |
data | CDROut[] | No | Data. Default: [] |
Response example
{
"status_code": 1000,
"status_message": "Success",
"timestamp": "2024-01-15T10:00:00Z",
"data": []
}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 GET 'https://ocpi-api.gridos.co/ocpi/cpo/2.2.1/cdrs?date_from=2025-01-01T00%3A00%3A00Z&date_to=2025-01-01T00%3A00%3A00Z&offset=0&limit=50' \
-H "Authorization: Token $OCPI_TOKEN"