CDRs

OCPI 2.1.1

By Abhishek Uniyal · Updated

CDRs in OCPI 2.1.1

A CDR, or Charge Detail Record, is the record shared for billing. A sent CDR is immutable. It includes the concluded session and billing details. The parties may agree to monthly delivery.

Sources (3)
id · CiString(36) · cardinality 1: Uniquely identifies the CDR within the CPOs platform (and suboperator platforms). start_date_time · DateTime · cardinality 1: Start timestamp of the charging session. stop_date_time · DateTime · cardinality 1: Stop timestamp of the charging session. auth_id · string(36) · cardinality 1: Reference to a token, identified by the auth_id field of the Token. auth_method · AuthMethod · cardinality 1: Method used for authentication. location · Location · cardinality 1: Location where the charging session took place, including only the relevant EVSE and Connector. meter_id · string(255) · cardinality ?: Identification of the Meter inside the Charge Point. currency · string(3) · cardinality 1: Currency of the CDR in ISO 4217 Code. tariffs · Tariff · cardinality *: List of relevant tariff elements, see: Tariffs. When relevant, a "Free of Charge" tariff should also be in this list, and point to a defined "Free of Charge" tariff. charging_periods · ChargingPeriod · cardinality +: List of charging periods that make up this charging session. A session consists of 1 or more periods, where each period has a different relevant Tariff. total_cost · number · cardinality 1: Total cost (excluding VAT) of this transaction. total_energy · number · cardinality 1: Total energy charged, in kWh. total_time · number · cardinality 1: total duration of this session (including the duration of charging and not charging), in hours. total_parking_time · number · cardinality ?: Total duration during this session that the EV is not being charged (no energy being transfered between EVSE and EV), in hours. remark · string(255) · cardinality ?: Optional remark, can be used to provide addition human readable information to the CDR, for example: reason why a transaction was stopped. last_updated · DateTime · cardinality 1: Timestamp when this CDR was last updated (or created).OCPI 2.1.1 CDRs module · #31-cdr-object"There is no requirement to send CDRs semi-realtime, it is seen as good practice to send them as soon as possible. But if there is an agreement between parties to send them for example once a month, that is also allowed by OCPI."OCPI 2.1.1 CDRs module · #cdrs-module"CDRs are created by the CPO. They probably only will be sent to the eMSP that will be paying the bill of a charging session. Because a CDR is for billing purposes, it cannot be changed/replaced, once sent to the eMSP, changes are not allowed in a CDR."OCPI 2.1.1 CDRs module · #1-flow-and-lifecycle

Example payload · concluded-session-cdr

{
  "id": "EXAMPLE-CDR",
  "start_date_time": "2026-01-01T00:00:00Z",
  "auth_method": "WHITELIST",
  "currency": "EUR",
  "charging_periods": [
    {
      "start_date_time": "2026-01-01T00:00:00Z",
      "dimensions": [
        {
          "type": "ENERGY",
          "volume": 5
        }
      ]
    }
  ],
  "total_energy": 5,
  "total_time": 1,
  "last_updated": "2026-01-01T01:00:00Z",
  "stop_date_time": "2026-01-01T01:00:00Z",
  "auth_id": "EXAMPLE-CONTRACT",
  "location": {
    "id": "EXAMPLE-LOCATION",
    "address": "Original Street 1",
    "city": "Utrecht",
    "postal_code": "3511AA",
    "country": "NLD",
    "coordinates": {
      "latitude": "52.090700",
      "longitude": "5.121400"
    },
    "type": "ON_STREET",
    "evses": [
      {
        "uid": "EXAMPLE-EVSE",
        "status": "AVAILABLE",
        "connectors": [
          {
            "id": "1",
            "standard": "IEC_62196_T2",
            "format": "SOCKET",
            "power_type": "AC_3_PHASE",
            "voltage": 230,
            "amperage": 32,
            "last_updated": "2026-01-01T00:00:00Z"
          }
        ],
        "last_updated": "2026-01-01T00:00:00Z"
      }
    ],
    "last_updated": "2026-01-01T00:00:00Z"
  },
  "total_cost": 2.5
}
Follow CDR delivery in the charging lesson

Which endpoints does this module define?

These paths illustrate the requests. Use the URLs advertised by your partner, replace the placeholders and choose the matching interface. A listed method does not establish that this site's simulator implements it.

CPO

  • Fetch CDRs, last updated (which in the current version of OCPI can only be the creation date/time) between the {date_from} and {date_to} (paginated)

    GET
    /ocpi/2.1.1/cdrs/
Source
Method: Description -------------------------: ---------------------------------------------------------------------------------- GET: Fetch CDRs, last updated (which in the current version of OCPI can only be the creation date/time) between the {date_from} and {date_to} (paginated) POST: n/a PUT: n/a PATCH: n/a DELETE: n/aOCPI 2.1.1 CDRs module · #21-cpo-interface

eMSP

  • Retrieve an existing CDR

    GET
    {cdr_url_returned_by_POST}
  • Send a new CDR.

    POST
    /ocpi/2.1.1/cdrs/
Source
Method: Description ------------------------: ---------------------------------------------------- GET: Retrieve an existing CDR POST: Send a new CDR. PUT: n/a (CDRs cannot be replaced) PATCH: n/a (CDRs cannot be updated) DELETE: n/a (CDRs cannot be removed)OCPI 2.1.1 CDRs module · #22-emsp-interface

Try an endpoint

Send a request to this site's OCPI endpoints and read the answer. It never reaches your own system.