Driver start and end
A Driver's schedule and locations are set on the Driver, not on each
Job. For a single-day request you give shift_start, shift_end,
start, and optionally end. For several days, replace the two shift
times with multi_shift — see Multi-Shift.
Shift hours¶
shift_start and shift_end are the earliest the Driver may begin and
the latest they may finish, as a 24-hour clock. You can send a decimal
hour (8, 8.5, 17) or a time string ("08:00", "08:30").
The Driver cannot serve a Job or be driving outside this window. A Job that cannot fit inside any Driver's shift is unserved.
{
"uid": "driver_1",
"start": {"lat": -33.867798, "lon": 151.166256},
"shift_start": 8,
"shift_end": 17
}
shift_start and shift_end belong on a single-day Driver only. Do
not send them together with multi_shift. If any Driver uses
multi_shift, every Driver must — each Shift then has its own
shift_start / shift_end as a planning time (day + time).
Start and end location¶
start(required): starting depot / home locationend(optional): one of"start"(default) – route returns to the start location"anywhere"– route finishes at the last served job (Driver doesn't return to depot)- a
Locationobject – route must finish at that fixed location
Note
End at Start¶
Setting "end": "start" tends to create "loop" shaped routes where the driver visits some jobs on the way out from the depot and some jobs on the way back.
The last job in the route will often be close to the depot. The optimiser considers that the driver needs to drive back to the depot anyway, so there's no reason not to make some of its stops on the way.
End Anywhere¶
Setting "end": "anywhere" tends to lead to the furthest Jobs being served at the end of the route. It often leads to jobs being visited earlier on average, since the driver doesn't need to target a specific end location.
End Location¶
Useful when the driver ends their day at home, and you want to plan their route so they end close to it.
Backwards Compatibility¶
Legacy fields location, end_location, and end_anywhere are still accepted but deprecated. Prefer the unified fields:
| Legacy | Replacement |
|---|---|
location |
start |
end_location |
end (Location) |
end_anywhere: true |
end: "anywhere" |
Supplying both new and legacy start or end fields (e.g., start plus location, or end plus end_anywhere) triggers a validation error.
Examples¶
End at Start (default):
{
"drivers": [
{
"uid": "driver_1",
"shift_start": 8,
"shift_end": 17,
"start": {"lat": -33.867798, "lon": 151.166256},
"end": "start"
}
],
"jobs": [],
"settings": {}
}
End Anywhere (finish at last job):
{
"drivers": [
{
"uid": "driver_1",
"shift_start": 8,
"shift_end": 17,
"start": {"lat": -33.867798, "lon": 151.166256},
"end": "anywhere"
}
],
"jobs": [],
"settings": {}
}
Fixed End Location (finish at a specific place):