Back to Documentation Overview

Servicing Drop-off

The Dispatch API and Fleet Planner API allow you to define the time it takes to service a pick-up and/or drop-off. For example, it takes an average of 2 minutes to load the box at the pick-up location and then unload it at the drop-off location. This is taken into consideration when assigning vehicles and optimizing the fleet.

Dispatch API

When creating a fleet using the Fleet API, we can set the expected service time of the pick-up and drop-off denoted by expectedPickupServiceTimeDuration and expectedDropoffServiceTimeDuration. Both fields are in seconds. This setting is on a fleet level and will be taken into account when assigning vehicles to a task.

Fleet Planner API

The expected service time expectedServicingPickupDuration and expectedServicingDropoffDuration are sent in the Fleet Planner's request along with includeServicingPickupStepInPlan and includeServicingDropoffStepInPlan set to true, respectively.

In the response’s plan recommendation for each vehicle, there will be a servicingPickup and servicingDropoff step which has a remainingDuration for the duration left to service the dropoff. When you call Fleet Planner again, you must ensure that each vehicle has an updated remainingDuration if it is in the midst of servicing a dropoff. If you are not currently servicing a dropoff, you do not need to update remainingDuration.

All the fields expectedServicingPickupDuration, expectedServicingDropoffDuration, and remainingDuration are in seconds.

Let’s say that rider1 has an expectedServicingDropoffDuration of 5 minutes and vehicle1 is currently servicing rider1’s dropoff. You will receive a plan recommendation for vehicle1 that is servicing rider1 with a remainingDuration of 5 minutes. If you call Fleet Planner for an updated plan 1 minute later, you must ensure that vehicle1 in the request has an updated remainingDuration of 4 minutes.