Schedule Orders

Optimize orders onto routes in your workspace

A POST request to the /schedules endpoint runs Routific's optimization engine against a workspace and date, assigning orders to routes. This is the programmatic equivalent of pressing the schedule button in the Routific app — the results appear in your workspace, on your routes, for the date you specified.

Scheduling is asynchronous. The POST returns immediately with an actionUuid; you poll a second endpoint to find out when the run has finished and what it produced.

Request URL

📘

Schedule all orders for a date

Passing only a date field in the body triggers the same optimization flow the dispatcher app's Schedule All button does — every unscheduled order on that date, scheduled across all unlocked routes in the workspace

Request Payload

{
    "date": "2025-07-08",
    "orders":
    [
        "6a8e071a-4ee0-470b-982e-b24ed1d1b90c",
        "9b3f2c44-1d7e-4a90-b3c1-8f2e6a91d445"
    ],
    "routes":
    [
        "246612f0-f160-4649-bb16-292ebaa43555"
    ],
    "options":
    {
        "minimizeRoutes": true
    }
}

🚧

One scheduling action per workspace and date at a time

While a run is in flight for a given workspace and date, a second request for that same workspace and date is rejected with 400 SCHEDULE_IN_PROGRESS. You can run a concurrent request for a different date in the same workspace.

FieldsTypeDescription
date (required)DateThe day the route runs, in YYYY-MM-DD format.
ordersString arrayArray of Order UUIDs that you'd like to schedule.
routesString arrayArray of Route UUIDs that you'd like to schedule the Orders into.
optionsObjectOptimization preferences. See below for more information.

Options object

Your workspace's optimization preferences are used by default — the same preferences the Routific app uses. The options object overrides them temporarily for this request, and is not saved back to the workspace.

FieldsTypeDescription
minimizeRoutesBooleanPreference to find solution with fewest vehicles rather than the shortest total working time.
balanceTypeStringPreference for how to balance workload across all routes. Currently accepts none, or orders for no balance prefernce or to balance by number of order across routes, respectively.
flexibleStartTimeBooleanAllow a route to start later than its start time when doing so reduces idle time across the route that may be the result of time-window constraints.
excludeTollsBooleanAvoid toll roads when routing.
excludeFerryBooleanAvoid ferry routes when routing.
squashDurationNumberReduces service duration to the specified value for each consecutive order at the same location.
defaultOrderDurationNumberService duration applied to orders that have no duration of their own.
allowCapacityOverloadBooleanAllow routes to exceed their capacity rather than leaving orders unscheduled.
allowRouteOvertimeBooleanAllow routes to run past their end time rather than leaving orders unscheduled.
allowVisitLatenessBooleanAllow arrival after an order's time window rather than leaving the order unscheduled.

📘

Scheduling is asynchronous

The POST returns 202 Accepted with an actionUuid — it does not return the plan. Poll GET /v1/schedules/{actionUuid} until status is finished or failed.

You can also subscribe to the optimization.completed webhook to be notified rather than polling; the webhook complements polling, it does not replace it.


Response Payload

{
    "actionUuid": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
    "actionName": "schedule",
    "status": "pending"
}

FieldsTypeDescription
actionUuidStringIdentifies this scheduling run request. Use it to poll for status and to fetch the solution.
actionNameStringThe action performed. Always schedule for this endpoint.
statusStringThe status of the run. Always pending on creation. Possible values: pending, finished, failed.