OCPI 2.1.1-d2
OCPI 2.1.1-d2
OCPI 2.1.1-d2
1
Open Charge Point Interface 2.1.1, document version: 2.1.1-d2
https://github.com/ocpi
21.06.2019
1
Contents
1 OCPI 7
1.1 OCPI 2.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.1 OCPI 2.1.1-d2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Introduction and background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Status codes 16
4.1 1xxx: Success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 2xxx: Client errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 3xxx: Server errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2
7 Credentials endpoint 21
7.1 Interfaces and endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.1.1 GET Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.1.2 POST Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.1.3 PUT Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.1.4 DELETE Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.2 Object description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.2.1 Credentials object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.2.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.3 Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.3.1 Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.3.2 Updating to a newer version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3.3 Changing endpoints for the current version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3.4 Updating the credentials and resetting the token . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3.5 Errors during registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3.6 Required endpoints not available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8 Locations module 26
8.1 Flow and Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.2 Interfaces and endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.2.1 CPO Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.2.2 eMSP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.3 Object description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.3.1 Location Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.3.2 EVSE Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.3.3 Connector Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.4 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.4.1 AdditionalGeoLocation class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.4.2 BusinessDetails class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.4.3 Capability enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.4.4 ConnectorFormat enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.4.5 ConnectorType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.4.6 EnergyMix class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.4.7 EnergySource class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.4.8 EnergySourceCategory enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.4.9 EnvironmentalImpact class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.4.10EnvironmentalImpactCategory enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.4.11ExceptionalPeriod class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.4.12Facility enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.4.13GeoLocation class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.4.14Hours class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.4.15Image class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.4.16ImageCategory enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.4.17LocationType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.4.18ParkingRestriction enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.4.19PowerType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.4.20RegularHours class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.4.21Status enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.4.22StatusSchedule class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3
9 Sessions module 42
9.1 Flow and Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.1.1 Push model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.1.2 Pull model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.2 Interfaces and endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.2.1 CPO Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.2.2 eMSP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.3 Object description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.3.1 Session Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.4 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.4.1 SessionStatus enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
10 CDRs module 48
10.1Flow and Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.1.1Push model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.1.2Pull model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.2Interfaces and endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.2.1CPO Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.2.2eMSP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
10.3Object description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.3.1CDR Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.4Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
10.4.1AuthMethod enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
10.4.2CdrDimension class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
10.4.3CdrDimensionType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
10.4.4ChargingPeriod class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
11 Tariffs module 53
11.1Flow and Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
11.1.1Push model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
11.1.2Pull model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
11.2Interfaces and endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
11.2.1CPO Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
11.2.2eMSP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
11.3Object description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
11.3.1Tariff Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
11.4Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.4.1DayOfWeek enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.4.2PriceComponent class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.4.3TariffElement class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
11.4.4TariffDimensionType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
11.4.5TariffRestrictions class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4
12 Tokens module 60
12.1Flow and Lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.1.1Push model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.1.2Pull model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.1.3Real-time authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.2Interfaces and endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.2.1CPO Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.2.2eMSP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
12.3Object description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
12.3.1AuthorizationInfo Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
12.3.2Token Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12.4Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12.4.1Allowed enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12.4.2LocationReferences class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.4.3TokenType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.4.4WhitelistType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
13 Commands module 66
13.1Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
13.2Interfaces and endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
13.2.1CPO Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
13.2.2eMSP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
13.3Object description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
13.3.1CommandResponse Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
13.3.2ReserveNow Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
13.3.3StartSession Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
13.3.4StopSession Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
13.3.5UnlockConnector Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
13.4Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
13.4.1CommandResponseType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
13.4.2CommandType enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
14 Types 72
14.1CiString type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
14.2DateTime type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
14.3DisplayText class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
14.4number type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
14.5string type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
14.6URL type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
15 Changelog 73
15.1Changes between OCPI 2.1.1 and 2.1.1-d2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
15.2Changes between OCPI 2.1 and 2.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
15.3Changes between OCPI 2.0 and 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5
Copyright © 2014 – 2019 NKL. All rights reserved.
This document is made available under the Creative Commons Attribution-
NoDerivatives 4.0 International Public License
(https://creativecommons.org/licenses/by-nd/4.0/legalcode).
Version History
2.1.1-d2 21-06-2019 Fixes the command module documentation, fixes a lot of examples,
lots of small textual improvements: see changelog
2.1.1 08-06-2017 Fixed 4 bugs found in OCPI 2.1, lots of small textual improvements:
see changelog
2.1 08-04-2016 Added command module. Added support for real-time authorization.
Lots of small improvements: see changelog
2.0-d2 15-02-2016 2nd documentation revision of the OCPI 2.0 spec. Only
documentation updated: ConnectorType of Connector was not
visible, credentials clarified, location URL segments incorrect (now
string, was int), minor textual updates. DateTime with timezones is
still an issue
2.0 30-12-2015 First official release of OCPI.
0.4 04-11-2014 First draft of OCPI. (Also known as Draft v4)
0.3 06-05-2014 First draft of OCPI. (Also known as Draft v3)
Document revisions
There can be multiple documentation revisions of the same version of the OCPI protocol.
The newer revisions of the same protocol version can never change the content of the messages: no new fields or
renaming of fields. A new revision can only clarify/fix texts/descriptions and fix typos etc.
These revisions (not the first) will be named: d2, d3, d4 etc.
6
1 OCPI
During implementation of OCPI 2.1, a number of bugs in the message definition were found.
This forced us to release a bug fix: OCPI 2.1.1.
With the release of OCPI 2.1.1: OCPI 2.1 is deprecated, 2.1 should no longer used and replaced by 2.1.1.
It should be a small effort to upgrade an existing 2.1 implementation to 2.1.1.
For more information on message level changes see changelog.
The original documentation of OCPI 2.1.1 contained some unclarities in the command module.
This resulted in incompatible implementations of the OCPI 2.1.1 command module.
This updated documentation should clarify the usage of commands and prevent incompatibilities.
Note that although the protocol version remains 2.1.1, this update might translate into a breaking change for some
existing implementations, albeit a very minor one.
This new documentation of OCPI 2.1.1 also contains
a lot of minor fixes to JSON examples texts that have been contributed by the OCPI community.
Many thanks to all that have taken the time and effort to commit issues.
For more details see: changes see changelog.
The Open Charge Point Interface (OCPI) enables a scalable, automated EV roaming setup between Charge Point
Operators and e-Mobility Service Providers. It supports authorization, charge point information exchange (including
live status updates and transaction events), charge detail record exchange, remote charge point commands and,
finally, the exchange of smart-charging commands between parties.
It offers market participants in EV an attractive and scalable solution for (international) roaming between networks,
avoiding the costs and innovation-limiting complexities involved with today’s non-automated solutions or with
central roaming hubs.
As such it helps to enable EV drivers to charge everywhere in a fully-informed way, helps the market to develop
quickly and helps market players to execute their business models in the best way.
What does it offer (main functionalities):
A uniform way of exchanging data (Notification Data Records and Charge Data Records), before during and
after the transaction.
Starting in 2009, e-laad foundation and the predecessor of the eViolin association specified 2 standards in order to
retrieve charge point details and active state. These are called the VAS interface and the Amsterdam interface.
In this same period, a CDR format for the exchange of charge sessions between eViolin members was defined.
This format is currently in use by the majority of the eViolin members. (eViolin is the branch organisation for EV
operators and service providers in NL and responsible for national roaming and issuing of ID’s). This resulted in
2014 in the development of OCPI.
An international group of companies already supports OCPI. Initiators are EV Box, The New Motion, ElaadNL,
BeCharged, Greenflux and Last Mile Solutions. Other participants include Next Charge, Freshmile, Plugsurfing,
Charge-partner, Hubject, e-clearing.net, IHomer and Siemens. Several other major organizations and roaming
platforms are interested in participating. The Netherlands Knowledge Platform for Charging Infrastructure (NKL)
facilitates and coordinates this project to guarantee progress and ensure development and results. Part of this
project is to find a place to continue development in the future.
This document describes a combined set of standards based on the work done in the past. Next to that, the
evolution of these standards and their use is taken into account and some elements have been updated to match
nowadays use.
The latest version of this specification can be found here: https://github.com/ocpi/ocpi
7
2 Terminology and Definitions
2.1 Abbreviations
In OCPI it is advised to use eMI3 compliant names for Contract IDs and EVSE IDs. The provider and the operator
name is important here, in order to target the right provider or operator, they need to be known up front, at least
between the cooperating parties.
In several standards, an issuing authority is mentioned that will keep a central registry of known Providers and
Operators.
At this moment, the following countries have an authority that keeps track of the known providers and operators:
The Dutch foundation, named eViolin keeps the registry for The Netherlands.
The list of operator IDs and provider IDs can be viewed on their website eViolin/Leden.
2.2.2 Germany
The BDEW organisation keeps the registry for Germany in their general code number service bdew-codes.de.
2.2.3 Austria
Austrian Mobile Power GmbH maintains a registry for Austria. This list is not publicly available.
For more information visit austrian-mobile-power.at
2.2.4 France
The AFIREV* organisation will keep/keeps the registry for France. It provides operation Id for CPO and eMSP in
compliance with eMI3 id structure. The prefix of these Ids is the “fr” country code. AFIREV will also be in charge
of the definition of EVSE-Id structure, Charging-Pool-Id structure (location), and Contract-Id structure for France.
AFIREV bases its requirements and recommendations on eMI3 definitions.
AFIREV stands for: Association Française pour l’Itinérance de la Recharge Électrique des Véhicules
Connector is a specific socket or cable available for the EV to make use of.
EVSE is the part that controls the power supply to a single EV in a single session. An EVSE may provide
multiple connectors but only one of these can be active at the same time.
Location is a group of one or more EVSEs that belong together geographically or spatially.
8
A Location is typically the exact location of one or more EVSEs, but it can also be the entrance of a parking garage
or a gated community. It is up to the CPO to use whatever makes the most sense in a specific situation. Once
arrived at the location, any further instructions to reach the EVSE from the Location are stored in the EVSE object
itself (such as the floor number, visual identification or manual instructions).
In order to prevent issues with Capitals in variable names, the naming in JSON is not CamelCase but snake_case.
All variables are lowercase and include an underscore for a space.
2.5 Cardinality
When defining the cardinality of a field, the following symbols are used throughout this document:
? An optional object. If not set, it might be null, or the field might be omitted. When the field Object
is omitted and it has a default value, the value is the default value.
1 Required object. Object
* A list of zero or more objects. If empty, it might be null, [] or the field might be omitted. [Object]
+ A list of at least one object. [Object]
9
3 Transport and format
The OCPI protocol is based on HTTP and uses the JSON format. It follows a RESTful architecture for webservices
where possible.
The interfaces are protected on HTTP transport level, with SSL and token based authentication. Please note that
this mechanism does not require client side certificates for authentication, only server side certificates in order to
setup a secure SSL connection.
Push: Changes in objects, and new objects are send (semi) real-time to receiver.
Each HTTP request must add a ‘Authorization’ header. The header looks as follows:
The literal ‘Token’ indicates that the token based authentication mechanism is used. Its parameter is a string
consisting of printable, non-whitespace ASCII characters. The token must uniquely identify the requesting party.
This way, the server can use this to link data and commands to this party’s account. If the header is missing or
the token doesn’t match any known party then the server must respond with a HTTP 401 - Unauthorized status
code.
The request method can be any of GET, PUT, PATCH or DELETE. The OCPI protocol uses them in a way similar to
REST APIs.
Method Description
The mimetype of the request body is application/json and may contain the data as documented for each
endpoint.
3.1.3.1 GET A server is not required to return all objects to a client, the server might for example not send all
CDRs to a client,
because some CDRs do not belong to this client.
When a client receives objects from the server that contain invalid JSON or invalid OCPI objects (For example:
missing fields),
10
the client has no way of letting this know to the server. It is advised to log these errors and contact the server
administrator about this.
When a list of objects contains some objects that are correct and some with ‘problems’ the client should at least
process the correct OCPI objects.
3.1.3.1.1 Pagination All GET methods that return a list of objects have pagination, this allows a client and
server to control the amount of objects
returned in the response to a GET request, while still enabling the client to retrieve all objects by doing multiple
request
with different parameters. Without pagination the server had to return all objects in one response that could
potentially contain millions of objects.
To enable pagination of the returned list of objects, additional URL parameters are allowed for the GET request and
additional
headers need to be added to the response.
3.1.3.1.2 Paginated Request The following table lists all the parameters that have to be supported, but
might be omitted by a client request.
Parameter Description
offset The offset of the first object returned. Default is 0 (the first object).
limit Maximum number of objects to GET. Note: the server might decide to return fewer
objects, either because there are no more objects, or the server limits the
maximum number of objects to return. This is to prevent, for example,
overloading the system.
Example: With offset=0 and limit=10 the server shall return the first 10 records (if 10 objects match the request).
Then next page starts with offset=10.
3.1.3.1.3 Paginated Response For pagination to work correctly it is important that multiple calls to the same
URL (including query parameters)
result in the same objects being returned by the server.
For this to be the case it is important that the sequence of objects does not change. (or as little as possible)
It is best practice to return the oldest (by creation date, not the last_updated field) first.
While a client crawls over the pages (multiple GET requests every time to the ‘next’ page Link), a new object might
be created on the server.
The client detects this: the X-Total-Count will be higher on the next call.
But the client doesn’t have to correct for this. Only the last page will be different (or an additional page).
So the client will not be required to crawl all pages all over again, when the client has reached to last page it has
retrieved all relevant pages and is up to date.
Note: Some query parameters can cause concurrency problems. For example: the date_to query parameter.
When there are for example 1000 objects matching a query for all objects with date_to before 2016-01-01.
While crawling over the pages one of these objects is update.
The client detects this: X-Total-Count will be lower in a next request.
It is advised redo the previous GET but then with the offset lowered by 1 (if the offset was not 0) and after that
continue crawling the ‘next’ page links.
When an object before this page has been updated, then the client has missed 1 object.
HTTP headers that have to be added to any paginated GET response.
Link Link to the ‘next’ page should be provided, when this is NOT the last page. The Link
should also contain any filters present in the original request. See example below.
X-Total-Count (Custom HTTP Header) Total number of objects available in the server system that
match the give query (including the given query parameters for example: date_to
and date_from but excluding limit and offset) and that are available to this client.
For example: The CPO server might return less CDR objects to an eMSP then the
total number of CDRs available in the CPO system.
X-Limit (Custom HTTP Header) Number of objects that are returned. Note that this is an
upper limit, if there are not enough remaining objects to return, fewer objects than
this upper limit number will be returned.
11
3.1.3.1.4 Pagination Examples Example of a required OCPI pagination link header:
After the client has called the given “next” page URL above the Link parameter will most likely look like this:
https://www.server.com/ocpi/cpo/2.0/cdrs/?date_from=2016-01-01T00:00:00Z&date_to=2016-12-31T23:59:59Z
The server should return (when the server has enough objects and the limit is the amount of objects the server
wants to send is 100.)
(This example should have been on 1 line, but didn’t fit the paper width.)
Link: <https://www.server.com/ocpi/cpo/2.0/cdrs/?offset=100
&limit=100&date_from=2016-01-01T00:00:00Z&date_to=2016-12-31T23:59:59Z>; rel="next"
Example of a server limiting the amount of objects returned: Client does a GET to:
https://www.server.com/ocpi/cpo/2.0/cdrs/?limit=2000
The server should return (when the server has enough objects and the limit is the amount of objects the server
wants to send is 100.) The X-Limit HTTP parameter should be set to 100 as well.
3.1.3.2 PUT A PUT request must specify all required fields of an object (similar to a POST request).
Optional fields that are not included will revert to their default value which is either specified in the protocol or
NULL.
3.1.3.3 PATCH A PATCH request must only specify the object’s identifier (if needed to identify this object) and
the fields to be updated. Any fields (both required or optional) that are left out remain unchanged.
The mimetype of the request body is application/json and may contain the data as documented for each
endpoint.
In case a PATCH request fails, the client is expected to call the GET method to check the state of the object in the
other party’s system. If the object doesn’t exist, the client should do a PUT.
Normal client/server RESTful services work in a way where the Server is the owner of the objects that are created.
The client requests a POST method with an object to the end-point URL. The response send by the server will
contain the URL to the new object. The client will request only one server to create a new object, not multiple
servers.
Many OCPI modules work differently: the client is the owner of the object and only pushes the information to one
or more servers for information sharing purposes.
For example: the CPO owns the Tariff objects and pushes them to a couple of eMSPs, so each eMSP gains knowledge
of the tariffs that the CPO will charge them for their customers’ sessions. eMSP might receive Tariff objects from
multiple CPOs. They need to be able to make a distinction between the different tariffs from different CPOs.
The distinction between objects from different CPOs/eMSPs is made based on a {country-code} and {party-id}.
The country-code and party-id of the other party are received during the credentials handshake, so that a server
might know the values a client will use in an URL.
Client owned object URL definition: {base-ocpi-url}/{end-point}/{country-code}/{party-id}/{object-id}
Example of a URL to a client owned object
https://www.server.com/ocpi/cpo/2.0/tariffs/NL/TNM/14
12
3.1.4.1 Errors When a client pushes a client owned object, but the {object-id} in the URL is different from the
id in the object being pushed. A Server implementation is advised to return an OCPI status code: 2001.
When a request cannot be accepted, an HTTP error response code is expected including a JSON object that contains
more details. HTTP status codes are described on w3.org.
The content that is sent with all the response messages is an ‘application/json’ type and contains a JSON object
with the following properties:
data Array or Object or String * or ? Contains the actual response data object or
list of objects from each request, depending
on the cardinality of the response data, this
is an array (card. * or +), or a single object
(card. 1 or ?)
status_code int 1 Response code, as listed in Status Codes,
indicates how the request was handled. To
avoid confusion with HTTP codes, at least
four digits are used.
status_message string ? An optional status message which may help
when debugging.
timestamp DateTime 1 The time this message was generated.
For brevity’s sake, any further examples used in this specification will only contain the value of the “data” field. In
reality, it will always have to be wrapped in the above response format.
{
"data": [{
"version": "1.9",
"url": "https://example.com/ocpi/cpo/1.9/"
}, {
"version": "2.0",
"url": "https://example.com/ocpi/cpo/2.0/"
}],
"status_code": 1000,
"status_message": "Success",
"timestamp": "2015-06-30T21:59:59Z"
}
{
"data": {
"version": "2.0",
"endpoints": [{
"identifier": "credentials",
"url": "https://example.com/ocpi/cpo/2.0/credentials/"
}, {
"identifier": "locations",
"url": "https://example.com/ocpi/cpo/2.0/locations/"
}]
},
"status_code": 1000,
"status_message": "Success",
"timestamp": "2015-06-30T21:59:59Z"
}
13
3.1.5.3 Example: Tokens GET Response with one Token object. (CPO end-point) (one object)
{
"data": {
"uid": "012345678",
"type": "RFID",
"auth_id": "FA54320",
"visual_number": "DF000-2001-8999",
"issuer": "TheNewMotion",
"valid": true,
"whitelist": "ALLOWED",
"last_updated": "2015-06-29T22:39:09Z"
},
"status_code": 1000,
"status_message": "Success",
"timestamp": "2015-06-30T21:59:59Z"
}
3.1.5.4 Example: Tokens GET Response with list of Token objects. (eMSP end-point) (list of objects)
{
"data": [{
"uid": "100012",
"type": "RFID",
"auth_id": "FA54320",
"visual_number": "DF000-2001-8999",
"issuer": "TheNewMotion",
"valid": true,
"whitelist": "ALWAYS",
"last_updated": "2015-06-21T22:39:05Z"
}, {
"uid": "100013",
"type": "RFID",
"auth_id": "FA543A5",
"visual_number": "DF000-2001-9000",
"issuer": "TheNewMotion",
"valid": true,
"whitelist": "ALLOWED",
"last_updated": "2015-06-28T11:21:09Z"
}, {
"uid": "100014",
"type": "RFID",
"auth_id": "FA543BB",
"visual_number": "DF000-2001-9010",
"issuer": "TheNewMotion",
"valid": false,
"whitelist": "ALLOWED",
"last_updated": "2015-05-29T10:12:26Z"
}],
"status_code": 1000,
"status_message": "Success",
"timestamp": "2015-06-30T21:59:59Z"
}
{
"status_code": 2001,
"status_message": "Missing required field: type",
"timestamp": "2015-06-30T21:59:59Z"
}
14
3.2 Interface endpoints
As OCPI contains multiple interfaces, different endpoints are available for messaging. The protocol is designed
such that the exact URLs of the endpoints can be defined by each party. It also supports an interface per version.
The locations of all the version specific endpoints can be retrieved by fetching the API information from the versions
endpoint. Each version specific endpoint will then list the available endpoints for that version. It is strongly
recommended to insert the protocol version into the URL.
For example: /ocpi/cpo/2.0/locations and /ocpi/emsp/2.0/locations.
The URLs of the endpoints in this document are descriptive only. The exact URL can be found by fetching the
endpoint information from the API info endpoint and looking up the identifier of the endpoint.
During communication over OCPI, it might happen that one of the communication parties is unreachable for an
amount of time.
OCPI works event based, new messages and status are pushed from one party to another. When communication is
lost, updates cannot be delivered.
OCPI messages should not be queued. When a client does a POST, PUT or PATCH request and that requests fails or
times out,
the client should not queue the message and retry the same message again on a later time.
When the connection is re-established, it is up to the target-server of a connection to GET the current status from
to source-server to get back in-sync.
For example:
CDRs of the period of communication loss can be rerieved with a GET command on the CDRs module, with
filters to retrieve only CDRs of the period since the last CDR was received.
Status of EVSEs (or Locations) can be retrieved by calling a GET on the Locations module.
15
4 Status codes
The transport layer ends after a message is correctly parsed into a (semantically unvalidated) JSON structure.
When a message does not contain a valid JSON string, the HTTP error 400 - Bad request is returned.
If a request is syntactically valid JSON and addresses an existing resource, no HTTP error should be returned.
Those requests are supposed to have reached the OCPI layer. As is customary for RESTful APIs:
if the resource does NOT exist, the server should return a HTTP 404 - Not Found.
When the server receives a valid OCPI object it should respond with:
HTTP 200 - Ok when the object already existed and is successfully updated.
HTTP 201 - Created when the object is newly created in the server system.
Requests that reach the OCPI layer should return an OCPI response message with a status_code field as defined
below.
Range Description
1xxx Success
2xxx Client errors – The data sent by the client can not be processed by the server
3xxx Server errors – The server encountered an internal error
When the status code is in the success range (1xxx), the data field in the response message should contain the
information as specified in the protocol. Otherwise the data field is unspecified and may be omitted, null or
something else that could help to debug the problem from a programmer’s perspective. For example, it could
specify which fields contain an error or are missing.
Code Description
Errors detected by a server in the message sent by a client: The client did something wrong
Code Description
16
4.3 3xxx: Server errors
Error during processing of the OCPI payload in the server. The message was syntactically correct but could not be
processed by the server.
Code Description
17
5 Version information endpoint
This endpoint lists all the available OCPI versions and the corresponding URLs to
where version specific details such as the supported endpoints can be found.
Example endpoint structure: /ocpi/cpo/versions and /ocpi/emsp/versions
The exact URL to the implemented version endpoint should be given (offline) to parties that interface
with your OCPI implementation, this endpoint is the starting point for discovering locations
of the different modules and versions of OCPI that have been implemented.
Both the CPO and the eMSP must have this endpoint.
Method Description
5.1 Data
5.2 GET
5.2.1 Example
[
{
"version": "2.1.1",
"url": "https://example.com/ocpi/cpo/2.1.1/"
},
{
"version": "2.0",
"url": "https://example.com/ocpi/cpo/2.0/"
}
]
18
6 Version details endpoint
Method Description
GET Fetch information about the supported endpoints for this version.
6.1 Data
The Module identifiers for each endpoint are in the beginning of each Module chapter. The following table contains
the list of modules in this version of OCPI. Most modules (except Credentials & registration) are optional, but there
might be dependencies between modules, if so that will be mentioned in the module description.
CDRs cdrs
Commands commands
Credentials & registration credentials Required for all implementations
Locations locations
Sessions sessions
Tariffs tariffs
Tokens tokens
Value Description
6.1.3.1 Custom Modules Parties are allowed to create custom modules or customized versions of the existing
modules.
For this the ModuleID enum can be extended with additional custom moduleIDs.
These custom moduleIDs MAY only be sent to parties with which there is an agreement to use a custom module.
Do NOT send custom moduleIDs to parties you are not 100% sure will understand the custom moduleIDs.
19
It is advised to use a prefix (country_code + party_id) for any custom moduleID, this ensures that the moduleID
will not be used for any future module of OCPI.
For example:
nltnm-tokens
6.2 GET
Fetch information about the supported endpoints and their URLs for this version.
6.2.1 Example
{
"version": "2.0",
"endpoints": [
{
"identifier": "credentials",
"url": "https://example.com/ocpi/cpo/2.0/credentials/"
},
{
"identifier": "locations",
"url": "https://example.com/ocpi/cpo/2.0/locations/"
}
]
}
20
7 Credentials endpoint
Method Description
Retrieves the credentials object to access the server’s platform. The request body is empty, the response contains
the credentials object to access the server’s platform. This credentials object also contains extra information about
the server such as its business details.
Provides the server with credentials to access the client’s system. This credentials object also contains extra
information about the client such as its business details.
A POST initiates the registration process for this endpoint’s version. The server must also fetch the client’s endpoints
for this version.
If successful, the server must generate a new token and respond with the client’s new credentials to access the
server’s system. The credentials object in the response also contains extra information about the server such as
its business details.
This must return a HTTP status code 405: method not allowed if the client was already registered.
Provides the server with updated credentials to access the client’s system. This credentials object also contains
extra information about the client such as its business details.
A PUT will switch to the version that contains this credentials endpoint if it’s different from the current version. The
server must fetch the client’s endpoints again, even if the version has not changed.
If successful, the server must generate a new token for the client and respond with the client’s updated credentials
to access the server’s system. The credentials object in the response also contains extra information about the
server such as its business details.
This must return a HTTP status code 405: method not allowed if the client was not registered yet.
Informs the server that its credentials to access the client’s system are now invalid and can no longer be used.
Both parties must end any automated communication. This is the unregistration process.
This must return a HTTP status code 405: method not allowed if the client was not registered.
21
7.2 Object description
The party_id and country_code are provided here to inform a server about the party_id and country_code a
client will use when pushing client owned objects. This helps a server determine the URLs a client will use when
pushing a client owned object.
The country_code is added the make certain the URL used when pushing a client owned object is unique, there
might be multiple parties in the world with the same party_id, but the combination should always be unique.
A party operating in multiple countries can always use the home country of the company for all connections. For
example: an OCPI implementation might push EVSE IDs from a company for different countries, preventing an
OCPI connection per country a company is operating in.
The party_id and country_code give here, have no direct link with the eMI3 EVSE IDs and Contract IDs that might
be used in the different OCPI modules. For example: an implementation OCPI might push EVSE IDs with an eMI3
spot operator different from the OCPI party_id and/or the country_code.
7.2.2 Example
{
"url": "https://example.com/ocpi/cpo/versions/",
"token": "ebf3b399-779f-4497-9b9d-ac6ad3cc44d2",
"party_id": "EXA",
"country_code": "NL",
"business_details": {
"name": "Example Operator",
"logo": {
"url": "https://example.com/img/logo.jpg",
"thumbnail": "https://example.com/img/logo_thumb.jpg",
"category": "OPERATOR",
"type": "jpeg",
"width": 512,
"height": 512
},
"website": "http://example.com"
}
}
7.3.1 Registration
To register a CPO in an eMSP platform (or vice versa), the CPO must create a unique token that can be used for
authenticating the eMSP. This token along with the versions endpoint should be sent to the eMSP in a secure way
that is outside the scope of this protocol.
TOKEN_A is given offline, after registration store the TOKEN_C which will be used in future exchanges.
(In the sequence diagrams below we use relative paths as short resource identifiers to illustrate a point; please
note that they should really be absolute URLs in any working implementation of OCPI)
22
Due to its symmetric nature, the CPO and eMSP can be swapped in the registration sequence.
23
7.3.2 Updating to a newer version
At some point both parties will have implemented a newer OCPI version. To start using the newer version, one
party has to send a PUT request to the credentials endpoint of the other party.
This can be done by following the update procedure for the same version. By sending a PUT request to the
credentials endpoint of this version, the other party will fetch and store the corresponding set of endpoints.
The credentials (or parts thereof, such as the token) can be updated by sending the new credentials via a PUT
request to the credentials endpoint of the current version, similar to the update procedure described above.
When the Server connects back to the client during the credentials registration, it might encounter problems.
When this happens, the Server should add the status code: 3001 in the response to the POST from the client.
24
7.3.6 Required endpoints not available
When two parties connect, it might happen that one of the parties expects a certain endpoint to be available at the
other party.
For example: a CPO could only want to connect when the CDRs endpoint is available in an eMSP system.
In case the client is starting the credentials exchange process and cannot find the endpoints it expects, it is
expected NOT to send the POST request with credentials to the server. Log a message/notify the administrator to
contact the administrator of the server system.
In case the server, receiving the request from a client, cannot find the endpoints it expects, then it is expected to
respond to the request with a status code: 3003.
25
8 Locations module
The Locations module has Locations as base object, Locations have EVSEs, EVSEs have Connectors. With the
methods in the eMSP interface, Location information/statuses can be shared with the eMSP. Updates can be done
to the Location, but also to only an EVSE or a Connector.
When a CPO creates Location objects it pushes them to the eMSPs by calling PUT on the eMSPs Locations endpoint.
Providers who do not support push mode need to call GET on the CPOs Locations endpoint to receive the new
object.
If the CPO wants to replace a Location related object, they push it to the eMSP systems by calling PUT on their
Locations endpoint.
Any changes to a Location related object can also be pushed to the eMSP by calling the PATCH on the eMSPs
Locations endpoint. Providers who do not support push mode need to call GET on the CPOs Locations endpoint to
receive the updates.
When the CPO wants to delete an EVSE they must update by setting the status field to REMOVED and call the PUT
or PATCH on the eMSP system. A Location without valid EVSE objects can be considered as expired and should no
longer be displayed. There is no direct way to delete a location.
When the CPO is not sure about the state or existence of a Location, EVSE or Connector object in the eMSPs system,
the CPO can call the GET to validate the object in the eMSP system.
There is both a CPO and an eMSP interface for Locations. Advised is to use the push direction from CPO to eMSP
during normal operation.
The CPO interface is meant to be used when the connection between 2 parties is established, to retrieve the
current list of Location objects with the current status, and when the eMSP is not 100% sure the Locations cache is
completely correct.
The eMSP can use the CPO GET Object interface to retrieve a specific Location, EVSE or Connector, this might be
used by a eMSP that wants information about a specific Location, but has not implemented the eMSP Locations
interface (cannot receive push).
Method Description
GET Fetch a list locations, last updated between the {date_from} and
{date_to} (paginated), or get a specific location, EVSE or Connector.
POST n/a
PUT n/a
PATCH n/a
DELETE n/a
8.2.1.1 GET Method Depending on the URL Segments provided, the GET request can either be used to retrieve
information about a list of available locations and EVSEs at this CPO: GET List
Or it can be used to get information about a specific Location, EVSE or Connector: GET Object
26
8.2.1.1.1 GET List Request Parameters Example endpoint structures for retrieving a list of Locations:
/ocpi/cpo/2.0/locations/?date_from=xxx&date_to=yyy
/ocpi/cpo/2.0/locations/?offset=50
/ocpi/cpo/2.0/locations/?limit=100
/ocpi/cpo/2.0/locations/?offset=50&limit=100
If additional parameters: {date_from} and/or {date_to} are provided, only Locations with (last_updated) between
the given date_from and date_to will be returned.
If an EVSE is updated, also the ‘parent’ Location’s last_updated fields is updated. If a Connector is updated, the
EVSE’s last_updated and the Location’s last_updated field are updated.
This request is paginated, it supports the pagination related URL parameters.
8.2.1.1.2 GET List Response Data The endpoint returns a list of Location objects
The header will contain the pagination related headers.
Any older information that is not specified in the response is considered no longer valid.
Each object must contain all required fields. Fields that are not specified may be considered as null values.
8.2.1.1.3 GET Object Request Parameters Example endpoint structures for a specific Location, EVSE or
Connector:
/ocpi/cpo/2.0/locations/{location_id}
/ocpi/cpo/2.0/locations/{location_id}/{evse_uid}
/ocpi/cpo/2.0/locations/{location_id}/{evse_uid}/{connector_id}
The following parameters can be provided as URL segments.
8.2.1.1.4 GET Object Response Data The response contains the requested object.
27
8.2.2 eMSP Interface
Locations is a client owned object, so the end-points need to contain the required extra fields: {party_id} and
{country_code}.
Example endpoint structures:
/ocpi/emsp/2.0/locations/{country_code}/{party_id}/{location_id}
/ocpi/emsp/2.0/locations/{country_code}/{party_id}/{location_id}/{evse_uid}
/ocpi/emsp/2.0/locations/{country_code}/{party_id}/{location_id}/{evse_uid}/{connector_id}
Method Description
8.2.2.1 GET Method If the CPO wants to check the status of a Location, EVSE or Connector object in the eMSP
system, it might GET the object from the eMSP system for validation purposes. The CPO is the owner of the objects,
so it would be illogical if the eMSP system had a different status or was missing an object. If a discrepancy is found,
the CPO might push an update to the eMSP via a PUT or PATCH call.
8.2.2.1.1 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the CPO requesting this PUT to the
eMSP system.
party_id string(3) yes Party ID (Provider ID) of the CPO requesting this PUT
to the eMSP system.
location_id string(39) yes Location.id of the Location object to retrieve.
evse_uid string(39) no Evse.uid, required when requesting an EVSE or
Connector object.
connector_id string(36) no Connector.id, required when requesting a Connector
object.
28
8.2.2.2 PUT Method The CPO pushes available Location/EVSE or Connector objects to the eMSP. PUT is used
to send new Location objects to the eMSP, or to replace existing Locations.
8.2.2.2.1 Request Parameters This is an information push message, the objects pushed will not be owned
by the eMSP. To make distinctions between objects being pushed to an eMSP from different CPOs, the {party_id}
and {country_code} have to be included in the URL, as URL segments.
country_code string(2) yes Country code of the CPO requesting this PUT to the
eMSP system.
party_id string(3) yes Party ID (Provider ID) of the CPO requesting this PUT
to the eMSP system.
location_id string(39) yes Location.id of the new Location object, or the
Location of which an EVSE or Location object is send
evse_uid string(39) no Evse.uid, required when an EVSE or Connector
object is send/replaced.
connector_id string(36) no Connector.id, required when a Connector object is
send/replaced.
8.2.2.3 PATCH Method Same as the PUT method, but only the fields/objects that have to be updated have to
be present, other fields/objects that are not specified are considered unchanged.
8.2.2.3.1 Example: a simple status update This is the most common type of update message to notify
eMSPs that an EVSE (EVSE with uid 3255 of Charge Point 1012) is now occupied.
{
"status": "CHARGING"
}
8.2.2.3.2 Example: change the location name In this example the name of location 1012 is updated.
{
"name": "Interparking Gent Zuid"
}
8.2.2.3.3 Example: set tariff update In this example connector 2 of EVSE 1 of Charge Point 1012, receives
a new pricing scheme.
{
"tariff_id": "15"
}
29
8.2.2.3.4 Example: add an EVSE To add an EVSE, simply put the full object in an update message, including
all its required fields. Since the id is new, the receiving party will know that it is a new object. When not all required
fields are specified, the object may be discarded.
{
"uid": "3256",
"evse_id": "BE-BEC-E041503003",
"status": "AVAILABLE",
"capabilities": ["RESERVABLE"],
"connectors": [
{
"id": "1",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"tariff_id": "14"
}
],
"physical_reference": 3,
"floor": -1
}
8.2.2.3.5 Example: delete an EVSE An EVSE can be deleted by updating its status property.
{
"status": "REMOVED"
}
30
8.3.1 Location Object
The Location object describes the location and its properties where a group of EVSEs that belong together are
installed. Typically the Location object is the exact location of the group of EVSEs, but it can also be the entrance
of a parking garage which contains these EVSEs. The exact way to reach each EVSE can be further specified by its
own properties.
31
8.3.1.1 Example
{
"id": "LOC1",
"type": "ON_STREET",
"name": "Gent Zuid",
"address": "F.Rooseveltlaan 3A",
"city": "Gent",
"postal_code": "9000",
"country": "BEL",
"coordinates": {
"latitude": "51.047599",
"longitude": "3.729944"
},
"evses": [{
"uid": "3256",
"evse_id": "BE-BEC-E041503001",
"status": "AVAILABLE",
"status_schedule": [],
"capabilities": [
"RESERVABLE"
],
"connectors": [{
"id": "1",
"standard": "IEC_62196_T2",
"format": "CABLE",
"power_type": "AC_3_PHASE",
"voltage": 220,
"amperage": 16,
"tariff_id": "11",
"last_updated": "2015-03-16T10:10:02Z"
}, {
"id": "2",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"power_type": "AC_3_PHASE",
"voltage": 220,
"amperage": 16,
"tariff_id": "11",
"last_updated": "2015-03-18T08:12:01Z"
}],
"physical_reference": "1",
"floor_level": "-1",
"last_updated": "2015-06-28T08:12:01Z"
}, {
"uid": "3257",
"evse_id": "BE-BEC-E041503002",
"status": "RESERVED",
"capabilities": [
"RESERVABLE"
],
"connectors": [{
"id": "1",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"power_type": "AC_3_PHASE",
"voltage": 220,
"amperage": 16,
"tariff_id": "12",
"last_updated": "2015-06-29T20:39:09Z"
}],
"physical_reference": "2",
"floor_level": "-2",
"last_updated": "2015-06-29T20:39:09Z"
}],
"operator": {
"name": "BeCharged"
},
"last_updated": "2015-06-29T20:39:09Z"
}
32
8.3.2 EVSE Object
The EVSE object describes the part that controls the power supply to a single EV in a single session. It always
belongs to a Location object. It will only contain directions to get from the location to the EVSE (i.e. floor,
physical_reference or directions). When these properties are insufficient to reach the EVSE from the Location point,
then it typically indicates that this EVSE should be put in a different Location object (sometimes with the same
address but with different coordinates/directions).
An EVSE object has a list of connectors which can not be used simultaneously: only one connector per EVSE can be
used at the time.
33
8.3.3 Connector Object
A connector is the socket or cable 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.
This class defines a geo location. The geodetic system to be used is WGS 84.
34
8.4.3 Capability enum
Value Description
Value 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.
Value Description
35
8.4.6 EnergyMix class
This type is used to specify the energy mix and environmental impact of the supplied energy at a location or in a
tariff.
* These fields can be used to look-up energy qualification or to show it directly to the customer (for well-known
brands like Greenpeace Energy, etc.)
8.4.6.1 Examples
8.4.6.1.1 Simple:
"energy_mix": {
"is_green_energy": true
}
"energy_mix": {
"is_green_energy": true,
"supplier_name": "Greenpeace Energy eG",
"energy_product_name": "eco-power"
}
8.4.6.1.3 Complete:
"energy_mix": {
"is_green_energy": false,
"energy_sources": [
{ "source": "GENERAL_GREEN", "percentage": 35.9 },
{ "source": "GAS", "percentage": 6.3 },
{ "source": "COAL", "percentage": 33.2 },
{ "source": "GENERAL_FOSSIL", "percentage": 2.9 },
{ "source": "NUCLEAR", "percentage": 21.7 }
],
"environ_impact": [
{ "source": "NUCLEAR_WASTE", "amount": 0.0006 },
{ "source": "CARBON_DIOXIDE", "amount": 372 }
],
"supplier_name": "E.ON Energy Deutschland",
"energy_product_name": "E.ON DirektStrom eco"
}
Key-value pairs (enum + percentage) of energy sources. All given values should add up to 100 percent per
category.
Value Description
Key-value pairs (enum + amount) of waste and carbon dioxide emittion per kWh.
Value Description
37
8.4.12 Facility enum
Value Description
HOTEL A hotel.
RESTAURANT A restaurant.
CAFE A cafe.
MALL A mall or shopping center.
SUPERMARKET A supermarket.
SPORT Sport facilities: gym, field etc.
RECREATION_AREA A Recreation area.
NATURE Located in, or close to, a park, nature reserve/park etc.
MUSEUM A museum.
BUS_STOP A bus stop.
TAXI_STAND A taxi stand.
TRAIN_STATION A train station.
AIRPORT An airport.
CARPOOL_PARKING A carpool parking.
FUEL_STATION A Fuel station.
WIFI Wifi or other type of internet available.
This class references images related to a EVSE in terms of a file name or url. According to the roaming connection
between one EVSE Operator and one or more Navigation Service Providers the hosting or file exchange of image
payload data has to be defined. The exchange of this content data is out of scope of OCHP. However, the
38
recommended setup is a public available web server hosted and updated by the EVSE Operator. Per charge point
an unlimited number of images of each type is allowed. Recommended are at least two images where one is a
network or provider logo and the second is a station photo. If two images of the same type are defined they should
be displayed additionally, not optionally.
Photo Dimensions:
The recommended dimensions for all photos is a minimum of 800 pixels wide and 600 pixels height. Thumbnail
representations for photos should always have the same orientation as the original with a size of 200 to 200 pixels.
Logo Dimensions:
The recommended dimensions for logos are exactly 512 pixels wide and 512 pixels height. Thumbnail representa-
tions for logos should be exactly 128 pixels in width and height. If not squared, thumbnails should have the same
orientation as the original.
The category of an image to obtain the correct usage in a user presentation. The category has to be set accordingly
to the image content in order to guarantee the right usage.
Value Description
CHARGER Photo of the physical device that contains one or more EVSEs.
ENTRANCE Location entrance photo. Should show the car entrance to the location from street side.
LOCATION Location overview photo.
NETWORK logo of an associated roaming network to be displayed with the EVSE for example in lists,
maps and detailed information view
OPERATOR logo of the charge points operator, for example a municipality, to be displayed with the
EVSEs detailed information view or in lists and maps, if no networkLogo is present
OTHER Other
OWNER logo of the charge points owner, for example a local store, to be displayed with the EVSEs
detailed information view
Reflects the general type of the charge points location. May be used
for user information.
Value Description
39
8.4.18 ParkingRestriction enum
Value Description
Value Description
Field
Name Field Type Card. Description
weekday int(1) 1 Number of day in the week, from Monday (1) till Sunday
(7)
period_begin string(5) 1 Begin of the regular period given in hours and minutes.
Must be in 24h format with leading zeros. Example:
“18:15”. Hour/Minute separator: “:” Regex:
[0-2][0-9]:[0-5][0-9]
period_end string(5) 1 End of the regular period, syntax as for period_begin.
Must be later than period_begin.
8.4.20.1 Example Operating on weekdays from 8am till 8pm with one exceptional opening on
22/6/2014 and one exceptional closing the Monday after:
"opening_times": {
"regular_hours": [
{
"weekday": 1,
"period_begin": "08:00",
"period_end": "20:00"
},
{
"weekday": 2,
"period_begin": "08:00",
"period_end": "20:00"
},
{
"weekday": 3,
"period_begin": "08:00",
"period_end": "20:00"
},
{
"weekday": 4,
"period_begin": "08:00",
"period_end": "20:00"
},
{
40
"weekday": 5,
"period_begin": "08:00",
"period_end": "20:00"
}
],
"twentyfourseven": false,
"exceptional_openings": [
{
"period_begin": "2014-06-21T09:00:00Z",
"period_end": "2014-06-21T12:00:00Z"
}
],
"exceptional_closings": [
{
"period_begin": "2014-06-24T00:00:00Z",
"period_end": "2014-06-25T00:00:00Z"
}
]
}
This represents the following schedule, where stroked out days are without operation hours, bold days are where
exceptions apply and regular displayed days are where the regular schedule applies.
Weekday Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su
Date 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Open 08 08 08 08 08 09 - 08 - 08 08 08 - -
from
Open 20 20 20 20 20 12 - 20 - 20 20 20 - -
till
Value Description
This type is used to schedule status periods in the future. The eMSP can provide this information to the EV user for
trip planning purpose. A period MAY have no end. Example: “This station will be running as of tomorrow. Today it is
still planned and under construction.”
Note that the scheduled status is purely informational. When the status actually changes, the CPO must push an
update to the EVSEs status field itself.
41
9 Sessions module
When the CPO creates a Session object they push it to the eMSPs by calling PUT on the eMSPs Sessions endpoint
with the newly created Session object.
Any changes to a Session in the CPO system are sent to the eMSP system by calling PATCH on the eMSPs Sessions
endpoint with the updated Session object.
Sessions cannot be deleted, final status of a session is: COMPLETED.
When the CPO is not sure about the state or existence of a Session object in the eMSPs system, the CPO can call
the GET to validate the Session object in the eMSP system.
eMSPs who do not support the push model need to call GET on the CPOs Sessions endpoint to receive a list of
Sessions.
This GET can also be used, combined with the Push model to retrieve Sessions after the system (re)connects to a
CPO, to get a list Sessions ‘missed’ during a time offline.
Method Description
GET Fetch Session objects of charging sessions last updated between the {date_from}
and {date_to} (paginated)
POST n/a
PUT n/a
PATCH n/a
DELETE n/a
9.2.1.1.1 Request Parameters Only Sessions with last_update between the given {date_from} and
{date_to} will be returned.
This request is paginated, so also supports the pagination related URL parameters.
date_from DateTime yes Only return Sessions that have last_updated after
this Date/Time.
date_to DateTime no Only return Sessions that have last_updated before
this Date/Time.
offset int no The offset of the first object returned. Default is 0.
limit int no Maximum number of objects to GET.
42
9.2.1.1.2 Response Data The response contains a list of Session objects that match the given parameters in
the request, the header will contain the pagination related headers.
Any older information that is not specified in the response is considered as no longer valid.
Each object must contain all required fields. Fields that are not specified may be considered as null values.
Sessions is a client owned object, so the end-points need to contain the required extra fields: {party_id} and
{country_code}.
Example endpoint structure:
/ocpi/emsp/2.0/sessions/{country_code}/{party_id}/{session_id}
Method Description
GET Get the Session object from the eMSP system by its id {session_id}.
POST n/a
PUT Send a new/updated Session object
PATCH Update the Session object of id {session_id}.
DELETE n/a
9.2.2.1 GET Method The CPO system might request the current version of a Session object from the eMSP
system for,
for example validation purposes, or the CPO system might have received a error on a PATCH.
9.2.2.1.1 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the CPO requesting this GET to the
eMSP system.
party_id string(3) yes Party ID (Provider ID) of the CPO requesting this GET
to the eMSP system.
session_id string(36) yes id of the Session object to get from the eMSP
system.
9.2.2.1.2 Response Data The response contains the request Session object, if available.
9.2.2.2 PUT Method Inform the system about a new/updated session in the eMSP backoffice by PUTing a
Session object.
9.2.2.2.1 Request Body The request contains the new or updated Session object.
43
9.2.2.2.2 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the CPO requesting this PUT to the
eMSP system.
party_id string(3) yes Party ID (Provider ID) of the CPO requesting this PUT
to the eMSP system.
session_id string(36) yes id of the new or updated Session object.
9.2.2.3 PATCH Method Same as the PUT method, but only the fields/objects that have to be updated have to
be present, other fields/objects that are not specified are considered unchanged.
{
"total_cost": 0.60
}
44
9.3.1.1 Examples
{
"id": "101",
"start_datetime": "2015-06-29T22:39:09Z",
"kwh": 0.00,
"auth_id": "DE8ACC12E46L89",
"auth_method": "WHITELIST",
"location": {
"id": "LOC1",
"type": "ON_STREET",
"name": "Gent Zuid",
"address": "F.Rooseveltlaan 3A",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"coordinates": {
"latitude": "3.729944",
"longitude": "51.047599"
},
"evses": [{
"uid": "3256",
"evse_id": "BE-BEC-E041503003",
"status": "AVAILABLE",
"connectors": [{
"id": "1",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"power_type": "AC_1_PHASE",
"voltage": 230,
"amperage": 64,
"tariff_id": "11",
"last_updated": "2015-06-29T22:39:09Z"
}],
"last_updated": "2015-06-29T22:39:09Z"
}],
"last_updated": "2015-06-29T22:39:09Z"
},
"currency": "EUR",
"total_cost": 2.50,
"status": "PENDING",
"last_updated": "2015-06-29T22:39:09Z"
}
45
9.3.1.2.1 Simple Session example of a short finished session
{
"id": "101",
"start_datetime": "2015-06-29T22:39:09Z",
"end_datetime": "2015-06-29T23:50:16Z",
"kwh": 41.00,
"auth_id": "DE8ACC12E46L89",
"auth_method": "WHITELIST",
"location": {
"id": "LOC1",
"type": "ON_STREET",
"name": "Gent Zuid",
"address": "F.Rooseveltlaan 3A",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"coordinates": {
"latitude": "3.729944",
"longitude": "51.047599"
},
"evses": [{
"uid": "3256",
"evse_id": "BE-BEC-E041503003",
"status": "AVAILABLE",
"connectors": [{
"id": "1",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"power_type": "AC_1_PHASE",
"voltage": 230,
"amperage": 64,
"tariff_id": "11",
"last_updated": "2015-06-29T23:09:10Z"
}],
"last_updated": "2015-06-29T23:09:10Z"
}],
"last_updated": "2015-06-29T23:09:10Z"
},
"currency": "EUR",
"charging_periods": [{
"start_date_time": "2015-06-29T22:39:09Z",
"dimensions": [{
"type": "ENERGY",
"volume": 120
}, {
"type": "MAX_CURRENT",
"volume": 30
}]
}, {
"start_date_time": "2015-06-29T22:40:54Z",
"dimensions": [{
"type": "ENERGY",
"volume": 41000
}, {
"type": "MIN_CURRENT",
"volume": 34
}]
}, {
"start_date_time": "2015-06-29T23:07:09Z",
"dimensions": [{
"type": "PARKING_TIME",
"volume": 0.718
}]
}],
"total_cost": 8.50,
"status": "COMPLETED",
"last_updated": "2015-06-29T23:09:10Z"
}
46
9.4 Data types
Property Description
ACTIVE The session is accepted and active. Al pre-condition are met: Communication between EV
and EVSE (for example: cable plugged in correctly), EV or Driver is authorized. EV is being
charged, or can be charged. Energy is, or is not, being transfered.
COMPLETED The session is finished successfully. No more modifications will be made to this session.
INVALID The session is declared invalid and will not be billed.
PENDING The session is pending, it has not yet started. Not all pre-condition are met. This is the
initial state. This session might never become an active session.
47
10 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.
When the CPO creates CDR(s) they push them to the relevant eMSP by calling POST on the eMSPs CDRs endpoint
with the newly created CDR(s). A CPO is not required to send ALL CDRs to ALL eMSPs, it is allowed to only send
CDRs to the eMSP that a CDR is relevant to.
CDRs should contain enough information (dimensions) to allow the eMSP to validate the total costs.
It is advised to send enough information to the eMSP so it can calculate its own costs for billing their customer. An
eMSP might have a very different contract/pricing model with the EV driver than the tariff structure from the CPO.
NOTE: CDRs can not yet be updated or removed. This might be added in a future version of OCPI.
If the CPO, for any reason wants to view a CDR it has posted to a eMSP system, the CPO can retrieve the CDR by
calling the GET on the eMSPs CDRs endpoint at the URL returned in the response to the POST.
There is both a CPO and an eMSP interface for CDRs. Depending on business requirements parties can decide to
use
the CPO Interface/Get model, or the eMSP Interface/Push model, or both.
Push is the preferred model to use, the eMSP will receive CDRs when created by the CPO.
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/a
48
10.2.1.1 GET Method Fetch CDRs from the CPO systems.
10.2.1.1.1 Request Parameters If additional parameters: {date_from} and/or {date_to} are provided, only
CDRs with last_updated between the given date_from and date_to will be returned.
This request is paginated, it supports the pagination related URL parameters.
10.2.1.1.2 Response Data The endpoint returns a list of CDRs matching the given parameters in the GET
request, the header will contain the pagination related headers.
Any older information that is not specified in the response is considered as no longer valid.
Each object must contain all required fields. Fields that are not specified may be considered as null values.
Method Description
10.2.2.1.1 Response URL To retrieve an existing URL from the eMSP system, the URL, returned in the response
to a POST of a new CDR, has to be used.
10.2.2.1.2 Response Data The endpoint returns the requested CDR, if it exists
49
10.2.2.2.1 Request Body In the post request the new CDR object is sent.
10.2.2.2.2 Response Headers The response should contain the URL to the just created CDR object in the
eMSP system.
Location URL yes URL to the newly created CDR in the eMSP
system, can be used by the CPO system to
do a GET on of the same CDR
The CDR object describes the Charging Session and its costs, how these costs are built up, etc.
NOTE: The duration of charging (energy being transferred between EVSE and EV) during this session can be
calculated via: total_time - total_parking_time.
50
10.3.1.1 Example of a CDR
{
"id": "12345",
"start_date_time": "2015-06-29T21:39:09Z",
"stop_date_time": "2015-06-29T23:37:32Z",
"auth_id": "DE8ACC12E46L89",
"auth_method": "WHITELIST",
"location": {
"id": "LOC1",
"type": "ON_STREET",
"name": "Gent Zuid",
"address": "F.Rooseveltlaan 3A",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"coordinates": {
"latitude": "3.729944",
"longitude": "51.047599"
},
"evses": [{
"uid": "3256",
"evse_id": "BE-BEC-E041503003",
"status": "AVAILABLE",
"connectors": [{
"id": "1",
"standard": "IEC_62196_T2",
"format": "SOCKET",
"power_type": "AC_1_PHASE",
"voltage": 230,
"amperage": 64,
"tariff_id": "11",
"last_updated": "2015-06-29T21:39:01Z"
}],
"last_updated": "2015-06-29T21:39:01Z"
}],
"last_updated": "2015-06-29T21:39:01Z"
},
"currency": "EUR",
"tariffs": [{
"id": "12",
"currency": "EUR",
"elements": [{
"price_components": [{
"type": "TIME",
"price": "2.00",
"step_size": 300
}],
}],
"last_updated": "2015-02-02T14:15:01Z"
}],
"charging_periods": [{
"start_date_time": "2015-06-29T21:39:09Z",
"dimensions": [{
"type": "TIME",
"volume": 1.973
}]
}],
"total_cost": 4.00,
"total_energy": 15.342,
"total_time": 1.973,
"last_updated": "2015-06-29T22:01:13Z"
}
51
10.4 Data types
Value Description
Value Description
A charging period consists of a start timestamp and a list of possible values that influence this period, for example:
Amount of energy charged this period, maximum current during this period etc.
52
11 Tariffs module
When the CPO creates a new Tariff they push them to the eMSPs by calling the PUT on the eMSPs
Tariffs endpoint with the newly created Tariff object.
Any changes to the Tariff(s) in the CPO system can be send to the eMSP system by calling either PUT
or PATCH on the eMSPs Tariffs endpoint with the updated Tariff object.
When the CPO deletes a Tariff, they will update the eMSPs systems by calling DELETE
on the eMSPs Tariffs endpoint, with the ID of the Tariff that is deleted.
When the CPO is not sure about the state or existence of a Tariff object in the eMSPs system, the
CPO can call the GET to validate the Tariff object in the eMSP system.
There is both a CPO and an eMSP interface for Tariffs. Advised is to use the push direction from CPO to eMSP during
normal operation.
The CPO interface is meant to be used when the connection between 2 parties is established to retrieve the current
list of Tariffs objects, and when the eMSP is not 100% sure the Tariff cache is still correct.
The CPO Tariffs interface gives the eMSP the ability to request tariffs.
Example endpoint structure: /ocpi/cpo/2.0/tariffs/?date_from=xxx&date_to=yyy
Method Description
GET Returns Tariff Objects from the CPO, last updated between the
{date_from} and {date_to} (paginated)
POST n/a
PUT n/a
PATCH n/a
DELETE n/a
11.2.1.1.1 Request Parameters If additional parameters: {date_from} and/or {date_to} are provided, only
Tariffs with (last_updated) between the given date_from and date_to will be returned.
This request is paginated, it supports the pagination related URL parameters.
date_from DateTime no Only return Tariffs that have last_updated after this
Date/Time.
date_to DateTime no Only return Tariffs that have last_updated before this
Date/Time.
offset int no The offset of the first object returned. Default is 0.
limit int no Maximum number of objects to GET.
53
11.2.1.1.2 Response Data The endpoint returns an object with a list of valid Tariffs, the header will contain
the pagination related headers.
Any older information that is not specified in the response is considered as no longer valid.
Each object must contain all required fields. Fields that are not specified may be considered as null values.
Tariffs is a client owned object, so the end-points need to contain the required extra fields: {party_id} and
{country_code}.
Example endpoint structure:
/ocpi/emsp/2.0/tariffs/{country_code}/{party_id}/{tariff_id}
Method Description
11.2.2.1 GET Method If the CPO wants to check the status of a Tariff in the eMSP system it might GET the
object from the eMSP system for validation purposes. The CPO is the owner of the objects, so it would be illogical if
the eMSP system had a different status or was missing an object.
11.2.2.1.1 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the CPO requesting this PUT to the
eMSP system.
party_id string(3) yes Party ID (Provider ID) of the CPO requesting this PUT
to the eMSP system.
tariff_id string(36) yes Tariff.id of the Tariff object to retrieve.
11.2.2.2 PUT Method New or updated Tariff objects are pushed from the CPO to the eMSP.
11.2.2.2.1 Request Body In the put request the new or updated Tariff object is sent.
54
11.2.2.2.2 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the CPO requesting this PUT to the
eMSP system.
party_id string(3) yes Party ID (Provider ID) of the CPO requesting this PUT
to the eMSP system.
tariff_id string(36) yes Tariff.id of the (new) Tariff object (to replace).
{
"id": "12",
"currency": "EUR",
"elements": [{
"price_components": [{
"type": "TIME",
"price": 2.00,
"step_size": 300
}]
}]
}
11.2.2.3 PATCH Method The PATCH method works the same as the PUT method, except that the fields/objects
that have to be updated have to be present, other fields/objects that are not specified are considered unchanged.
{
"elements": [{
"price_components": [{
"type": "TIME",
"price": 2.50,
"step_size": 300
}]
}]
}
11.2.2.4.1 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the CPO requesting this PUT to the
eMSP system.
party_id string(3) yes Party ID (Provider ID) of the CPO requesting this PUT
to the eMSP system.
tariff_id string(36) yes Tariff.id of the Tariff object to delete.
55
11.3 Object description
A Tariff Object consists of a list of one or more TariffElements, these elements can be used to create complex Tariff
structures.
When the list of elements contains more then 1 element, than the first tariff in the list with matching restrictions
will be used.
It is advised to always set a “default” tariff, the last tariff in the list of elements with no restriction. This acts as a
fallback when
non of the TariffElements before this matches the current charging period.
To define a “Free of Charge” Tariff in OCPI, a tariff has to be provided that has a type = FLAT and price = 0.00.
See: Free of Charge Tariff example
11.3.1.1 Examples
{
"id": "12",
"currency": "EUR",
"elements": [{
"price_components": [{
"type": "TIME",
"price": 2.00,
"step_size": 300
}]
}],
"last_updated": "2015-06-29T20:39:09Z"
}
{
"id": "12",
"currency": "EUR",
"tariff_alt_text": [{
"language": "en",
"text": "2 euro p/hour"
}, {
"language": "nl",
"text": "2 euro p/uur"
}],
"elements": [{
"price_components": [{
"type": "TIME",
"price": 2.00,
"step_size": 300
}]
}],
"last_updated": "2015-06-29T20:39:09Z"
}
56
11.3.1.1.3 Simple Tariff example with alternative URL
{
"id": "12",
"currency": "EUR",
"tariff_alt_url": "https://company.com/tariffs/12",
"elements": [{
"price_components": [{
"type": "TIME",
"price": 2.00,
"step_size": 300
}]
}],
"last_updated": "2015-06-29T20:39:09Z"
}
{
"id": "11",
"currency": "EUR",
"tariff_alt_url": "https://company.com/tariffs/11",
"elements": [{
"price_components": [{
"type": "FLAT",
"price": 2.50,
"step_size": 1
}]
}, {
"price_components": [{
"type": "TIME",
"price": 1.00,
"step_size": 900
}],
"restrictions": {
"max_power": 32.00
}
}, {
"price_components": [{
"type": "TIME",
"price": 2.00,
"step_size": 600
}],
"restrictions": {
"min_power": 32.00,
"day_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"]
}
}, {
"price_components": [{
"type": "TIME",
"price": 1.25,
"step_size": 600
}],
"restrictions": {
"min_power": 32.00,
"day_of_week": ["SATURDAY", "SUNDAY"]
}
}, {
"price_components": [{
"type": "PARKING_TIME",
"price": 5.00,
"step_size": 300
}],
"restrictions": {
57
"start_time": "09:00",
"end_time": "18:00",
"day_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"]
}
}, {
"price_components": [{
"type": "PARKING_TIME",
"price": 6.00,
"step_size": 300
}],
"restrictions": {
"start_time": "10:00",
"end_time": "17:00",
"day_of_week": ["SATURDAY"]
}
}],
"last_updated": "2015-06-29T20:39:09Z"
}
{
"id": "12",
"currency": "EUR",
"elements": [{
"price_components": [{
"type": "FLAT",
"price": 0.00,
"step_size": 0
}]
}],
"last_updated": "2015-06-29T20:39:09Z"
}
Value Description
MONDAY Monday
TUESDAY Tuesday
WEDNESDAY Wednesday
THURSDAY Thursday
FRIDAY Friday
SATURDAY Saturday
SUNDAY Sunday
58
The step_size also depends on the type, every type (except FLAT) defines a step_size multiplier. this is the size
of every ‘step’ and the unit.
For example: PARKING_TIME has ‘step_size multiplier: 1 second’ That means that the step_size of a
PriceComponent is muliplied by 1 second.
Thus a step_size = 300 means 300 seconds.
Value Description
start_time string(5) ? Start time of day, for example 13:30, valid from this
time of the day. Must be in 24h format with leading
zeros. Hour/Minute separator: “:” Regex:
[0-2][0-9]:[0-5][0-9]
end_time string(5) ? End time of day, for example 19:45, valid until this
time of the day. Same syntax as start_time
start_date string(10) ? Start date, for example: 2015-12-24, valid from this
day
end_date string(10) ? End date, for example: 2015-12-27, valid until this
day (excluding this day)
min_kwh number ? Minimum used energy in kWh, for example 20, valid
from this amount of energy is used
max_kwh number ? Maximum used energy in kWh, for example 50, valid
until this amount of energy is used
min_power number ? Minimum power in kW, for example 0, valid from this
charging speed
max_power number ? Maximum power in kW, for example 20, valid up to
this charging speed
min_duration int ? Minimum duration in seconds, valid for a duration
from x seconds
max_duration int ? Maximum duration in seconds, valid for a duration up
to x seconds
day_of_week DayOfWeek * Which day(s) of the week this tariff is valid
59
12 Tokens module
When the MSP creates a new Token object they push it to the CPO by calling PUT on the CPO’s Tokens endpoint
with the newly created Token object.
Any changes to Token in the eMSP system are sent to the CPO system by calling either the PUT or the PATCH on the
CPO’s Tokens endpoint with the updated Token(s).
When the eMSP invalidates a Token (deleting is not possible), the eMSP will send the updated Token (with the field:
valid set to false, by calling, either the PUT or the PATCH on the CPO’s Tokens endpoint with the updated Token.
When the eMSP is not sure about the state or existence of a Token object in the CPO system, the
eMSP can call the GET to validate the Token object in the CPO system.
When a CPO is not sure about the state of the list of known Tokens, or wants to request the full
list as a start-up of their system, the CPO can call the GET on the eMSP’s Token endpoint to receive
all Tokens, updating already known Tokens and adding new received Tokens to it own list of Tokens.
This is not intended for real-time operation, requesting the full list of tokens for every authorization will put to
much strain on systems.
It is intended for getting in-sync with the server, or to get a list of all tokens (from a server without push) every X
hours.
An eMSP might want their Tokens to be authorizated ‘real-time’, not white-listed. For this the eMSP has to implement
the POST Authorize request and set the Token.whitelist field to NEVER for Tokens they want to have authorized
‘real-time’.
If an eMSP doesn’t want real-time authorization, the POST Authorize request doesn’t have to be implemented as
long as all their Tokens have Token.whitelist set to ALWAYS.
There is both a CPO and an eMSP interface for Tokens. It is advised to use the push direction from eMSP to CPO
during normal operation.
The eMSP interface is meant to be used when the CPO is not 100% sure the Token cache is still correct.
With this interface the eMSP can push the Token information to the CPO.
Tokens is a client owned object, so the end-points need to contain the required extra fields: {party_id} and
{country_code}.
Example endpoint structure:
/ocpi/cpo/2.0/tokens/{country_code}/{party_id}/{token_uid}
Method Description
60
12.2.1.1 GET Method If the eMSP wants to check the status of a Token in the CPO system it might GET the
object from the CPO system for validation purposes. The eMSP is the owner of the objects, so it would be illogical if
the CPO system had a different status or was missing an object.
12.2.1.1.1 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the eMSP requesting this GET from
the CPO system.
party_id string(3) yes Party ID (Provider ID) of the eMSP requesting this
GET from the CPO system.
token_uid string(36) yes Token.uid of the Token object to retrieve.
12.2.1.2 PUT Method New or updated Token objects are pushed from the eMSP to the CPO.
12.2.1.2.1 Request Body In the put request a new or updated Token object is sent.
12.2.1.2.2 Request Parameters The following parameters can be provided as URL segments.
country_code string(2) yes Country code of the eMSP sending this PUT request
to the CPO system.
party_id string(3) yes Party ID (Provider ID) of the eMSP sending this PUT
request to the CPO system.
token_uid string(36) yes Token.uid of the (new) Token object (to replace).
{
"uid": "012345678",
"type": "RFID",
"auth_id": "DE8ACC12E46L89",
"visual_number": "DF000-2001-8999",
"issuer": "TheNewMotion",
"valid": true,
"whitelist": "ALWAYS",
"last_updated": "2015-06-29T22:39:09Z"
}
61
12.2.1.3 PATCH Method Same as the PUT method, but only the fields/objects that have to be updated have
to be present, other fields/objects that are not specified are considered unchanged.
{
"valid": false
}
This interface enables the CPO to request the current list of Tokens, when needed.
Via the POST method it is possible to authorize a single token.
Example endpoint structure: /ocpi/emsp/2.0/tokens/?date_from=xxx&date_to=yyy
Method Description
GET Get the list of known Tokens, last updated between the {date_from} and
{date_to} (paginated)
POST Real-time authorization request
PUT n/a
PATCH n/a
DELETE n/a
12.2.2.1 GET Method Fetch information about Tokens known in the eMSP systems.
12.2.2.1.1 Request Parameters If additional parameters: {date_from} and/or {date_to} are provided, only
Tokens with (last_updated) between the given date_from and date_to will be returned.
This request is paginated, it supports the pagination related URL parameters.
date_from DateTime no Only return Tokens that have last_updated after this
Date/Time.
date_to DateTime no Only return Tokens that have last_updated before
this Date/Time.
offset int no The offset of the first object returned. Default is 0.
limit int no Maximum number of objects to GET.
12.2.2.1.2 Response Data The endpoint response with list of valid Token objects, the header will contain the
pagination related headers.
Any older information that is not specified in the response is considered as no longer valid.
Each object must contain all required fields. Fields that are not specified may be considered as null values.
12.2.2.2 POST Method Do a ‘real-time’ authorization request to the eMSP system, validating if a Token might
be used (at the optionally given Location).
Example endpoint structure:
/ocpi/emsp/2.0/tokens/{token_uid}/authorize?{type=token_type}
The /authorize is required for the real-time authorize request.
When the eMSP receives a ‘real-time’ authorization request from a CPO that contains too little information (no
LocationReferences provided) to determine if the Token might be used, the eMSP SHOULD respond with the OCPI
status: 2002
62
12.2.2.2.1 Request Parameters The following parameter has to be provided as URL segments.
12.2.2.2.2 Request Body In the body an optional LocationReferences object can be given. The eMSP SHALL
then validate if the Token is allowed to be used at this Location, and if applicable: which of the Locations
EVSEs/Connectors.
The object with valid Location and EVSEs/Connectors will be returned in the response.
63
12.3.2 Token Object
The combination of uid and type should be unique for every token within the eMSP’s system.
12.3.2.1 Example
{
"uid": "012345678",
"type": "RFID",
"auth_id": "DE8ACC12E46L89",
"visual_number": "DF000-2001-8999",
"issuer": "TheNewMotion",
"valid": true,
"whitelist": "ALLOWED",
"last_updated": "2015-06-29T22:39:09Z"
}
Value Description
64
12.4.2 LocationReferences class
Value Description
Value Description
65
13 Commands module
RESERVE_NOW
START_SESSION
STOP_SESSION
UNLOCK_CONNECTOR
13.1 Flow
With the Commands module, commands can be sent from the eMSP, via the CPO to a Charge Point.
Most Charge Point are hooked up to the internet via a relative slow wireless connection. To prevent long blocking
calls, the commands module is designed to work asynchronously.
The eMSP send a request to a CPO, via the CPO Commands interface. The CPO checks if it can send the request to
a Charge Point and will respond to the request with a status, indicating if the request can be sent to a Charge Point.
The CPO sends the requested command (via another protocol, for example: OCPP) to a Charge Point. The Charge
Point will respond if it understands the command and will try to execute the command. This response doesn’t
mean that the command was executed successfully. The CPO will forward this command in a new POST request to
the eMSP Commands interface.
The following examples try to give insight into the message flow and the asynchronous nature of the OCPI
Commands.
Example of a UNLOCK_CONNECTOR that fails because the Location is not known by the CPO.
66
Example of a START_SESSION that is accepted, but no new Session is started because EV not plugged in before
end of time-out.
These examples use OCPP 1.6 based commands between CPO and Charge Point, but that is not a requirement for
OCPI.
The commands module consists of two interfaces: a CPO interface that enables a eMSP (and its clients) to send
commands to a Charge Point and an eMSP interface to receive the response from the Charge Point asynchronously.
Method Description
GET n/a
POST Send a command to the CPO, requesting the CPO to send the
command to the Charge Point
PUT n/a
PATCH n/a
DELETE n/a
67
13.2.1.1 POST Method
13.2.1.1.1 Request Parameters The following parameters can be provided as URL segments.
13.2.1.1.2 Request Body Depending on the command parameter the body SHALL contain the applicable object
for that command.
13.2.1.1.3 Response Data The response contains the direct response from the CPO, not the response from
the Charge Point itself, that will be sent via an asynchronous POST on the eMSP interface if this response is
ACCEPTED.
Method Description
GET n/a
POST Receive the asynchronous response from the Charge Point.
PUT n/a
PATCH n/a
DELETE n/a
68
13.2.2.1 POST Method
13.2.2.1.1 Request Parameters There are no URL segment parameters required by OCPI.
It is up to the implementation of the eMSP to determine what parameters are put in the URL. The eMSP sends a
URL in the POST method body to the CPO. The CPO is required to use this URL for the asynchronous response by
the Charge Point. It is advised to make this URL unique for every request to differentiate simultanous commands,
for example by adding a unique id as a URL segment.
Example:
/ocpi/emsp/2.0/commands/RESERVE_NOW/1234
/ocpi/emsp/2.0/commands/UNLOCK_CONNECTOR/2
13.2.2.1.2 Request Body The request body contains the result of the command.
The evse_uid is optional. If no EVSE is specified, the Charge Point should keep one EVSE available for the EV
Driver identified by the given Token. (This might not be supported by all Charge Points).
A reservation can be replaced/updated by sending a RESERVE_NOW request with the same Location (Charge Point)
and the same reservation_id.
response_url URL 1 URL that the CommandResponse POST should be send to. This
URL might contain an unique ID to be able to distinguish
between ReserveNow requests.
token Token 1 Token object for how to reserve this Charge Point (and specific
EVSE).
expiry_date DateTime 1 The Date/Time when this reservation ends.
reservation_id int 1 Reservation id, unique for this reservation. If the Charge Point
already has a reservation that matches this reservationId the
Charge Point will replace the reservation.
location_id string(39) 1 Location.id of the Location (belonging to the CPO this request is
send to) for which to reserve an EVSE.
evse_uid string(39) ? Optional EVSE.uid of the EVSE of this Location if a specific EVSE
has to be reserved.
69
13.3.3 StartSession Object
The evse_uid is optional. If no EVSE is specified, the Charge Point can itself decide on which EVSE to start a new
session. (this might not be supported by all Charge Points).
response_url URL 1 URL that the CommandResponse POST should be sent to. This URL
might contain an unique ID to be able to distinguish between
StartSession requests.
token Token 1 Token object the Charge Point has to use to start a new session.
location_id string(39) 1 Location.id of the Location (belonging to the CPO this request is
send to) on which a session is to be started.
evse_uid string(39) ? Optional EVSE.uid of the EVSE of this Location on which a session
is to be started.
response_url URL 1 URL that the CommandResponse POST should be sent to. This URL
might contain an unique ID to be able to distinguish between
StopSession requests.
session_id string(36) 1 Session.id of the Session that is requested to be stopped.
response_url URL 1 URL that the CommandResponse POST should be sent to. This URL
might contain an unique ID to be able to distinguish between
UnlockConnector requests.
location_id string(39) 1 Location.id of the Location (belonging to the CPO this request is
send to) of which it is requested to unlock the connector.
evse_uid string(39) 1 EVSE.uid of the EVSE of this Location of which it is requested to
unlock the connector.
connector_id string(36) 1 Connector.id of the Connector of this Location of which it is
requested to unlock.
Value Description
NOT_SUPPORTED The requested command is not supported by this CPO, Charge Point, EVSE etc.
REJECTED Command request rejected by the CPO or Charge Point.
ACCEPTED Command request accepted by the CPO or Charge Point.
TIMEOUT Command request timeout, no response received from the Charge Point in an
reasonable time.
UNKNOWN_SESSION The Session in the requested command is not known by this CPO.
70
13.4.2 CommandType enum
Value Description
RESERVE_NOW Request the Charge Point to reserve a (specific) EVSE for a Token for a
certain time, starting now.
START_SESSION Request the Charge Point to start a transaction on the given EVSE/Connector.
STOP_SESSION Request the Charge Point to stop an ongoing session.
UNLOCK_CONNECTOR Request the Charge Point to unlock the connector (if applicable). This
functionality is for help desk operators only!
The command UNLOCK_CONNECTOR may only be used by an help desk operator working for the eMSP.
This command SHALL never be allowed to be sent directly by the EV-Driver.
The UNLOCK_CONNECTOR is intended to be used in the rare situation that the connector is not unlocked
successfully after a transaction is stopped. The mechanical unlock of the lock mechanism might get
stuck, for example: fail when there is tension on the charging cable when the Charge Point tries to
unlock the connector.
In such a situation the EV-Driver can call either the CPO or the eMSP to retry the unlocking.
71
14 Types
All timestamps are formatted as string(25) using the combined date and time format from the ISO 8601 standard.
All timestamps SHALL be in UTC.
The absence of the timezone designator implies a UTC timestamp.
Example:
2015-06-29T20:39:09Z
2015-06-29T20:39:09
2016-12-29T17:45:09Z
2016-12-29T17:45:09
Example:
{
"language": "en",
"text": "Standard Tariff"
}
72
15 Changelog
Expected
Context (Module / Impact: eMSP / Expected Effort:
Object) CPO eMSP / CPO Description
Commands / CPO Minor / Minor Minimal / correct incorrect type of response, was:
POST method Minor / Minor Minimal CommandResponseType but should have
Commands / eMSP Minimal / been: CommandResponse.
POST method Minimal correct incorrect type of request body, was:
CommandResponseType but should have
been: CommandResponse.
Expected
Context (Module / Impact: eMSP / Expected Effort:
Object) CPO eMSP / CPO Description
CDRs / CDR object Minor / Minor Minimal / field: CDR.id is changed from string(15) to
Minimal string(36).
CDRs / CDR object Minor / Minor Minimal / field: CDR.auth_id is changed from string(32)
Minimal to string(36).
CDRs / CDR object Minor / Minor Minimal / field: Session.stop_date_time is changed from
Minimal optional (?) to required (1).
Commands / Minor / Minor Minimal / field: ReserveNow.location_id is changed from
ReserveNow object Minimal string(15) to string(39).
Commands / Minor / Minor Minimal / field: ReserveNow.evse_uid is changed from
ReserveNow object Minimal string(15) to string(39).
Commands / Minor / Minor Minimal / field: StartSession.location_id is changed
StartSession object Minimal from string(15) to string(39).
Commands / Minor / Minor Minimal / field: StartSession.evse_uid is changed from
StartSession object Minimal string(15) to string(39).
Commands / Minor / Minor Minimal / field: StopSession.session_id is changed from
StopSession object Minimal string(15) to string(36).
Commands / Minor / Minor Minimal / field: UnlockConnector.location_id is changed
UnlockConnector Minimal from string(15) to string(39).
object
Commands / Minor / Minor Minimal / field: UnlockConnector.evse_uid is changed
UnlockConnector Minimal from string(15) to string(39).
object
Commands / Minor / Minor Minimal / field: UnlockConnector.connector_id is
UnlockConnector Minimal changed from string(15) to string(36).
object
Locations / CPO GET Minor / Minor Minimal / parameter: location_id is changed from
Object method Minimal string(15) to string(39).
Locations / CPO GET Minor / Minor Minimal / parameter: evse_uid is changed from
Object method Minimal string(15) to string(39).
Locations / CPO GET Minor / Minor Minimal / parameter: connector_id is changed from
Object method Minimal string(15) to string(36).
Locations / eMSP GET Minor / Minor Minimal / parameter: location_id is changed from
method Minimal string(15) to string(39).
Locations / eMSP GET Minor / Minor Minimal / parameter: evse_uid is changed from
method Minimal string(15) to string(39).
Locations / eMSP GET Minor / Minor Minimal / parameter: connector_id is changed from
method Minimal string(15) to string(36).
Locations / eMSP PUT Minor / Minor Minimal / parameter: location_id is changed from
method Minimal string(15) to string(39).
73
Expected
Context (Module / Impact: eMSP / Expected Effort:
Object) CPO eMSP / CPO Description
Locations / eMSP PUT Minor / Minor Minimal / parameter: evse_uid is changed from
method Minimal string(15) to string(39).
Locations / eMSP PUT Minor / Minor Minimal / parameter: connector_id is changed from
method Minimal string(15) to string(36).
Locations / Location Minor / Minor Minimal / field: Location.id is changed from string(15)
object Minimal to string(39).
Locations / EVSE Minor / Minor Minimal / field: EVSE.uid is changed from string(15) to
object Minimal string(39).
Locations / Connector Minor / Minor Minimal / field: Connector.id is changed from string(15)
object Minimal to string(36).
Sessions / eMSP GET Minor / Minor Minimal / parameter: session_id is changed from
method Minimal string(15) to string(36).
Sessions / eMSP PUT Minor / Minor Minimal / parameter: session_id is changed from
method Minimal string(15) to string(36).
Sessions / Session Minor / Minor Minimal / field: Session.id is changed from string(15) to
object Minimal string(36).
Sessions / Session Minor / Minor Minimal / field: Session.auth_id length changed from 15
object Minimal to 36 this was THE bug in 2.1.
Sessions / Session Minor / Minor Minimal / field: Session.total_cost is changed from
object Minimal required (1) to optional (?).
Tariffs / eMSP GET Minor / Minor Minimal / parameter: tariff_id is changed from
method Minimal string(15) to string(36).
Tariffs / eMSP PUT Minor / Minor Minimal / parameter: tariff_id is changed from
method Minimal string(15) to string(36).
Tariffs / eMSP DELETE Minor / Minor Minimal / parameter: tariff_id is changed from
method Minimal string(15) to string(36).
Tariffs / Tariff object Minor / Minor Minimal / field: Tariff.id length changed from string(15)
Minimal to string(36).
Tokens / CPO GET Minor / Minor Minimal / parameter: token_uid is changed from
method Minimal string(15) to string(36).
Tokens / CPO PUT Minor / Minor Minimal / parameter: token_uid is changed from
method Minimal string(15) to string(36).
Tokens / eMSP POST Minor / Minor Minimal / parameter: token_uid is changed from
method Minimal string(15) to string(36).
Tokens / eMSP POST Minor / Minor Minimal / extra optional parameter added: token_type.
method Minimal
Tokens / Token object Minor / Minor Minimal / field: Token.uid length changed from
Minimal string(15) to string(36).
Tokens / Token object Minor / Minor Minimal / field: Token.auth_id length changed from
Minimal string(32) to string(36).
Transport and Format / Minor / Minor Minimal / field: data now allows String as possible type,
Response format Minimal needed for the commands module.
Expected
Context (Module / Impact: eMSP / Expected Effort:
Object) CPO eMSP / CPO Description
CDRs / CDR object Major / Major Minimal / replaced field: “total_usage” with:
Minimal “total_energy”, “total_time” and
“total_parking_time”
CDRs / CDR object Major / Major Minimal / OCPI decimal type is removed and replaced
Minimal by JSON number.
CDRs / CDR object Major / Major Average / new field added: “last_updated”, GET
Average method filters changed to use this new
field instead of start of charging session.
CDRs / CdrDimension Major / Major Minimal / OCPI decimal type is removed and replaced
class Minimal by JSON number.
74
Expected
Context (Module / Impact: eMSP / Expected Effort:
Object) CPO eMSP / CPO Description
75
Expected
Context (Module / Impact: eMSP / Expected Effort:
Object) CPO eMSP / CPO Description
Tokens / eMSP GET Average/ Average / added filters to retrieve only Tokens that
method Optional Minimal have been updated between
date_to/date_from.
Version information / Optional / Average / added description on how to add
Custom Modules Optional Average custom/customized modules to OCPI.
Version information / Minor / Minor Minimal / OCPI Version changed from OCPI decimal to
Version class Minimal VersionNumber enum.
Version information / Minor / Minor Minimal / OCPI Version changed from OCPI decimal to
Version details endpoint Minimal VersionNumber enum.
76