Technical details OCPI API

On this page you can find a summary of the possibilities of the outbound OCPI API.

Token

In order to call the api of Eco-Movement you have to request a Token.
Each HTTP request must add a ‘Authorization’ header. The header looks as follows:

Authorization: Token IpbJOXxkxOAuKR92z0nExampleVG7I7d/WCg0koM=

With this token the following modules can be requested.

Versions module

Eco-Movement supports the latest version of OCPI. The available modules can be retrieved with the following endpoint: https://api.eco-movement.com/api/ocpi/cpo/versions/

Credentials module

This module is used to a establish a connection between two servers. After the connection has been made, Eco-Movement will be able to send realtime status updates by PATCH requests.

Locations module

The locations module can be used to retrieve charge locations with a GET request.

Supported parameters location module

The locations modules supports the following parameters (not required):

date_from – Only return Locations that have last_updated after this Date/Time.
date_to – Only return Locations that have last_updated before this Date/Time.
ofset – The offset of the first object returned. Default is 0. Maximum number of objects to GET.
limit – The endpoint returns a list of Location objects
{location id} – The endpoint returns a specific location with evses and connectors
{location_id}/{evse_uid} – The endpoint returns a specific evse and connectors
{location_id}/{evse_uid}/{connector_id} – The endpoint returns a specific connector

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

{date_from} and/or {date_to} are using the combined date and time format from the ISO 8601 standard. All timestamps shall be in UTC.
Examples:

2018-06-29T20:39:09Z
2018-12-29T17:15:09

Parameters Examples

/ocpi/cpo/2.1.1/locations/?date_from=xxx&date_to=yyy
/ocpi/cpo/2.1.1/locations/?offset=50
/ocpi/cpo/2.1.1/locations/?limit=100
/ocpi/cpo/2.1.1/locations/?offset=50&limit=100
/ocpi/cpo/2.1.1/locations/c6b06c12-84ff-11e8-8774-42010aa40002 – request of a location with {location id}
/ocpi/cpo/2.1.1/locations/c6b06c12-84ff-11e8-8774-42010aa40002/1335190*1 – request of a location with {location id}/{evse_uid}
/ocpi/cpo/2.1.1/locations/c6b06c12-84ff-11e8-8774-42010aa40002/1335190*1/3 – request of a location with {location id}/{evse_uid}{connector_id}

Pagination of locations request

The locations module result comes with pagination, this allows 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.

Pagination Examples

Example of the OCPI pagination link header:

Link: <https://api.eco-movement.com/ocpi/cpo/2.1.1./locations/?offset=150&limit=50>; rel=”next”

After the client has called the given “next” page URL above the Link parameter will most likely look like this:

Link: <https://api.eco-movement.com/ocpi/cpo/2.1.1./locations/?offset=200&limit=50>; rel=”next”

Data explanation

The charge point data of Eco-Movmenent consists of three objects.

1. Location – A location is a group of one or more EVSEs that belong together geographically. A Location is typically the exact location of one or more EVSEs, but it can also be the entrance of a parking garage.
2. EVSE – An 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.
3. Connector – A connector is a specific socket or cable available for the EV to make use of.

An exact description of all provided fields and possible values will be provided by Eco-Movement when a Token is requested.
Down below an example of a possible result of a data request is given.

Data example

{
    "timestamp": "2018-07-17T15:19:15",
    "status_code": 1000,
    "status_message": "Success",
    "data": [
        {
            "id": "d617b9b2-8dff-11e8-b71e-42210aa40002",
            "type": "PARKING_GARAGE",
            "address": "Mediapark 1",
            "city": "Hilversum",
            "postal_code": "2566 AB",
            "country": "NLD",
            "coordinates": {
                "latitude": "52.109398",
                "longitude": "4.288963"
            },
            "opening_times": {
                "twentyfourseven": true
            },
            "last_updated": "2018-07-17T01:00:36Z",
            "evses": [
                {
                    "uid": "17034583*1",
                    "status": "AVAILABLE",
                    "capabilities": [
                        "REMOTE_START_STOP_CAPABLE",
                        "RFID_READER"
                    ],
                    "connectors": [
                        {
                            "id": "1",
                            "standard": "IEC_62196_T2",
                            "format": "SOCKET",
                            "power_type": "AC_3_PHASE",
                            "voltage": 230,
                            "amperage": 16,
                            "last_updated": "2018-07-17T01:00:36Z"
                        }
                    ],
                    "last_updated": "2018-07-17T01:00:36Z",
                    "physical_reference": "The New Motion 1234",
                    "evse_id": "NLTNM1703943*1",
                    "parking_restrictions": [
                        "EV_ONLY"
                    ]
                },
                {
                    "uid": "1703983*2",
                    "status": "AVAILABLE",
                    "capabilities": [
                        "REMOTE_START_STOP_CAPABLE",
                        "RFID_READER"
                    ],
                    "connectors": [
                        {
                            "id": "2",
                            "standard": "IEC_62196_T2",
                            "format": "SOCKET",
                            "power_type": "AC_3_PHASE",
                            "voltage": 230,
                            "amperage": 16,
                            "last_updated": "2018-07-17T01:00:36Z"
                        }
                    ],
                    "last_updated": "2018-07-17T01:00:36Z",
                    "physical_reference": "GDH725 E2324",
                    "evse_id": "NLLMSE1703983*2",
                    "parking_restrictions": [
                        "EV_ONLY"
                    ]
                }
            ],
            "name": "Ecotap GDH725",
            "operator": {
                "name": "The New Motion",
                "website": "http://www.thenewmotion.com"
            },
            "owner": {
                "name": "The New Motion",
                "website": "http://www.thenewmotion.com"
            },
            "time_zone": "Europe/Amsterdam",
            "charging_when_closed": false
        }
    ]
}

Extra Feature

In addition to the OCPI standard, Eco-Movement has developed a number of extra features that can be activated on request. More information can be found on the extra features page.

More information

For more detailed information you can download the complete OCPI protocol documentation.
Download OCPI documentation version 2.1.1 RC1