RapidAPI logo

Sign Up

Log In

Route Planner Apis

FREEMIUM
By thucnguyen
Updated 3 months ago
Travel
-/10
Popularity Score
-
Latency
-
Success Rate

Route Planner Apis API Documentation

A set of apis to solve common vehicle routing problems including: simple vrp, capacity constrained vrp (cvrp), multiple pickup-delivery cvrp, and others.

View API Details
POSTVehicle Routing Problem Solver
POSTCapacity Constrained VRP Solver
POSTMultiple pickup-delivery vrp solver
POSTHub Selective PDVRP Solver
POSTVehicle Routing Problem Solver

Given a fleet of vehicles, and a list of points with expected route type, find shortest routes within number of available vehicles.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
vrp modelJSON_STRING
REQUIREDvrp input params, including route_type (1N, N1, 1N1), vehicle number and array of stop point coordinates. The first point is the starting location
Request Snippet
unirest.post("https://routeplanner.p.rapidapi.com/vrp")
.header("X-RapidAPI-Host", "routeplanner.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"route_type":"1N","vehicle_nums":4,"points":[[10.9574128,106.84268710000003],[10.9494057,106.81367150000005],[10.9700427,106.8797136],[10.9574128,106.8426871],[10.9687921,106.9012357],[10.986029,106.8675482],[10.9574128,106.8426871],[10.9561302,106.8139787],[10.9574128,106.8426871],[10.9562721,106.8216885],[10.93909,106.8844884],[10.9470024,106.82500500000003],[10.9812869,106.856465]]})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://routeplanner.p.rapidapi.com/vrp")
.header("X-RapidAPI-Host", "routeplanner.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"route_type":"1N","vehicle_nums":4,"points":[[10.9574128,106.84268710000003],[10.9494057,106.81367150000005],[10.9700427,106.8797136],[10.9574128,106.8426871],[10.9687921,106.9012357],[10.986029,106.8675482],[10.9574128,106.8426871],[10.9561302,106.8139787],[10.9574128,106.8426871],[10.9562721,106.8216885],[10.93909,106.8844884],[10.9470024,106.82500500000003],[10.9812869,106.856465]]})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication