Avoid tolls on the route
Products Used: Directions API & Navigation API
Use the avoid
feature in the routing APIs to ensure that your trucks are not taking the roads with tolls on them. This can help save both time and money when traveling to your destination. Depending on the information needed, users can use this feature either in NextBillion.ai’s Directions API to get desired route directions along with ETA and distance information, or they can also use Navigation API to get turn-by-turn navigation instructions as well along with other information about the route.
Following is a sample Directions API request with following parameters:
-
A pair of
origin
&destination
locations -
mode
option set totruck
-
avoid
option set totoll
Directions API request
Directions API response
To verify the impact of the avoid feature, you can create another request without the avoid
feature and check the route suggested.
Navigation API request
Let’s take a look at how a Navigation API call would look like for the exact same parameters as the above example.
Navigation API response:
Notice that this API only responds with the turn-by-turn navigation instructions along with ETA and distance information for a route taken while avoiding roads with tolls.
Visit product documentation (Directions API | Navigation API) to know more about the available features