Back to Documentation Overview

Time Windows

In this guide, we will introduce the concept of Time Windows which provides more control on how tasks are assigned and completed.

While requesting a task, we can configure the pick-up or/and drop-off time. During dispatch optimization, the time windows will be treated as constraints that will never be violated. Time Windows are highly configurable and we can set both the earliest and latest time to pick up/drop off a resource. We can also schedule tasks using time windows.


A passenger's meeting is ending at 11 am and has to attend another meeting at 11:30 am.

A vehicle that can complete this task under the defined constraints will be assigned to it. Such a task will not be pooled with another task if it leads to the drop off time being after the drop-off time window.

curl --request POST \
--header "Content-Type: application/json" \
--header "X-Api-Key: $RIDEOS_API_KEY" \
--data '{"taskId":"task-1","fleetId":"fleet-test","taskDefinition":{"pickupDropoffTask":{"uniqueResourcePickup":{"pickupLocation":{"position":{"latitude":37.794682,"longitude":-122.41148}},"uniqueResource":{"requiredCapacities":[{"capacityType":"seats","value":2}],"metadata":{"data":{"rider-name":"Rider test 1","rider-phone":"123-4567","rider-url":""}}}},"dropoff":{"position":{"latitude":37.802372,"longitude":-122.418729}}},"dispatchParameters":{"requiredPickupTimeWindow":{"earliestTime":"2020-08-10T11:00:00Z"},"requiredDropoffTimeWindow":{"latestTime":"2020-08-10T11:30:00Z"}},"requestorId":"rider-1"}}'