Dashboard API Documentation

Introduction

ElasticRoute is served on via HTTP REST API, allowing you to integrate other systems with ElasticRoute easily. This page aims to explain how to use our API to plan your routes.

Any program capable of sending HTTP requests and parsing JSON is able to interact with our API.

Requests created through the following API will interact with your ElasticRoute dashboard.

API Key

This section is regarding the generation of the Application Programming Interface (API) Key.

  1. Click on the Settings at the top right hand corner.
  2. In the drop-down, click on Your Settings.
  3. Click on API.
  4. Provide a Token Name.
  5. A new window will appear with the API Key.
    Keep it somewhere safe, as it will only be displayed once. If you lose this token, you will have to generate a new one.

Headers

You will need to set the following HTTP headers in all the API calls made to us:

1. Set HTTP header ‘Content-Type‘ to ‘application/json‘.

Content-Type: application/json

2. Set Custom HTTP header ‘Authorization‘ with your ElasticRoute API key.

Authorization: Bearer {YOUR_API_KEY}

Example:
Content-Type: application/json
Authorization: Bearer y05p5DOXcRAr3ZmaJflWpoNJacSIReWpOq9Hzy6UZKf3hXM3HrrOaHqqg72F

API Section

The API is being divided into 4 main sections.

API Description
Section Description
Vehicles For performing the Create, Read, Update and Delete (CRUD) of vehicles.
Stops For performing the Create, Read, Update and Delete (CRUD) of stops.
Stops Planning For starting or stopping the planning of your stops.
Time Windows For performing the Create Read, Update and Delete (CRUD) of Time Windows.

Vehicles

This section is for performing the Create, Read, Update and Delete (CRUD) of vehicles, corresponding to Settings > Vehicles of your ElasticRoute account.

Stops

This section is for performing the Create, Read, Update and Delete (CRUD) of stops.

Stops Planning

This section is for starting and stopping the planning process.

Base URL: https://app.elasticroute.com/api/v1/account/{endpoint}
Format of {date}: “YYYY-MM-DD" e.g. 2019-10-01

List Of Endpoints
Method {endpoint} Example Description
POST stops/{date}/plan https://app.elasticroute.com/api/v1/account/stops/2019-10-01/plan To start the planning process.
POST stops/{date}/plan/stop https://app.elasticroute.com/api/v1/account/stops/2019-10-01/plan/stop To stop the planning process.
(Valid only if there is a planning in progress.)
GET stops/{date}/plan/status https://app.elasticroute.com/api/v1/account/stops/2019-10-01/plan/status To check the progress of the plan.

Time Windows

This section is for performing the Create, Read, Update and Delete (CRUD) of Time Windows.

Logs

This section is for users to retrieve the logs in ElasticRoute for debugging purposes.
Kindly note that the logs will be cleared after 14 days.

  1. Click on the profile icon at the top right corner.
  2. A drop-down will appear.
  3. Click on API Request Logs.

Posting Planned Results To A Target URL

If you wish to POST the planned results to a target URL after planning, kindly perform the following steps.

  1. Navigate to Settings > General.
  2. Scroll down to the Webhook section and enter your target URL into the Webhook URL field.
  3. Click Save when done.

Thereafter, after performing planning your stops, click on the Export button > Post to target URL to have the planned results sent over to your URL.