Skip to content
Documentation Menu

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.

<div><!-- ---------------------------------------------------------------------------- --></div>

MethodDescription
GETFetch information about the supported versions.
<div><!-- ---------------------------------------------------------------------------- --></div>

Data

<div><!-- ---------------------------------------------------------------------------- --></div>

TypeCard.Description
Version+A list of supported OCPI versions.
<div><!-- ---------------------------------------------------------------------------- --></div>

Version class

<div><!-- ---------------------------------------------------------------------------- --></div>

PropertyTypeCard.Description
versionVersionNumber1The version number.
urlURL1URL to the endpoint containing version specific information.
<div><!-- ---------------------------------------------------------------------------- --></div>

GET

Fetch all supported OCPI versions of this CPO or eMSP.

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/"
    }
]

Version details endpoint

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.

<div><!-- ---------------------------------------------------------------------------- --></div>

MethodDescription
GETFetch information about the supported endpoints for this version.
<div><!-- ---------------------------------------------------------------------------- --></div>

Data

<div><!-- ---------------------------------------------------------------------------- --></div>

PropertyTypeCard.Description
versionVersionNumber1The version number.
endpointsEndpoint+A list of supported endpoints for this version.
<div><!-- ---------------------------------------------------------------------------- --></div>

Endpoint class

<div><!-- ---------------------------------------------------------------------------- --></div>

PropertyTypeCard.Description
identifierModuleID1Endpoint identifier.
urlURL1URL to the endpoint.
<div><!-- ---------------------------------------------------------------------------- --></div>

ModuleID enum

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.

<div><!-- ------------------------------------------------------------------------------------------------------------------------------------------------------ --></div>

ModuleModuleIDRemark
CDRscdrs 
Commandscommands 
Credentials & registrationcredentialsRequired for all implementations
Locationslocations 
Sessionssessions 
Tariffstariffs 
Tokenstokens 
<div><!-- ----------------------------------------------------------------------------------------------------------------------------------------------------- --></div>

VersionNumber enum

List of known versions.

<div><!-- ---------------------------------------------------------------------------- --></div>

ValueDescription
2.0OCPI version 2.0.
2.1OCPI version 2.1. (DEPRECATED, do not use, use 2.1.1 instead)
2.1.1OCPI version 2.1.1. (this version)
<div><!-- ---------------------------------------------------------------------------- --></div>

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. 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

GET

Fetch information about the supported endpoints and their URLs for this version.

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/"
        }
    ]
}

Schema & Examples

Below are the JSON Schemas and example payloads for this module, embedded inline.

Schemas

Version detail object
Version list response envelope
Version detail response envelope

Examples

GET /versions/ response
GET /versions/version}/ response