Avoid toll roads
By default, routing doesn't take into account the additional cost of using toll roads. For example, you're likely to take a toll road when going to the Sheremetyevo airport. You can use free roads instead, but that takes longer, which makes the algorithm decide that using free roads is more expensive. However, the courier will have to pay for using the toll road, which may lead to additional expenses.
To avoid the expenses, set options.avoid_tolls
= true
. The algorithm will build routes that avoid toll roads where possible.
Alert
If you plan deliveries to or from locations on toll roads and use options.avoid_tolls
, the algorithm may build a suboptimal route. If you have such deliveries, we recommend setting options.avoid_tolls
= false
.
Example 1.1
A route to the Sheremetyevo airport is built. It follows the M-11 toll road, and the courier has to pay for using it. The route cost doesn't take these expenses into account.
API request (JSON) ⋅ API response ⋅ View on map
Example 1.2
Same as example 1.1 but with the options.avoid_tolls
option. As a result, the route is longer, but it doesn't use toll roads.
API request (JSON) ⋅ API response ⋅ View on map
Example 2.1
The route includes a paid crossing, and the courier has to pay for using it. The route cost doesn't take these expenses into account.
API request (JSON) ⋅ API response ⋅ View on map
Example 2.2
Same as example 2.1 but with the options.avoid_tolls
option. As a result, the route is longer, but it doesn't use the paid crossing.
API request (JSON) ⋅ API response ⋅ View on map