Plans

Dispatch a Plan

Dispatch every undispatched route on a plan. Each route is flagged as dispatched, its orders move to ROUTED, customer tracking portals are minted, superseded notification tasks are cancelled (with SMS credit refunded), planned-start notifications are scheduled, and each route is pushed to its assigned driver's app. Once every route on the plan is dispatched, the plan is marked dispatched and a plans.dispatched webhook is published.

As with GET and DELETE /plans/{id}, the id may be a plan id or the id of that plan's active solution. A solution id that is not the plan's active solution is rejected with 400.

Routes already dispatched individually are skipped and the rest are dispatched — routes in the response lists only the routes this call dispatched. A plan still being optimised is rejected with 400.

Dispatch is synchronous and can take up to two minutes: the response is returned only once every side effect has run (order statuses, customer tracking portals, notification scheduling and SMS credit refunds, driver push, external-system export). A 200 means the dispatch is live — there is nothing to poll.

The request takes no body. Dispatch is as-planned: no vehicle, driver or date override, and no re-optimisation.

Dispatch is not idempotent and not reversible. A repeat call answers 409 ALREADY_DISPATCHED, and there is no endpoint to undispatch. If the call times out (503), re-post it: a 409 means the first attempt succeeded.

post/plans/{id}/dispatch

Request

  • Base URL: https://api.smartroutes.io/v2
  • URL: https://api.smartroutes.io/v2/plans/{id}/dispatch
  • Auth: none declared

Path parameters

idinteger required
Example:9001

ID of the plan to dispatch. The id of the plan's active solution is also accepted.

Response

The plan's routes are dispatched.

Changes

No recorded changes to this operation across all 1 revision of this API.