Introduction

Eco-Movement PCPR API is an outbound API based on the market standard OCPI protocol. The API makes it easy for consumers to connect with Eco-Movement for retrieving public charge point data for the United Kingdom. This API is organized around the RESTful architecture for web services and returns JSON-encoded response.

Authorization

Each HTTP request must add an ‘Authorization’ header. The following is a sample header:

Authorization: Token IpbJOXxkxOAuKR92z0nEcmVF3Qw09VG7I7d/WCg0koM=

The ‘Token’ literal indicates that the token based authentication mechanism was used. The parameter is a string of printable non-whitespace ASCII characters. The token uniquely identifies a user.

Supported Methods

The supported methods in the request are:

MethodDescription
GETFetch objects or information.

Pagination

The Eco-Movement PCPR API endpoints can return more than 100,000 locations. Hence, pagination is supported.

limit & offset

Use the following two parameters to control the size of the response for locations and tariffs endpoints.

ParameterDescription
limitLimits the number of objects that are returned. The minimum value is 1 and the maximum value is 1000. This parameter is optional and the default value is 1000.
offsetIndicates the number of items to skip. This parameter is optional and the default value is 0 (that is, the first page of the results is only returned).

For example, the maximum amount of locations that can be returned in the result is 1000. In the result's header, a link to the following 1000 locations is given. The following is an example of a link in the result's header:

<https://open-chargepoints.com/api/ocpi/cpo/2.2.1/locations/?offset=1000&limit=1000>; rel=”next”

Status Codes

Eco-Movement PCPR API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 1xxx range indicate success. Codes in the 2xxx range indicate client errors (for example, a required parameter was omitted or a resource was missing). Codes in the 3xxx range indicate a server error or an entry that cannot be processed.