Loading when ready
When planning routes, it's often necessary to calculate the total loading time of orders at the depot correctly. Different scenarios are possible: in some cases, you can begin loading orders to the vehicle only after all orders are ready. In other cases, you can begin right after each specific order is ready (even if the other orders aren't ready yet), because this reduces the waiting time.
You can use the options.load_when_ready
option to control this behavior. Its default value is false
, meaning that the courier waits for all orders to be collected first, and then starts loading them into the vehicle.
If the courier has to begin loading as soon as each order is ready, specify the following:
-
options.load_when_ready
=true
. -
Order ready time in
location.depot_ready_time
. -
Load handling time in
location.depot_duration_s
.
Example 1
There are 5 orders at the depot. The first order is ready at 8:00, the second at 8:15, and there are 15-minute intervals between the rest. Each order takes 10 minutes to load. The load_when_ready
field value is set to false
by default, so the courier starts loading at 9:00 and finishes at 9:50.
API request (JSON) ⋅ API response ⋅ View on map
Example 2
The same data, but load_when_ready
= true
. Because of that, the courier finishes loading at 9:10 (the last order's ready time is 9:00 + 10 minutes to load = 9:10). The wait is reduced by 40 minutes.
API request (JSON) ⋅ API response ⋅ View on map