Getting Started

Introduction

Eco-Movement Data API is an outbound API based on the market standard OCPI protocol, which makes it easy to connect with Eco-Movement. This API is organized around the RESTful architecture for web services and returns JSON-encoded responses.

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:

Method

Description

GET

Fetch objects or information.

POST

Create new objects or information.

PUT

Update existing objects or information.

PATCH

Partially update existing objects or information.

Pagination

The Eco-Movement Data API endpoints can return more than 100,000 locations. Hence, pagination is supported. Use the following two parameters to control the size of the response.

Parameter

Description

limit

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

offset

Indicates 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://api.eco-movement.com/ocpi/cpo/2.1.1./locations/?offset=1000&limit=2000>; rel=”next”

Status Codes

Eco-Movement Data 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.

Every error includes a human-readable message. For example:

{
  "status_code": 2001,
  "status_message": "evse_id EVSE_ID is not valid",
  "timestamp": "2022-07-12T09:34:35"
}