---
title: "Dispatch a Route"
method: POST
path: "/routes/{id}/dispatch"
tags: ["Routes"]
---

# Dispatch a Route

`POST /routes/{id}/dispatch`

## Request

- Base URL: `https://api.smartroutes.io/v2`
- URL: `https://api.smartroutes.io/v2/routes/{id}/dispatch`
- Auth: none declared

Dispatch a single optimised route. The 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 the route is pushed to the assigned driver's app.

The route must have a vehicle assigned — a route whose vehicle was unassigned after planning is rejected with `400`. A [`routes.dispatched`](#tag/Webhooks/operation/routes.dispatched) webhook is published for the route. If this route is the last undispatched route on its plan, the plan itself becomes dispatched and a [`plans.dispatched`](#tag/Webhooks/operation/plans.dispatched) webhook is published.

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.

## Path parameters

- `id` integer, required

## Response `200`

The route is dispatched.

- object
  - `route` object
    - `id` integer: ID of the dispatched route.
    - `dispatched` boolean: Always `true` on a 200 — the route is now live.

## Other responses

- `400`: Invalid input. The request body failed validation.
- `403`: Forbidden. Returned for rate-limit exhaustion (`name = FORBIDDEN`, with `details.retry_after_seconds` and `Retry-After` header) and permission gate failures (`name = PERMISSION`). Inspect `name` to disambiguate. Send `x-sr-api-features: rate-limit-429` to receive `429 RATE_LIMIT_EXCEEDED` for the rate-limit case instead, leaving `403` to mean permission failures only — see [API Features](#section/Getting-started/API-Features).
- `404`: The requested resource was not found.
- `409`: The route or plan is already dispatched. Dispatch is not repeatable and cannot be undone.
- `429`: Rate limit exceeded (`name = RATE_LIMIT_EXCEEDED`). **Only returned to callers that opt in** with the `x-sr-api-features: rate-limit-429` request header; without it the same condition returns `403` with `name = FORBIDDEN` and an otherwise identical body. See [API Features](#section/Getting-started/API-Features).
- `500`: An unexpected server error occurred. The body carries only `name` and `description`: internal details are never returned.
- `503`: The dispatch could not be completed — a downstream service was unreachable, timed out, or failed. The dispatch may or may not have been applied; re-post to find out, as a `409` means the first attempt succeeded.

---

[API](https://skmtc.dev/smartroutes/apis/smartroutes-api.md) · [All operations](https://skmtc.dev/smartroutes/apis/smartroutes-api/llms.txt) · [OpenAPI document](https://skmtc.dev/smartroutes/apis/smartroutes-api/revisions/a7ea507afac7?raw)
