- Reference
- OCPI 2.2.1 (eMSP)
- Receiver CDRs
OpenAPI reference
Receiver CDRs
GET
/cdrs/{cdr_id}Retrieve a specific CDR by its ID.
API: OCPI 2.2.1 (eMSP) · Module: CDRs (eMSP)
Base path:/cdrs· Base URL:https://ocpi-api.gridos.co/ocpi/emsp/2.2.1
Overview
GET /cdrs/{cdr_id}Absolute URL: https://ocpi-api.gridos.co/ocpi/emsp/2.2.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/emsp/2.2.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": "2024-01-15T10:00:00Z",
"data": {
"auth_method": "WHITELIST",
"authorization_reference": "AUTH-REF-001",
"cdr_location": {
"address": "F.Rooseveltlaan 3A",
"city": "Gent",
"connector_format": "SOCKET",
"connector_id": "1",
"connector_power_type": "AC_3_PHASE",
"connector_standard": "IEC_62196_T2",
"coordinates": {
"latitude": "51.04759",
"longitude": "3.72994"
},
"country": "BEL",
"evse_id": "BE-BEC-E041503001",
"evse_uid": "3256",
"id": "LOC-001",
"name": "Gent Zuid Parking",
"postal_code": "9000"
},
"cdr_token": {
"contract_id": "NL-TNM-012345678905880-S",
"country_code": "NL",
"party_id": "TNM",
"type": "RFID",
"uid": "012345678905880"
},
"charging_periods": [
{
"dimensions": [
{
"type": "ENERGY",
"volume": 15.32
}
],
"start_date_time": "2024-01-15T10:00:00Z",
"tariff_id": "TARIFF-001"
}
],
"country_code": "NL",
"credit": false,
"currency": "EUR",
"end_date_time": "2024-01-15T11:30:00Z",
"home_charging_compensation": false,
"id": "CDR-001",
"invoice_reference_id": "INV-2024-001",
"last_updated": "2024-01-15T11:30:00Z",
"meter_id": "METER-001",
"party_id": "CPO",
"remark": "Charged at Gent Zuid Parking",
"session_id": "SESSION-001",
"signed_data": {
"encoding_method": "OCMF",
"signed_values": [
{
"nature": "START",
"plain_data": "AP;0;3;...",
"signed_data": "0x1234..."
}
]
},
"start_date_time": "2024-01-15T10:00:00Z",
"tariffs": [
{
"country_code": "NL",
"currency": "EUR",
"elements": [
{
"price_components": [
{
"price": 0.2,
"step_size": 1,
"type": "ENERGY",
"vat": 21
}
]
}
],
"id": "TARIFF-001",
"last_updated": "2024-01-15T10:00:00Z",
"party_id": "CPO"
}
],
"total_cost": {
"excl_vat": 3.064,
"incl_vat": 3.7074
},
"total_energy": 15.32,
"total_energy_cost": {
"excl_vat": 3.064,
"incl_vat": 3.7074
},
"total_fixed_cost": {
"excl_vat": 0.5,
"incl_vat": 0.605
},
"total_parking_cost": {
"excl_vat": 0,
"incl_vat": 0
},
"total_parking_time": 0.25,
"total_reservation_cost": {
"excl_vat": 0,
"incl_vat": 0
},
"total_time": 1.5,
"total_time_cost": {
"excl_vat": 0,
"incl_vat": 0
}
}
}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": 2001,
"status_message": "CDR 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/emsp/2.2.1/cdrs/CDR1' \
-H "Authorization: Token $OCPI_TOKEN"