OCPI 2.3.0 - CDRs Module - Sender Interface (2.3.0)

Download OpenAPI specification:

The Sender Interface (typically implemented by the CPO) allows retrieval of CDRs. This is used to fetch CDRs that have been created, supporting pagination and date filtering.

Schemas

OCPIResponse

status_code
required
integer

OCPI status code, 1000 for success.

status_message
string

An optional status message which may help when debugging.

timestamp
required
string <date-time>

The time this message was generated.

data
any

Response data object or list of objects.

{
  • "status_code": 1000,
  • "status_message": "string",
  • "timestamp": "2019-08-24T14:15:22Z",
  • "data": null
}

TokenType

string <open-enum> (TokenType)
Enum Description
AD_HOC_USER

One time use Token ID generated by a server (or App.) The eMSP uses this to bind a Session to a customer, probably an app user.

APP_USER

Token ID generated by a server (or App.) to identify a user of an App. The same user uses the same Token for every Session.

EMAID

An EMAID. EMAIDs are used as Tokens when the Charging Station and the vehicle are using ISO 15118 for communication.

OTHER

Other type of token

RFID

RFID Token

The type of token.

"AD_HOC_USER"

CdrToken

country_code
required
string = 2 characters

ISO-3166 alpha-2 country code of the MSP that 'owns' this Token.

party_id
required
string = 3 characters

ID of the eMSP that 'owns' this Token (following the ISO-15118 standard).

uid
required
string <= 36 characters

Unique ID by which this Token can be identified. This is the field used by the CPO's system (RFID reader on the Charge Point) to identify this token. Currently, in most cases: type=RFID, this is the RFID hidden ID as read by the RFID reader, but that is not a requirement. If this is a type=APP_USER Token, it will be a unique, by the eMSP, generated ID.

type
required
string <open-enum> (TokenType)
Enum Description
AD_HOC_USER

One time use Token ID generated by a server (or App.) The eMSP uses this to bind a Session to a customer, probably an app user.

APP_USER

Token ID generated by a server (or App.) to identify a user of an App. The same user uses the same Token for every Session.

EMAID

An EMAID. EMAIDs are used as Tokens when the Charging Station and the vehicle are using ISO 15118 for communication.

OTHER

Other type of token

RFID

RFID Token

Type of the token

contract_id
required
string <= 36 characters

Uniquely identifies the EV Driver contract token within the eMSP's platform (and suboperator platforms). Recommended to follow the specification for eMA ID from "E-mobility ID-codes: the purpose of IDs, ID usage and ID format" (https://evroaming.org/contract-evse-ids/).

{
  • "country_code": "st",
  • "party_id": "str",
  • "uid": "string",
  • "type": "AD_HOC_USER",
  • "contract_id": "string"
}

AuthMethod

string <enum> (AuthMethod)
Enum Description
AUTH_REQUEST

Authentication request has been sent to the eMSP.

COMMAND

Command like StartSession or ReserveNow used to start the Session, the Token provided in the Command was used as authorization.

WHITELIST

Whitelist used for authentication, no request to the eMSP has been performed.

Method used for authentication.

"AUTH_REQUEST"

GeoLocation

latitude
required
string <= 10 characters ^-?[0-9]{1,2}\.[0-9]{5,7}$

Latitude of the point in decimal degree. Example 50.770774. Decimal separator "." required.

longitude
required
string <= 11 characters ^-?[0-9]{1,3}\.[0-9]{5,7}$

Longitude of the point in decimal degree. Example -126.104965. Decimal separator "." required.

{
  • "latitude": "string",
  • "longitude": "string"
}

ConnectorType

string <open-enum> (ConnectorType)
Enum Description
CHADEMO

The connector type is CHAdeMO, DC.

CHAOJI

The ChaoJi connector. The new generation charging connector, harmonized between CHAdeMO and GB/T. DC.

DOMESTIC_A

Standard/Domestic household, type "A", NEMA 1-15, 2 pins.

DOMESTIC_B

Standard/Domestic household, type "B", NEMA 5-15, 3 pins.

DOMESTIC_C

Standard/Domestic household, type "C", CEE 7/17, 2 pins.

DOMESTIC_D

Standard/Domestic household, type "D", 3 pin.

DOMESTIC_E

Standard/Domestic household, type "E", CEE 7/5 3 pins.

DOMESTIC_F

Standard/Domestic household, type "F", CEE 7/4, Schuko, 3 pins.

DOMESTIC_G

Standard/Domestic household, type "G", BS 1363, Commonwealth, 3 pins.

DOMESTIC_H

Standard/Domestic household, type "H", SI-32, 3 pins.

DOMESTIC_I

Standard/Domestic household, type "I", AS 3112, 3 pins.

DOMESTIC_J

Standard/Domestic household, type "J", SEV 1011, 3 pins.

DOMESTIC_K

Standard/Domestic household, type "K", DS 60884-2-D1, 3 pins.

DOMESTIC_L

Standard/Domestic household, type "L", CEI 23-16-VII, 3 pins.

DOMESTIC_M

Standard/Domestic household, type "M", BS 546, 3 pins.

DOMESTIC_N

Standard/Domestic household, type "N", NBR 14136, 3 pins.

DOMESTIC_O

Standard/Domestic household, type "O", TIS 166-2549, 3 pins.

GBT_AC

Guobiao GB/T 20234.2 AC socket/connector.

GBT_DC

Guobiao GB/T 20234.3 DC connector.

IEC_60309_2_single_16

IEC 60309-2 Industrial Connector single phase 16 amperes (usually blue).

IEC_60309_2_three_16

IEC 60309-2 Industrial Connector three phases 16 amperes (usually red).

IEC_60309_2_three_32

IEC 60309-2 Industrial Connector three phases 32 amperes (usually red).

IEC_60309_2_three_64

IEC 60309-2 Industrial Connector three phases 64 amperes (usually red).

IEC_62196_T1

IEC 62196 Type 1 "SAE J1772".

IEC_62196_T1_COMBO

Combo Type 1 based, DC.

IEC_62196_T2

IEC 62196 Type 2 "Mennekes".

IEC_62196_T2_COMBO

Combo Type 2 based, DC.

IEC_62196_T3A

IEC 62196 Type 3A.

IEC_62196_T3C

IEC 62196 Type 3C "Scame".

MCS

The MegaWatt Charging System (MCS) connector as developed by CharIN.

NEMA_5_20

NEMA 5-20, 3 pins.

NEMA_6_30

NEMA 6-30, 3 pins.

NEMA_6_50

NEMA 6-50, 3 pins.

NEMA_10_30

NEMA 10-30, 3 pins.

NEMA_10_50

NEMA 10-50, 3 pins.

NEMA_14_30

NEMA 14-30, 3 pins, rating of 30 A.

NEMA_14_50

NEMA 14-50, 3 pins, rating of 50 A.

PANTOGRAPH_BOTTOM_UP

On-board Bottom-up-Pantograph typically for bus charging.

PANTOGRAPH_TOP_DOWN

Off-board Top-down-Pantograph typically for bus charging.

SAE_J3400

SAE J3400, also known as North American Charging Standard (NACS), developed by Tesla, Inc in 2021.

TESLA_R

Tesla Connector "Roadster"-type (round, 4 pin).

TESLA_S

Tesla Connector "Model-S"-type (oval, 5 pin). Mechanically compatible with SAE J3400 but uses CAN bus for communication instead of power line communication.

The socket or plug standard of the charging point.

"CHADEMO"

ConnectorFormat

string <enum> (ConnectorFormat)
Enum Description
SOCKET

The connector is a socket; the EV user needs to bring a fitting plug.

CABLE

The connector is an attached cable; the EV users car needs to have a fitting inlet.

The format of the connector, whether it is a socket or a plug.

"SOCKET"

PowerType

string <enum> (PowerType)
Enum Description
AC_1_PHASE

AC single phase.

AC_2_PHASE

AC two phases, only two of the three available phases connected.

AC_2_PHASE_SPLIT

AC two phases using split phase system.

AC_3_PHASE

AC three phases.

DC

Direct Current.

The type of power at the connector.

"AC_1_PHASE"

CdrLocation

id
required
string <= 36 characters

Uniquely identifies the location within the CPO's platform (and suboperator platforms). This field can never be changed, modified or renamed.

name
string <= 255 characters

Display name of the location.

address
required
string <= 45 characters

Street/block name and house number if available.

city
required
string <= 45 characters

City or town.

postal_code
string <= 10 characters

Postal code of the location, may only be omitted when the location has no postal code: in some countries charging locations at highways don't have postal codes.

state
string <= 20 characters

State only to be used when relevant.

country
required
string = 3 characters

ISO 3166-1 alpha-3 code for the country of this location.

required
object (GeoLocation)

Coordinates of the location.

evse_uid
required
string <= 36 characters

Uniquely identifies the EVSE within the CPO's platform (and suboperator platforms). For example a database unique ID or the actual EVSE ID. This field can never be changed, modified or renamed. This is the technical identification of the EVSE, not to be used as human readable identification, use the field: evse_id for that. Allowed to be set to: #NA when this CDR is created for a reservation that never resulted in a charging session.

evse_id
required
string <= 48 characters

Compliant with the following specification for EVSE ID: "E-mobility ID-codes: the purpose of IDs, ID usage and ID format" (https://evroaming.org/contract-evse-ids/). Allowed to be set to: #NA when this CDR is created for a reservation that never resulted in a charging session.

connector_id
required
string <= 36 characters

Identifier of the connector within the EVSE. Allowed to be set to: #NA when this CDR is created for a reservation that never resulted in a charging session.

connector_standard
required
string <open-enum> (ConnectorType)
Enum Description
CHADEMO

The connector type is CHAdeMO, DC.

CHAOJI

The ChaoJi connector. The new generation charging connector, harmonized between CHAdeMO and GB/T. DC.

DOMESTIC_A

Standard/Domestic household, type "A", NEMA 1-15, 2 pins.

DOMESTIC_B

Standard/Domestic household, type "B", NEMA 5-15, 3 pins.

DOMESTIC_C

Standard/Domestic household, type "C", CEE 7/17, 2 pins.

DOMESTIC_D

Standard/Domestic household, type "D", 3 pin.

DOMESTIC_E

Standard/Domestic household, type "E", CEE 7/5 3 pins.

DOMESTIC_F

Standard/Domestic household, type "F", CEE 7/4, Schuko, 3 pins.

DOMESTIC_G

Standard/Domestic household, type "G", BS 1363, Commonwealth, 3 pins.

DOMESTIC_H

Standard/Domestic household, type "H", SI-32, 3 pins.

DOMESTIC_I

Standard/Domestic household, type "I", AS 3112, 3 pins.

DOMESTIC_J

Standard/Domestic household, type "J", SEV 1011, 3 pins.

DOMESTIC_K

Standard/Domestic household, type "K", DS 60884-2-D1, 3 pins.

DOMESTIC_L

Standard/Domestic household, type "L", CEI 23-16-VII, 3 pins.

DOMESTIC_M

Standard/Domestic household, type "M", BS 546, 3 pins.

DOMESTIC_N

Standard/Domestic household, type "N", NBR 14136, 3 pins.

DOMESTIC_O

Standard/Domestic household, type "O", TIS 166-2549, 3 pins.

GBT_AC

Guobiao GB/T 20234.2 AC socket/connector.

GBT_DC

Guobiao GB/T 20234.3 DC connector.

IEC_60309_2_single_16

IEC 60309-2 Industrial Connector single phase 16 amperes (usually blue).

IEC_60309_2_three_16

IEC 60309-2 Industrial Connector three phases 16 amperes (usually red).

IEC_60309_2_three_32

IEC 60309-2 Industrial Connector three phases 32 amperes (usually red).

IEC_60309_2_three_64

IEC 60309-2 Industrial Connector three phases 64 amperes (usually red).

IEC_62196_T1

IEC 62196 Type 1 "SAE J1772".

IEC_62196_T1_COMBO

Combo Type 1 based, DC.

IEC_62196_T2

IEC 62196 Type 2 "Mennekes".

IEC_62196_T2_COMBO

Combo Type 2 based, DC.

IEC_62196_T3A

IEC 62196 Type 3A.

IEC_62196_T3C

IEC 62196 Type 3C "Scame".

MCS

The MegaWatt Charging System (MCS) connector as developed by CharIN.

NEMA_5_20

NEMA 5-20, 3 pins.

NEMA_6_30

NEMA 6-30, 3 pins.

NEMA_6_50

NEMA 6-50, 3 pins.

NEMA_10_30

NEMA 10-30, 3 pins.

NEMA_10_50

NEMA 10-50, 3 pins.

NEMA_14_30

NEMA 14-30, 3 pins, rating of 30 A.

NEMA_14_50

NEMA 14-50, 3 pins, rating of 50 A.

PANTOGRAPH_BOTTOM_UP

On-board Bottom-up-Pantograph typically for bus charging.

PANTOGRAPH_TOP_DOWN

Off-board Top-down-Pantograph typically for bus charging.

SAE_J3400

SAE J3400, also known as North American Charging Standard (NACS), developed by Tesla, Inc in 2021.

TESLA_R

Tesla Connector "Roadster"-type (round, 4 pin).

TESLA_S

Tesla Connector "Model-S"-type (oval, 5 pin). Mechanically compatible with SAE J3400 but uses CAN bus for communication instead of power line communication.

The standard of the installed connector. When this CDR is created for a reservation that never resulted in a charging session, this field can be set to any value and should be ignored by the Receiver.

connector_format
required
string <enum> (ConnectorFormat)
Enum Description
SOCKET

The connector is a socket; the EV user needs to bring a fitting plug.

CABLE

The connector is an attached cable; the EV users car needs to have a fitting inlet.

The format (socket/cable) of the installed connector. When this CDR is created for a reservation that never resulted in a charging session, this field can be set to any value and should be ignored by the Receiver.

connector_power_type
required
string <enum> (PowerType)
Enum Description
AC_1_PHASE

AC single phase.

AC_2_PHASE

AC two phases, only two of the three available phases connected.

AC_2_PHASE_SPLIT

AC two phases using split phase system.

AC_3_PHASE

AC three phases.

DC

Direct Current.

When this CDR is created for a reservation that never resulted in a charging session, this field can be set to any value and should be ignored by the Receiver.

{
  • "id": "string",
  • "name": "string",
  • "address": "string",
  • "city": "string",
  • "postal_code": "string",
  • "state": "string",
  • "country": "str",
  • "coordinates": {
    },
  • "evse_uid": "string",
  • "evse_id": "string",
  • "connector_id": "string",
  • "connector_standard": "CHADEMO",
  • "connector_format": "SOCKET",
  • "connector_power_type": "AC_1_PHASE"
}

TariffType

string <enum> (TariffType)
Enum Description
AD_HOC_PAYMENT

Used to describe that a Tariff is valid when ad-hoc payment is used at the Charge Point (for example: Debit or Credit card payment terminal).

PROFILE_CHEAP

Used to describe that a Tariff is valid when Charging Preference: CHEAP is set for the session.

PROFILE_FAST

Used to describe that a Tariff is valid when Charging Preference: FAST is set for the session.

PROFILE_GREEN

Used to describe that a Tariff is valid when Charging Preference: GREEN is set for the session.

REGULAR

Used to describe that a Tariff is valid when using an RFID, without any Charging Preference, or when Charging Preference: REGULAR is set for the session.

Type of tariff.

"AD_HOC_PAYMENT"

DisplayText

language
required
string = 2 characters

Language Code ISO 639-1.

text
required
string <= 512 characters

Text to be displayed to an end user. No markup, html etc. allowed.

{
  • "language": "st",
  • "text": "string"
}

PriceLimit

before_taxes
required
number

Maximum or minimum cost excluding taxes.

after_taxes
number

Maximum or minimum cost including taxes.

{
  • "before_taxes": 0,
  • "after_taxes": 0
}

TaxIncluded

string <enum> (TaxIncluded)
Enum Description
YES

Taxes are included in the prices in this Tariff.

NO

Taxes are not included, and will be added on top of the prices in this Tariff.

N/A

No taxes are applicable to this Tariff.

Describes if tax may have to be added to the amounts in a Tariff.

"YES"

TariffDimensionType

string <enum> (TariffDimensionType)
Enum Description
ENERGY

Defined in kWh, step_size multiplier: 1 Wh

FLAT

Flat fee without unit for step_size

PARKING_TIME

Time not charging: defined in hours, step_size multiplier: 1 second

TIME

Time charging: defined in hours, step_size multiplier: 1 second. Can also be used in combination with a RESERVATION restriction to describe the price of the reservation time.

Defines the dimension of a tariff.

"ENERGY"

PriceComponent

type
required
string <enum> (TariffDimensionType)
Enum Description
ENERGY

Defined in kWh, step_size multiplier: 1 Wh

FLAT

Flat fee without unit for step_size

PARKING_TIME

Time not charging: defined in hours, step_size multiplier: 1 second

TIME

Time charging: defined in hours, step_size multiplier: 1 second. Can also be used in combination with a RESERVATION restriction to describe the price of the reservation time.

The dimension that is being priced.

price
required
number

Price per unit for this dimension. This is including or excluding taxes according to the tax_included field of the Tariff that this PriceComponent is contained in.

vat
number

Applicable VAT percentage for this tariff dimension. If omitted, no VAT is applicable.

step_size
required
integer

Minimum amount to be billed. That is, the dimension will be billed in this step_size blocks. Consumed amounts are rounded up to the smallest multiple of step_size that is greater than the consumed amount. For example: if type is TIME and step_size has a value of 300, then time will be billed in blocks of 5 minutes. If 6 minutes were consumed, 10 minutes (2 blocks of step_size) will be billed.

The step_size field is no longer present in OCPI 3.0. In OCPI 3.0, Parties are advised to measure quantities as precise as required by calibration law and use the full precision of such measurements in cost computation. Users of OCPI 2.2.1 looking to be ready for a transition to OCPI 3.0 or to maximize interoperability with OCPI 3.0 are advised to effectively avoid using step_size by setting step_size to 1 always.

{
  • "type": "ENERGY",
  • "price": 0,
  • "vat": 0,
  • "step_size": 0
}

DayOfWeek

string <enum> (DayOfWeek)
Enum: "MONDAY" "TUESDAY" "WEDNESDAY" "THURSDAY" "FRIDAY" "SATURDAY" "SUNDAY"

Day of the week.

"MONDAY"

ReservationRestrictionType

string <enum> (ReservationRestrictionType)
Enum Description
RESERVATION

Used in Tariff Elements to describe costs for a reservation.

RESERVATION_EXPIRES

Used in Tariff Elements to describe costs for a reservation that expires (i.e. driver does not start a charging session before expiry_date of the reservation).

Defines if a TariffElement is applicable for a reservation.

"RESERVATION"

BookingRestrictionType

string <enum> (BookingRestrictionType)
Enum Description
BOOKING

Used in Tariff Elements to describe costs for a booking.

BOOKING_EXPIRES

Used in Tariff Elements to describe costs for a booking that does not start in the specified booking period.

BOOKING_CANCELLATION_FEES

Used in Tariff Elements to describe costs for cancelling a booking.

BOOKING_OVERTIME

Used in Tariff Elements to describe costs for charging after the booking has been completed.

Defines if a TariffElement is applicable for booking costs.

"BOOKING"

TariffRestrictions

start_time
string^([0-1][0-9]|2[0-3]):[0-5][0-9]$

Start time of day in local time, the time zone is defined in the time_zone field of the Location, for example 13:30, valid from this time of the day. Must be in 24h format with leading zeros. Hour/Minute separator ":".

end_time
string^([0-1][0-9]|2[0-3]):[0-5][0-9]$

End time of day in local time, the time zone is defined in the time_zone field of the Location, for example 19:45, valid until this time of the day. Same syntax as start_time. If end_time < start_time then the period wraps around to the next day. To stop at end of the day use 00:00.

start_date
string^([12][0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][...

Start date in local time, the time zone is defined in the time_zone field of the Location, for example 2015-12-24, valid from this day (inclusive). Format YYYY-MM-DD.

end_date
string^([12][0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][...

End date in local time, the time zone is defined in the time_zone field of the Location, for example 2015-12-27, valid until this day (exclusive). Format YYYY-MM-DD.

min_kwh
number

Minimum consumed energy in kWh, for example 20, valid from this amount of energy (inclusive) being used.

max_kwh
number

Maximum consumed energy in kWh, for example 50, valid until this amount of energy (exclusive) being used.

min_current
number

Sum of the minimum current (in Amperes) over all phases, for example 5. When the EV is charging with more than, or equal to, the defined amount of current, this TariffElement is/becomes active. If the charging current is or becomes lower, this TariffElement is not or no longer valid and becomes inactive. This describes NOT the minimum current over the entire Charging Session. This restriction can make a TariffElement become active when the charging current is above the defined value, but the TariffElement MUST no longer be active when the charging current drops below the defined value.

max_current
number

Sum of the maximum current (in Amperes) over all phases, for example 20. When the EV is charging with less than the defined amount of current, this TariffElement becomes/is active. If the charging current is or becomes higher, this TariffElement is not or no longer valid and becomes inactive. This describes NOT the maximum current over the entire Charging Session. This restriction can make a TariffElement become active when the charging current is below this value, but the TariffElement MUST no longer be active when the charging current raises above the defined value.

min_power
number

Minimum power in kW, for example 5. When the EV is charging with more than, or equal to, the defined amount of power, this TariffElement is/becomes active. If the charging power is or becomes lower, this TariffElement is not or no longer valid and becomes inactive. This describes NOT the minimum power over the entire Charging Session. This restriction can make a TariffElement become active when the charging power is above this value, but the TariffElement MUST no longer be active when the charging power drops below the defined value.

max_power
number

Maximum power in kW, for example 20. When the EV is charging with less than the defined amount of power, this TariffElement becomes/is active. If the charging power is or becomes higher, this TariffElement is not or no longer valid and becomes inactive. This describes NOT the maximum power over the entire Charging Session. This restriction can make a TariffElement become active when the charging power is below this value, but the TariffElement MUST no longer be active when the charging power raises above the defined value.

min_duration
integer

Minimum duration in seconds the Charging Session MUST last (inclusive). When the duration of a Charging Session is longer than the defined value, this TariffElement is or becomes active. Before that moment, this TariffElement is not yet active.

max_duration
integer

Maximum duration in seconds the Charging Session MUST last (exclusive). When the duration of a Charging Session is shorter than the defined value, this TariffElement is or becomes active. After that moment, this TariffElement is no longer active.

day_of_week
Array of strings <enum> (DayOfWeek) [ items <enum > ]
Items Enum: "MONDAY" "TUESDAY" "WEDNESDAY" "THURSDAY" "FRIDAY" "SATURDAY" "SUNDAY"

Which day(s) of the week this TariffElement is active.

reservation
string <enum> (ReservationRestrictionType)
Enum Description
RESERVATION

Used in Tariff Elements to describe costs for a reservation.

RESERVATION_EXPIRES

Used in Tariff Elements to describe costs for a reservation that expires (i.e. driver does not start a charging session before expiry_date of the reservation).

When this field is present, the TariffElement describes reservation costs. A reservation starts when the reservation is made, and ends when the driver starts charging on the reserved EVSE/Location, or when the reservation expires. A reservation can only have FLAT and TIME TariffDimensions, where TIME is for the duration of the reservation.

booking
string <enum> (BookingRestrictionType)
Enum Description
BOOKING

Used in Tariff Elements to describe costs for a booking.

BOOKING_EXPIRES

Used in Tariff Elements to describe costs for a booking that does not start in the specified booking period.

BOOKING_CANCELLATION_FEES

Used in Tariff Elements to describe costs for cancelling a booking.

BOOKING_OVERTIME

Used in Tariff Elements to describe costs for charging after the booking has been completed.

When this field is present, the TariffElement describes booking costs. A booking can only have: FLAT and TIME TariffDimensions.

{
  • "start_time": "string",
  • "end_time": "string",
  • "start_date": "string",
  • "end_date": "string",
  • "min_kwh": 0,
  • "max_kwh": 0,
  • "min_current": 0,
  • "max_current": 0,
  • "min_power": 0,
  • "max_power": 0,
  • "min_duration": 0,
  • "max_duration": 0,
  • "day_of_week": [
    ],
  • "reservation": "RESERVATION",
  • "booking": "BOOKING"
}

TariffElement

required
Array of objects (PriceComponent) non-empty

List of Price Components that each describe how a certain dimension is priced.

object (TariffRestrictions)

Restrictions that describe under which circumstances the Price Components of this Tariff Element apply.

{
  • "price_components": [
    ],
  • "restrictions": {
    }
}

EnergySourceCategory

string <enum> (EnergySourceCategory)
Enum Description
NUCLEAR

Nuclear power sources.

GENERAL_FOSSIL

All kinds of fossil power sources.

COAL

Fossil power from coal.

GAS

Fossil power from gas.

GENERAL_GREEN

All kinds of regenerative power sources.

SOLAR

Regenerative power from PV.

WIND

Regenerative power from wind turbines.

WATER

Regenerative power from water turbines.

Categories of energy sources.

"NUCLEAR"

EnergySource

source
required
string <enum> (EnergySourceCategory)
Enum Description
NUCLEAR

Nuclear power sources.

GENERAL_FOSSIL

All kinds of fossil power sources.

COAL

Fossil power from coal.

GAS

Fossil power from gas.

GENERAL_GREEN

All kinds of regenerative power sources.

SOLAR

Regenerative power from PV.

WIND

Regenerative power from wind turbines.

WATER

Regenerative power from water turbines.

The type of energy source.

percentage
required
number

Percentage of this source (0-100) in the mix.

{
  • "source": "NUCLEAR",
  • "percentage": 0
}

EnvironmentalImpactCategory

string <open-enum> (EnvironmentalImpactCategory)
Enum Description
NUCLEAR_WASTE

Produced nuclear waste in grams per kilowatthour.

CARBON_DIOXIDE

Exhausted carbon dioxide in grams per kilowatthour.

Categories of environmental impact values.

"NUCLEAR_WASTE"

EnvironmentalImpact

category
required
string <open-enum> (EnvironmentalImpactCategory)
Enum Description
NUCLEAR_WASTE

Produced nuclear waste in grams per kilowatthour.

CARBON_DIOXIDE

Exhausted carbon dioxide in grams per kilowatthour.

The environmental impact category of this value.

amount
required
number

Amount of this portion in g/kWh.

{
  • "category": "NUCLEAR_WASTE",
  • "amount": 0
}

EnergyMix

is_green_energy
required
boolean

True if 100% from regenerative sources. (CO2 and nuclear waste is zero)

Array of objects (EnergySource)

Key-value pairs (enum + percentage) of energy sources of this location's tariff.

Array of objects (EnvironmentalImpact)

Key-value pairs (enum + percentage) of nuclear waste and CO2 exhaust of this location's tariff.

supplier_name
string <= 64 characters

Name of the energy supplier, delivering the energy for this location or tariff.

energy_product_name
string <= 64 characters

Name of the energy supplier's product/tariff plan used at this location.

{
  • "is_green_energy": true,
  • "energy_sources": [
    ],
  • "environ_impact": [
    ],
  • "supplier_name": "string",
  • "energy_product_name": "string"
}

Tariff

country_code
required
string = 2 characters

ISO-3166 alpha-2 country code of the CPO that 'owns' this Tariff.

party_id
required
string = 3 characters

ID of the CPO that 'owns' this Tariff (following the ISO-15118 standard).

id
required
string <= 36 characters

Uniquely identifies the tariff within the CPO's platform (and suboperator platforms).

currency
required
string = 3 characters

ISO-4217 code of the currency of this tariff.

type
string <enum> (TariffType)
Enum Description
AD_HOC_PAYMENT

Used to describe that a Tariff is valid when ad-hoc payment is used at the Charge Point (for example: Debit or Credit card payment terminal).

PROFILE_CHEAP

Used to describe that a Tariff is valid when Charging Preference: CHEAP is set for the session.

PROFILE_FAST

Used to describe that a Tariff is valid when Charging Preference: FAST is set for the session.

PROFILE_GREEN

Used to describe that a Tariff is valid when Charging Preference: GREEN is set for the session.

REGULAR

Used to describe that a Tariff is valid when using an RFID, without any Charging Preference, or when Charging Preference: REGULAR is set for the session.

Defines the type of the tariff. This allows for distinction in case of given Charging Preferences. When omitted, this tariff is valid for all sessions.

Array of objects (DisplayText)

List of multi-language alternative tariff info texts.

tariff_alt_url
string <uri>

URL to a web page that contains an explanation of the tariff information in human readable form.

object (PriceLimit)

When this field is set, a Charging Session with this tariff will at least cost this amount.

object (PriceLimit)

When this field is set, a Charging Session with this tariff will at most cost this amount.

preauthorize_amount
number

The amount that a Payment Terminal Provider should preauthorize when handling card payment for a Session with this Tariff.

tax_included
required
string <enum> (TaxIncluded)
Enum Description
YES

Taxes are included in the prices in this Tariff.

NO

Taxes are not included, and will be added on top of the prices in this Tariff.

N/A

No taxes are applicable to this Tariff.

Whether taxes are included in the amounts in this Tariff.

required
Array of objects (TariffElement) non-empty

List of Tariff Elements.

start_date_time
string <date-time>

The time when this tariff becomes active, in UTC. time_zone field of the Location can be used to convert to local time. Typically used for a new tariff that is already given with the location, before it becomes active.

end_date_time
string <date-time>

The time after which this tariff is no longer valid, in UTC. time_zone field of the Location can be used to convert to local time. Typically used when this tariff is going to be replaced with a different tariff in the near future.

object (EnergyMix)

Details on the energy supplied with this tariff.

last_updated
required
string <date-time>

Timestamp when this Tariff was last updated (or created).

{
  • "country_code": "st",
  • "party_id": "str",
  • "id": "string",
  • "currency": "str",
  • "type": "AD_HOC_PAYMENT",
  • "tariff_alt_text": [
    ],
  • "tariff_alt_url": "http://example.com",
  • "min_price": {
    },
  • "max_price": {
    },
  • "preauthorize_amount": 0,
  • "tax_included": "YES",
  • "elements": [
    ],
  • "start_date_time": "2019-08-24T14:15:22Z",
  • "end_date_time": "2019-08-24T14:15:22Z",
  • "energy_mix": {
    },
  • "last_updated": "2019-08-24T14:15:22Z"
}

CdrDimensionType

string <enum> (CdrDimensionType)
Enum Description
CURRENT

(Session Only) Average charging current during this ChargingPeriod: defined in A (Ampere). When negative, the current is flowing from the EV to the grid.

ENERGY

Total amount of energy (dis-)charged during this ChargingPeriod: defined in kWh. When negative, more energy was fed into the grid than charged into the EV. Default step_size is 1.

ENERGY_EXPORT

(Session Only) Total amount of energy fed back into the grid: defined in kWh.

ENERGY_IMPORT

(Session Only) Total amount of energy charged, defined in kWh.

MAX_CURRENT

Sum of the maximum current over all phases, reached during this ChargingPeriod: defined in A (Ampere).

MIN_CURRENT

Sum of the minimum current over all phases, reached during this ChargingPeriod, when negative, current has flowed from the EV to the grid. Defined in A (Ampere).

MAX_POWER

Maximum power reached during this ChargingPeriod: defined in kW (Kilowatt).

MIN_POWER

Minimum power reached during this ChargingPeriod: defined in kW (Kilowatt), when negative, the power has flowed from the EV to the grid.

PARKING_TIME

Time during this ChargingPeriod not charging: defined in hours, default step_size multiplier is 1 second.

POWER

(Session Only) Average power during this ChargingPeriod: defined in kW (Kilowatt). When negative, the power is flowing from the EV to the grid.

RESERVATION_TIME

Time during this ChargingPeriod the Charge Point has been reserved time, defined in hours default step_size multiplier is 1 second.

RESERVATION_EXPIRES

Time during this ChargingPeriod Charge Point has been reserved and not yet been in use for this customer: defined in hours, default step_size multiplier is 1 second.

RESERVATION_OVERTIME

Time after the reservation during a ChargingPeriod that the session continues after the reserved time slot, defined in hours, default step_size multiplier is 1 second.

STATE_OF_CHARGE

(Session Only) Current state of charge of the EV, in percentage, values allowed: 0 to 100.

TIME

Time charging during this ChargingPeriod: defined in hours, default step_size multiplier is 1 second.

Defines the type of a CDR dimension. Some of these values are not useful for CDRs, and SHALL therefore only be used in Sessions (marked as Session Only).

"CURRENT"

CdrDimension

type
required
string <enum> (CdrDimensionType)
Enum Description
CURRENT

(Session Only) Average charging current during this ChargingPeriod: defined in A (Ampere). When negative, the current is flowing from the EV to the grid.

ENERGY

Total amount of energy (dis-)charged during this ChargingPeriod: defined in kWh. When negative, more energy was fed into the grid than charged into the EV. Default step_size is 1.

ENERGY_EXPORT

(Session Only) Total amount of energy fed back into the grid: defined in kWh.

ENERGY_IMPORT

(Session Only) Total amount of energy charged, defined in kWh.

MAX_CURRENT

Sum of the maximum current over all phases, reached during this ChargingPeriod: defined in A (Ampere).

MIN_CURRENT

Sum of the minimum current over all phases, reached during this ChargingPeriod, when negative, current has flowed from the EV to the grid. Defined in A (Ampere).

MAX_POWER

Maximum power reached during this ChargingPeriod: defined in kW (Kilowatt).

MIN_POWER

Minimum power reached during this ChargingPeriod: defined in kW (Kilowatt), when negative, the power has flowed from the EV to the grid.

PARKING_TIME

Time during this ChargingPeriod not charging: defined in hours, default step_size multiplier is 1 second.

POWER

(Session Only) Average power during this ChargingPeriod: defined in kW (Kilowatt). When negative, the power is flowing from the EV to the grid.

RESERVATION_TIME

Time during this ChargingPeriod the Charge Point has been reserved time, defined in hours default step_size multiplier is 1 second.

RESERVATION_EXPIRES

Time during this ChargingPeriod Charge Point has been reserved and not yet been in use for this customer: defined in hours, default step_size multiplier is 1 second.

RESERVATION_OVERTIME

Time after the reservation during a ChargingPeriod that the session continues after the reserved time slot, defined in hours, default step_size multiplier is 1 second.

STATE_OF_CHARGE

(Session Only) Current state of charge of the EV, in percentage, values allowed: 0 to 100.

TIME

Time charging during this ChargingPeriod: defined in hours, default step_size multiplier is 1 second.

Type of CDR dimension.

volume
required
number

Volume of the dimension consumed, measured according to the dimension type.

{
  • "type": "CURRENT",
  • "volume": 0
}

ChargingPeriod

start_date_time
required
string <date-time>

Start timestamp of the charging period. A period ends when the next period starts. The last period ends when the session ends.

required
Array of objects (CdrDimension) non-empty

List of relevant values for this charging period.

tariff_id
string <= 36 characters

Unique identifier of the Tariff that is relevant for this Charging Period. If not provided, no Tariff is relevant during this period.

{
  • "start_date_time": "2019-08-24T14:15:22Z",
  • "dimensions": [
    ],
  • "tariff_id": "string"
}

SignedValue

nature
required
string <= 32 characters

Nature of the value, in other words, the event this value belongs to. Possible values at moment of writing:

  • Start (value at the start of the Session)
  • End (signed value at the end of the Session)
  • Intermediate (signed values take during the Session, after Start, before End) Others might be added later.
plain_data
required
string <= 512 characters

The un-encoded string of data. The format of the content depends on the EncodingMethod field.

signed_data
required
string <= 5000 characters

Blob of signed data, base64 encoded. The format of the content depends on the EncodingMethod field.

{
  • "nature": "string",
  • "plain_data": "string",
  • "signed_data": "string"
}

SignedData

encoding_method
required
string <= 36 characters

The name of the encoding used in the SignedData field. This is the name given to the encoding by a company or group of companies. For the German Eichrecht, different solutions are used, all have (somewhat) different encodings like OCMF, Alfen Eichrecht, EDL40 E-Mobility Extension or EDL40 Mennekes .

encoding_method_version
integer

Version of the EncodingMethod (when applicable).

public_key
string <= 512 characters

Public key used to sign the data, base64 encoded.

required
Array of objects (SignedValue) non-empty

One or more signed values.

url
string <= 512 characters

URL that can be shown to an EV driver. This URL gives the EV driver the possibility to check the signed data from a charging session.

{
  • "encoding_method": "string",
  • "encoding_method_version": 0,
  • "public_key": "string",
  • "signed_values": [
    ],
  • "url": "string"
}

TaxAmount

name
required
string

A description of the tax. In countries where a tax name is required like Canada this can be something like "QST". In countries where this is not required, this can be something more generic like "VAT" or "General Sales Tax".

account_number
string

Tax Account Number of the business entity remitting these taxes. Optional as this is not required in all countries.

percentage
number

Tax percentage. Optional as this is not required in all countries.

amount
required
number

The amount of money of this tax that is due.

{
  • "name": "string",
  • "account_number": "string",
  • "percentage": 0,
  • "amount": 0
}

Price

before_taxes
required
number

Price/Cost excluding taxes.

Array of objects (TaxAmount)

All taxes that are applicable to this price and relevant to the receiver of the Session or CDR.

{
  • "before_taxes": 0,
  • "taxes": [
    ]
}

CDR

country_code
required
string = 2 characters

ISO-3166 alpha-2 country code of the CPO that 'owns' this CDR.

party_id
required
string = 3 characters

ID of the CPO that 'owns' this CDR (following the ISO-15118 standard).

id
required
string <= 39 characters

Uniquely identifies the CDR, the ID SHALL be unique per country_code/party_id combination. This field is longer than the usual 36 characters to allow for credit CDRs to have something appended to the original ID. Normal (non-credit) CDRs SHALL only have an ID with a maximum length of 36.

start_date_time
required
string <date-time>

Start timestamp of the charging session, or in-case of a reservation (before the start of a session) the start of the reservation.

end_date_time
required
string <date-time>

The timestamp when the session was completed/finished, charging might have finished before the session ends, for example: EV is full, but parking cost also has to be paid.

session_id
string <= 36 characters

Unique ID of the Session for which this CDR is sent. Is only allowed to be omitted when the CPO has not implemented the Sessions module or this CDR is the result of a reservation that never became a charging session, thus no OCPI Session.

booking_id
string <= 36 characters

Unique ID of the Booking for which this cdr can also be sent. Is only allowed to be omitted when the Session was reserved.

required
object (CdrToken)

Token used to start this charging session, including all the relevant information to identify the unique token.

auth_method
required
string <enum> (AuthMethod)
Enum Description
AUTH_REQUEST

Authentication request has been sent to the eMSP.

COMMAND

Command like StartSession or ReserveNow used to start the Session, the Token provided in the Command was used as authorization.

WHITELIST

Whitelist used for authentication, no request to the eMSP has been performed.

Method used for authentication. Multiple AuthMethods are possible during a charging sessions, for example when the session was started with a reservation: ReserveNow: COMMAND. When the driver arrives and starts charging using a Token that is whitelisted: WHITELIST. The last method SHALL be used in the CDR.

authorization_reference
string <= 36 characters

Reference to the authorization given by the eMSP. When the eMSP provided an authorization_reference in either real-time authorization, StartSession or ReserveNow, this field SHALL contain the same value. When different authorization_reference values have been given by the eMSP that are relevant to this Session, the last given value SHALL be used here.

required
object (CdrLocation)

Location where the charging session took place, including only the relevant EVSE and Connector.

meter_id
string <= 255 characters

Identification of the Meter inside the Charge Point.

currency
required
string = 3 characters

Currency of the CDR in ISO 4217 Code.

Array of objects (Tariff)

List of relevant Tariffs, see: Tariff. When relevant, a Free of Charge tariff should also be in this list, and point to a defined Free of Charge Tariff.

required
Array of objects (ChargingPeriod) non-empty

List of Charging Periods that make up this charging session.

object (SignedData)

Signed data that belongs to this charging Session.

required
object (Price)

Total sum of all the costs of this transaction in the specified currency.

object (Price)

Total sum of all the fixed costs in the specified currency, except fixed price components of parking and reservation. The cost not depending on amount of time/energy used etc. Can contain costs like a start tariff.

total_energy
required
number

Total energy charged, in kWh.

object (Price)

Total sum of all the cost of all the energy used, in the specified currency.

total_time
required
number

Total duration of the charging session (including the duration of charging and not charging), in hours.

object (Price)

Total sum of all the cost related to duration of charging during this transaction, in the specified currency.

total_parking_time
number

Total duration of the charging session where the EV was not charging (no energy was transferred between EVSE and EV), in hours.

object (Price)

Total sum of all the cost related to parking of this transaction, including fixed price components, in the specified currency.

object (Price)

Total sum of all the cost related to a reservation of a Charge Point, including fixed price components, in the specified currency.

remark
string <= 255 characters

Optional remark, can be used to provide additional human readable information to the CDR, for example: reason why a transaction was stopped.

invoice_reference_id
string <= 39 characters

This field can be used to reference an invoice, that will later be send for this CDR. Making it easier to link a CDR to a given invoice. Maybe even group CDRs that will be on the same invoice.

credit
boolean

When set to true, this is a Credit CDR, and the field credit_reference_id needs to be set as well.

credit_reference_id
string <= 39 characters

Is required to be set for a Credit CDR. This SHALL contain the id of the CDR for which this is a Credit CDR.

home_charging_compensation
boolean

When set to true, this CDR is for a charging session using the home charger of the EV Driver for which the energy cost needs to be financial compensated to the EV Driver.

last_updated
required
string <date-time>

Timestamp when this CDR was last updated (or created).

{
  • "country_code": "st",
  • "party_id": "str",
  • "id": "string",
  • "start_date_time": "2019-08-24T14:15:22Z",
  • "end_date_time": "2019-08-24T14:15:22Z",
  • "session_id": "string",
  • "booking_id": "string",
  • "cdr_token": {
    },
  • "auth_method": "AUTH_REQUEST",
  • "authorization_reference": "string",
  • "cdr_location": {
    },
  • "meter_id": "string",
  • "currency": "str",
  • "tariffs": [
    ],
  • "charging_periods": [
    ],
  • "signed_data": {
    },
  • "total_cost": {
    },
  • "total_fixed_cost": {
    },
  • "total_energy": 0,
  • "total_energy_cost": {
    },
  • "total_time": 0,
  • "total_time_cost": {
    },
  • "total_parking_time": 0,
  • "total_parking_cost": {
    },
  • "total_reservation_cost": {
    },
  • "remark": "string",
  • "invoice_reference_id": "string",
  • "credit": true,
  • "credit_reference_id": "string",
  • "home_charging_compensation": true,
  • "last_updated": "2019-08-24T14:15:22Z"
}

CDRs

Get list of CDRs

Fetch CDRs from the CPO's system. If additional parameters date_from and/or date_to are provided, only CDRs with last_updated between the given date_from (including) and date_to (excluding) will be returned. This request is paginated.

Authorizations:
ocpiAuthorization
query Parameters
date_from
string <date-time>

Only return objects that have last_updated after or equal to this Date/Time (inclusive).

date_to
string <date-time>

Only return objects that have last_updated up to this Date/Time, but not including (exclusive).

offset
integer >= 0
Default: 0

The offset of the first object returned. Default is 0.

limit
integer >= 1

Maximum number of objects to GET.

header Parameters
X-Request-ID
required
string

Every request SHALL contain a unique request ID, the response to this request SHALL contain the same ID. It is advised to use GUID/UUID as values.

X-Correlation-ID
required
string

Every request/response SHALL contain a unique correlation ID, every response to this request SHALL contain the same ID. It is advised to use GUID/UUID as values. When a Hub forwards a request to a party, the request SHALL contain the same X-Correlation-ID HTTP header (with the same value).

OCPI-from-country-code
string = 2 characters

'country code' of the connected party this message is sent from.

OCPI-from-party-id
string = 3 characters

'party id' of the connected party this message is sent from.

OCPI-to-country-code
string = 2 characters

'country code' of the connected party this message is to be sent to.

OCPI-to-party-id
string = 3 characters

'party id' of the connected party this message is to be sent to.

Responses

Response samples

Content type
application/json
{
  • "status_code": 1000,
  • "status_message": "string",
  • "timestamp": "2019-08-24T14:15:22Z",
  • "data": [
    ]
}