This feature lets you specify the maximum time your shipments can be in your vehicle (from pickup to delivery). It is an important feature when it comes to transporting passengers and perishable goods. You can specify the max time by adding max_time_in_vehicle tag to your shipments as illustrated in the following example:
{
"vehicles": [
{
"vehicle_id": "v1",
"start_address": {
"location_id": "13.391321_52.543129",
"lon": 13.391321,
"lat": 52.543129
},
"return_to_depot": false
},
{
"vehicle_id": "v2",
"start_address": {
"location_id": "13.440102_52.558179",
"lon": 13.440102,
"lat": 52.558179
},
"return_to_depot": false
}
],
"shipments": [
{
"id": "1",
"name": "1",
"pickup": {
"address": {
"location_id": "13.420152_52.558897",
"lon": 13.420152,
"lat": 52.558897
}
},
"delivery": {
"address": {
"location_id": "13.452596_52.522983",
"lon": 13.452596,
"lat": 52.522983
}
},
"max_time_in_vehicle": 900
},
{
"id": "2",
"name": "2",
"pickup": {
"address": {
"location_id": "13.399381_52.564819",
"lon": 13.399381,
"lat": 52.564819
}
},
"delivery": {
"address": {
"location_id": "13.473367_52.521599",
"lon": 13.473367,
"lat": 52.521599
}
},
"max_time_in_vehicle": 1200
},
{
"id": "3",
"name": "3",
"pickup": {
"address": {
"location_id": "13.411434_52.552021",
"lon": 13.411434,
"lat": 52.552021
}
},
"delivery": {
"address": {
"location_id": "13.484219_52.530330",
"lon": 13.484219,
"lat": 52.53033
}
},
"max_time_in_vehicle": 1200
}
]
}
âmax_time_in_vehicleâ should be greater than (direct_travel_time(pickup,delivery) + preparation_time(delivery)). Note that this is still a beta feature and might be changed.