Back to top

Travoid API Documentation

Travoid speed-suggestions API suggest the optimum driving speed for each stretch of your navigation route taking into consideration the current and future traffic to avoid every possible traffic congestions by adjusting the speed beforehand.

Travoid travel-time API (BetterETA) computes the minimum travel time required to visit a set of waypoints, considering the traffic, start time, and wait time at the stops, along with the travel time of each leg.

Requesting an Auth Token

  • Log on to api.travoid.io and create an account.

  • Log-in to your account and click on the Request token button on the accounts tab

  • We will assign you an auth token once your account is verified.

  • Log-in to the dashboard after you receive an email confirmation to get your auth token.

Resource Group

Get Speed Suggestion

Get Speed suggestions
GET/api/getspeedsuggestions/?auth_token={authorization_token}&origin={origin_lat_long}&destination={destination_lat_long}&start_time={start_time}

The scenario involves getting the optimum driving speed between two locations.

Since we are in the Alpha stage, we have limited the amount of requests to 1000 requests per month.

Example URI

GET /api/getspeedsuggestions/?auth_token=Ad64258f1ca049d623902bd1e5cef7f6f8df6ac53&origin=gps_coordinate&destination=gps_coordinate&start_time=1528290000
URI Parameters
HideShow
authorization_token
string (required) Example: Ad64258f1ca049d623902bd1e5cef7f6f8df6ac53

Authorization token provided by travoid to authorize the request.

origin_lat_long
string (required) Example: gps_coordinate

The latitude and longitude of the starting point of the route separated by coma(,).

destination_lat_long
string (required) Example: gps_coordinate

The latitude and longitude of the ending point of the route separated by coma(,).

start_time
string (optional) Example: 1528290000

Starting time mentioned as time stamp.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "speeds": [
    {
      "speed": 40,
      "distance": 168
    },
    {
      "speed": 30,
      "distance": 673
    },
    {
      "speed": 35,
      "distance": 607
    },
    {
      "speed": 30,
      "distance": 3571
    },
    {
      "speed": 35,
      "distance": 1138
    },
    {
      "speed": 45,
      "distance": 169
    }
  ]
}
Schema
{
   "speeds":{
        "type": "array",
        "description": "The speed sugestions for the travel."
        "items": {
            "speed": {
            "type": "integer",
            "description": "The speed at which to travel in kmph."
            },
            "distance": {
            "type": "integer",
            "description": "The distance to travel at the mentioned speed in meters."
            }
        }
   }
}

Get Travel Time

Get Travel Time
GET/api/gettraveltime/?auth_token={authorization_token}&waypoints={list_of_waypoints}&start_time={start_time}&wait_time={wait_time}&waypoint_names=wp1|wp2|wp3

The scenario involves getting the total travel time through multiple way points, considering the wait time at each point and also the traffic conditions.

Since we are in the Alpha stage, we have limited the amount of requests to 1000 requests per month, and 10 waypoints per request.

Example URI

GET /api/gettraveltime/?auth_token=Ad64258f1ca049d623902bd1e5cef7f6f8df6ac53&waypoints=41.86538,&start_time=1528290000&wait_time=15&waypoint_names=wp1%7Cwp2%7Cwp3
URI Parameters
HideShow
authorization_token
string (required) Example: Ad64258f1ca049d623902bd1e5cef7f6f8df6ac53

Authorization token provided by travoid to authorize the request.

list_of_waypoints
string (required) Example: 41.86538,

87.61950 (required) - List of waypoints in the format lat and long separated by a comma (,) and each waypoints separated by a pipe symbol (|).

start_time
string (required) Example: 1528290000

Starting time mentioned as time stamp.

wait_time
string (required) Example: 15

Wait time at each waypoint in minutes.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "legs": [
    {
      "distance": "6231 meters",
      "duration": "5 mins"
    },
    {
      "distance": "8778 meters",
      "duration": "8 mins"
    },
    {
      "distance": "8104 meters",
      "duration": "7 mins"
    }
  ],
  "total_time": "95 mins"
}
Schema
{
    "legs": {
        "type": "array",
        "description": "The details of each leg of the route.",
        "items": {
            "distance":  {
                "type": "string",
                "description": "Distance of the leg in meters"
            },
            "duration":  {
                "type": "string",
                "description": "Travel time of the leg in minutes"
            }
        }
    }
    "total_time": {
        "type": "string",
        "description": "Total time needed to visit all the waypoints considering the traffic and the wait time at each waypoints."
    }
}

Get Best Start Time

Get Best Start Time
GET/api/getbeststarttime/?auth_token={authorization_token}&origin={origin_lat_long}&destination={destination_lat_long}

The scenario involves getting the best time to start the trip from the source to reach the destination to avoid possible traffic congestion and thereby improving the fuel efficiency.

Since we are in the Alpha stage, we have limited the amount of requests to 1000 requests per month.

Example URI

GET /api/getbeststarttime/?auth_token=Ad64258f1ca049d623902bd1e5cef7f6f8df6ac53&origin=gps_coordinate&destination=gps_coordinate
URI Parameters
HideShow
authorization_token
string (required) Example: Ad64258f1ca049d623902bd1e5cef7f6f8df6ac53

Authorization token provided by travoid to authorize the request.

origin_lat_long
string (required) Example: gps_coordinate

The latitude and longitude of the starting point of the route separated by coma(,).

destination_lat_long
string (required) Example: gps_coordinate

The latitude and longitude of the ending point of the route separated by coma(,).

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "routes": [
    {
      "departure_time": "10 mins",
      "efficiency": "+12 %",
      "distance": "17.4 km",
      "travel_time": "23 mins"
    }
  ]
}
Schema
{
  "routes": {
    "type": "array",
    "description": "The list of navigation options and their corresponding efficiencies.",
    "items": {
      "departure_time": {
        "type": "string",
        "description": "Time to wait before leaving in minutes"
      },
      "efficiency": {
        "type": "string",
        "description": "The percentage of fuel that could be saved."
      },
      "distance": {
        "type": "string",
        "description": "The distance of the route."
      },
      "travel_time": {
        "type": "string",
        "description": "The travel time of the route."
      }
    }
  }
}

Generated by aglio on 08 Aug 2018