Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AdditionalGeoLocation(val latitude: String, val longitude: String, val name: DisplayText? = null)

This class defines an additional geo location that is relevant for the Charge Point.

Link copied to clipboard
@Serializable
data class BusinessDetails(val name: String, val website: String? = null, val logo: Image? = null)
Link copied to clipboard
@Serializable
data class CdrLocation(val id: String? = null, val address: String? = null, val city: String? = null, val country: String? = null, val coordinates: GeoLocation? = null, val evseUid: String? = null, val evseId: String? = null, val connectorId: String? = null, val connectorStandard: String? = null, val connectorFormat: String? = null, val connectorPowerType: String? = null)
Link copied to clipboard
@Serializable
data class CDRSResponse(val countryCode: String? = null, val partyId: String? = null, val id: String? = null, val startDateTime: String? = null, val endDateTime: String? = null, val cdrToken: CdrToken? = null, val authMethod: String? = null, val cdrLocation: CdrLocation? = null, val currency: String? = null, val totalCost: OCPIPrice? = null, val totalEnergy: Int? = null, val totalTime: Int? = null, val lastUpdated: String? = null)
Link copied to clipboard
@Serializable
data class CdrToken(val countryCode: String? = null, val partyId: String? = null, val uid: String? = null, val type: String? = null, val contractId: String? = null)
Link copied to clipboard
@Serializable
data class Connector(val id: String?, val standard: String, val format: String, val powerType: String, val maxVoltage: Int? = null, val maxAmperage: Int? = null, val lastUpdated: String, val maxElectricPower: Double? = null, val tariffIds: List<String> = emptyList(), val termsAndConditions: String? = null)

A Connector is the socket or cable and plug available for the EV to use. A single Evse may provide multiple Connectors but only one of them can be in use at the same time. A Connector always belongs to an Evse object.

Link copied to clipboard
@Serializable
data class DisplayText(val text: String?, val language: String?)

Name of the point in local language or as written at the location. For example the street name of a parking lot entrance or it’s number.

Link copied to clipboard
@Serializable
data class EnergyMix(val isGreenEnergy: Boolean, val energySources: EnergySource? = null, val environImpact: EnvironmentalImpact? = null, val supplierName: String? = null, val energyProductName: String? = null)

This type is used to specify the energy mix and environmental impact of the supplied energy at a location or in a tariff.

Link copied to clipboard
@Serializable
data class EnergySource(val source: String, val percentage: Double)

Key-value pairs (enum + percentage) of energy sources. All given values of all categories should add up to 100 percent.

Link copied to clipboard
@Serializable
data class EnvironmentalImpact(val category: String, val amount: Double)

Amount of waste produced/emitted per kWh.

Link copied to clipboard
@Serializable
data class EVOrder(val currency: String, val orderItems: List<EVOrderItem>, val status: String, val updatedDate: String)
Link copied to clipboard
@Serializable
data class EVOrderItem(val cost: Int, val itemId: String, val price: Int, val quantity: String, val subLocationId: Int, val uom: String)
Link copied to clipboard
@Serializable
data class EVOrderResponse(val locationId: Int, val merchantId: String, val merchantOrderId: Int, val orderId: String, val orders: List<EVOrder>, val status: String, val userId: String)
Link copied to clipboard
@Serializable
data class Evse(val uid: String? = null, val evseId: String? = null, val status: String? = null, val statusSchedule: List<StatusSchedule> = emptyList(), val capabilities: List<String> = emptyList(), val connectors: List<Connector> = emptyList(), val floorLevel: String? = null, val coordinates: GeoLocation? = null, val physicalReference: String? = null, val directions: List<DisplayText> = emptyList(), val parkingRestrictions: List<String> = emptyList(), val images: List<Image> = emptyList(), val lastUpdated: String? = null, val mbxExt: MbxExt? = null)

The EVSE object describes the part that controls the power supply to a single EV in a single session.

Link copied to clipboard
data class EVSearchResult(val location: Location, val tariffs: Tariffs?, val proximity: Proximity?)
Link copied to clipboard
@Serializable
data class ExceptionalPeriod(val periodBegin: String, val periodEnd: String)

Specifies one exceptional period for opening or access hours.

Link copied to clipboard
@Serializable
data class Features(var type: String? = null, var geometry: Geometry? = null, var properties: Properties? = Properties())
Link copied to clipboard
@Serializable
data class GeoLocation(val latitude: String? = null, val longitude: String? = null)

This class defines a geo location.

Link copied to clipboard
@Serializable
data class Geometry(var type: String? = null, var coordinates: List<Double> = listOf())
Link copied to clipboard
@Serializable
data class Hours(val twentyFourSeven: Boolean, val regularHours: List<RegularHours> = emptyList(), val exceptionalOpenings: ExceptionalPeriod? = null, val exceptionalClosings: ExceptionalPeriod? = null)

Opening and access hours of the location.

Link copied to clipboard
@Serializable
data class Image(val url: String, val type: String, val category: String, val thumbnail: String? = null, val width: Int? = null, val height: Int? = null)

This class references an image related to an Evse in terms of a file name or url.

Link copied to clipboard
@Serializable
data class Location(val countryCode: String, val partyId: String, val id: String, val publish: Boolean, val address: String, val city: String, val country: String, val coordinates: GeoLocation, val timeZone: String, val lastUpdated: String, val publishAllowedTo: List<PublishTokenType>? = emptyList(), val name: String? = null, val postalCode: String? = null, val state: String? = null, val relatedLocations: List<AdditionalGeoLocation> = emptyList(), val parkingType: String? = null, val evses: List<Evse> = emptyList(), val directions: List<DisplayText> = emptyList(), val cpoOperator: BusinessDetails? = null, val subOperator: BusinessDetails? = null, val owner: BusinessDetails? = null, val facilities: List<String> = emptyList(), val openingTimes: Hours? = null, val chargingWhenClosed: Boolean? = null, val images: List<Image> = emptyList(), val energyMix: EnergyMix? = null, val mbxExt: MbxExt? = null)

The Location object describes the location and its properties where a group of EVSEs that belong together are installed.

Link copied to clipboard
@Serializable
data class MarketPlaceOrderResponse(val nextActions: List<String?> = emptyList(), val data: EVOrderResponse)
Link copied to clipboard
@Serializable
data class MbxExt(val chargingGrade: String? = null, val pncCapable: Boolean = false)

This class defines an extension object added to carry data that does not fit into the OCPI spec.

Link copied to clipboard
@Serializable
data class OCPICommandResponse(val result: String?, val timeout: Int? = null, val message: List<DisplayText> = listOf()) : AcceptsResponseHeaders
Link copied to clipboard
@Serializable
data class OCPIPrice(val exclVat: Int? = null)
Link copied to clipboard
@Serializable
data class PaymentMethod(val id: String, val paymentMethodType: String, val brand: String, val expMonth: Int, val expYear: Int, val last4: String, val name: String, val postalCode: String, val created: Int, val walletId: String)
Link copied to clipboard
@Serializable
data class Properties(var location: Location? = null, var proximity: Proximity? = null, var tariffs: List<Tariffs>? = null)
Link copied to clipboard
@Serializable
data class Proximity(var latitude: Double? = null, var longitude: Double? = null, var distance: Double? = null)
Link copied to clipboard
@Serializable
data class PublishTokenType(val uid: String? = null, val type: String? = null, val issuer: String? = null, val groupId: String? = null, val visualNumber: String? = null)

Defines the set of values that identify a token to which a Location might be published. At least one of the following fields shall be set: uid, visualNumber, or groupId. When uid is set, type shall also be set. When visualNumber is set, issuer shall also be set.

Link copied to clipboard
@Serializable
data class QuadKeySearchData(val quadkeys: List<String> = listOf())
Link copied to clipboard
@Serializable
data class RegularHours(val weekday: Int, val periodBegin: String, val periodEnd: String)

Regular recurring operation or access hours.

Link copied to clipboard
@Serializable
data class SearchChargersResult(var type: String? = null, var features: List<Features> = listOf())
Link copied to clipboard
class SessionCommandResponse(val sessionId: String, val ocpiResponse: OCPICommandResponse)
Link copied to clipboard
@Serializable
data class SessionResponse(val countryCode: String? = null, val partyId: String? = null, val id: String? = null, val startDateTime: String? = null, val endDateTime: String? = null, val kwh: Int? = null, val cdrToken: CdrToken? = null, val authMethod: String? = null, val locationId: String? = null, val evseUid: String? = null, val connectorId: String? = null, val currency: String? = null, val status: String? = null, val lastUpdated: String? = null)
Link copied to clipboard
@Serializable
data class StatusSchedule(val status: String, val periodBegin: String, val periodEnd: String? = null)

This type is used to schedule status periods in the future.

Link copied to clipboard
@Serializable
data class Tariffs(var id: String? = null, var partyId: String? = null, var currency: String? = null, var countryCode: String? = null, var tariffAltText: List<DisplayText>? = null)