Type: Configuration Module
This is the required base module of OCPI. This module is the starting point for any OCPI connection. Via this module, clients can learn which versions of OCPI a server supports, and which modules it supports for each of the versions.
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.
Endpoint structure definition:
No structure defined. This is open for every party to define themselves.
Examples:
https://www.server.com/ocpi/cpo/versions
https://www.server.com/ocpi/emsp/versions
https://ocpi.server.com/versions
The exact URL to the implemented version endpoint should be given (offline) to parties that want to communicate with your OCPI implementation.
Both, CPOs and eMSPs MUST implement such a version endpoint.
Method | Description |
---|---|
GET |
Fetch information about the supported versions. |
Property | Type | Card. | Description |
---|---|---|---|
versions |
+ |
A list of supported OCPI versions. |
Property | Type | Card. | Description |
---|---|---|---|
version |
1 |
The version number. |
|
url |
1 |
URL to the endpoint containing version specific information. |
Via the version details, the parties can exchange which modules are implemented for a specific version of OCPI, which interface role is implemented, and what the endpoint URL is for this interface.
Parties that are both CPO and eMSP (or a Hub) can implement one version endpoint that covers both roles. With the information that is available in the version details, parties don’t need to implement a separate endpoint per role (CPO or eMSP) anymore. In practice this means that when a company is both a CPO and an eMSP and it connects to another party that implements both interfaces, only one OCPI connection is needed.
Note
|
OCPI 2.2 introduces the role field in the version details. Older versions of OCPI do not support this. |
Endpoint structure definition:
No structure defined. This is open for every party to define themselves.
Examples:
https://www.server.com/ocpi/cpo/2.2
https://www.server.com/ocpi/emsp/2.2
https://ocpi.server.com/2.2/details
This endpoint lists the supported endpoints and their URLs for a specific OCPI version. To notify the other party that the list of endpoints of your current version has changed, you can send a PUT request to the corresponding credentials endpoint (see the credentials chapter).
Both the CPO and the eMSP MUST implement this endpoint.
Method | Description |
---|---|
GET |
Fetch information about the supported endpoints for this version. |
Property | Type | Card. | Description |
---|---|---|---|
version |
1 |
The version number. |
|
endpoints |
+ |
A list of supported endpoints for this version. |
Property | Type | Card. | Description |
---|---|---|---|
identifier |
1 |
Endpoint identifier. |
|
role |
1 |
Interface role this endpoint implements. |
|
url |
1 |
URL to the endpoint. |
Note
|
for the credentials module, the role is not relevant as this module is the same for all roles.
|
Value | Description |
---|---|
SENDER |
Sender Interface implementation, interface implemented by the owner of data, so the Receiver can Pull information from the data Sender/owner. |
RECEIVER |
Receiver Interface implementation, interface implemented by the receiver of data, so the Sender/owner can Push information to the Receiver. |
The Module identifiers for each endpoint are described 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 there are dependencies between modules, it will be mentioned in the affected module description.
Module | ModuleID | Remark |
---|---|---|
cdrs |
||
chargingprofiles |
||
commands |
||
credentials |
Required for all implementations. |
|
hubclientinfo |
||
locations |
||
sessions |
||
tariffs |
||
tokens |
List of known versions.
Value | Description |
---|---|
2.0 |
OCPI version 2.0 |
2.1 |
OCPI version 2.1 (DEPRECATED, do not use, use 2.1.1 instead) |
2.1.1 |
OCPI version 2.1.1 |
2.2 |
OCPI version 2.2 (this version) |
Parties are allowed to create custom modules or customized versions of the existing modules. To do so, 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. It is advised to use a prefix (e.g. 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
Fetch information about the supported endpoints and their URLs for this OCPI version.
Simple version details example: CPO with only 2 modules.
link:examples/version_details_example.json[role=include]
Simple version details example: party with both CPO and eMSP with only 2 modules.
In this case the credentials
module is not defined twice as this module is the same for all roles.
link:examples/version_details_example2.json[role=include]