Truck Routes with Multiple Stops
Products Used: Directions API & Navigation API
NextBillion.ai’s APIs allows you to add multiple stops, called waypoints
, on the way to the destination that your truck is heading for. Depending on the type of request, the routing engine will either suggest routes covering all the stops specified or provide a route along with turn-by-turn instructions for easy navigation. Use the waypoints
parameter in the routing APIs to add multiple stops for your trip.
Let’s take a look at the following sample request with
-
A pair of
origin
&destination
locations -
mode
option set totruck
. -
waypoints
parameter containing coordinates for 3 stops before thedestination
Directions API request
Directions API response
Observe that all the stops are covered by the route on the way to destination.
Navigation API request
In order to navigate easily from one stop to another, user can get turn-by-turn restrictions as well through a Navigation API request:
Navigation API response:
Visit product documentation (Directions API | Navigation API) to know more about the available features