-> How to define alternative end location addresses


Our service offers three different options where a driver can end the tour at the end of the day:

  • The driver returns to the depot after the last stop.
  • The driver ends the tour at the last stop of the tour.
  • The driver ends the tour at any end address.

How can the different scenarios be configured?

The end location of the driver can be configured in a hierarchical manner. It can be defined globally for all vehicles whether they should return to the depot or not by setting the following query parameter:

  • roundtrip= true -> vehicle returns to depot
  • roundtrip= false -> vehicle ends at last stop

To be more detailed the behavior can also be controlled on a vehicle type or vehicle level using the same parameter.

How can I define an alternative end address?

Variant 1: The vehicles are passed for each optimization in the request

To let the vehicle end at an alternative end address, the following field must be passed analogous to the definition of the depot address:

"end_location": {  
               "street": "Elsenheimerstrasse",  
               "housenumber": "45",  
               "postalcode": "80687",  
               "city": "Munich"  

The specified end address overwrites the roundtrip parameter.

Variant 2: The vehicles are maintained in the Smartlane system

If the fleet is managed in the Smartlane database, the end address must be defined when the vehicle is newly created or alternatively set by a PATCH on the existing vehicle. The end address definition is similar to that of variant 1. A detailed description of the corresponding endpoints can be found in the API reference.