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 version of OCPI that have been implemented.
Both the CPO and the eMSP must have this endpoint.
Method | Description |
---|---|
GET | Fetch information about the supported versions. |
Property | Type | Card. | Description |
---|---|---|---|
versions | Version | + | A list of supported OCPI versions. |
Property | Type | Card. | Description |
---|---|---|---|
version | VersionNumber | 1 | The version number. |
url | URL | 1 | URL to the endpoint containing version specific information. |
Fetch all supported OCPI versions of this CPO or eMSP.
[
{
"version": "2.1.1",
"url": "https://example.com/ocpi/cpo/2.1.1/"
},
{
"version": "2.0",
"url": "https://example.com/ocpi/cpo/2.0/"
}
]
Example: /ocpi/cpo/2.0/
and /ocpi/emsp/2.0/
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 have this endpoint.
Method | Description |
---|---|
GET | Fetch information about the supported endpoints for this version. |
Property | Type | Card. | Description |
---|---|---|---|
version | VersionNumber | 1 | The version number. |
endpoints | Endpoint | + | A list of supported endpoints for this version. |
Property | Type | Card. | Description |
---|---|---|---|
identifier | ModuleID | 1 | Endpoint identifier. |
url | URL | 1 | URL to the endpoint. |
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.
Module | ModuleID | Remark |
---|---|---|
CDRs | cdrs | |
Commands | commands | |
Credentials & registration | credentials | Required for all implementations |
Locations | locations | |
Sessions | sessions | |
Tariffs | tariffs | |
Tokens | 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. (this version) |
Parties are allowed to create custom modules or customized version of the existing modules. For this the ModuleID enum can be extended with additional custom moduleIDs. These custom moduleIDs MAY only be send 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 that they understand the custom moduleIDs. 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
Fetch information about the supported endpoints and their URLs for this version.
{
"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/"
}
]
}