---
title: "Remove Dispatch Plan Orders"
method: POST
path: "/v1/plans/{planId}/orders:remove"
tags: ["Dispatch plans"]
---

# Remove Dispatch Plan Orders

`POST /v1/plans/{planId}/orders:remove`

## Request

- Base URL: `https://api.sandbox.usenash.com`
- URL: `https://api.sandbox.usenash.com/v1/plans/{planId}/orders:remove`
- Auth: none declared

Take the selected orders out of the plan, off any draft route they are on. Fails with 409 `PLAN_LEASE_HELD` (naming `heldBy`) while anyone has the plan open in the Planner, and with 409 `PLAN_REVISION_STALE` (naming `currentRevision`) when the plan changed since `expectedRevision`.

## Path parameters

- `planId` string, required

## Request body

- MoveDispatchPlanOrders
  - `expectedRevision` integer, required: The `revision` of the plan you last read.
  - `selection` union, required
    - object
      - `orderIds` string[], required
      - `draftRouteIds` string[]
    - object
      - `draftRouteIds` string[], required
      - `orderIds` string[]

## Response `200`

OK

- RemovedDispatchPlanOrders
  - `planId` string, required
  - `revision` integer, required
  - `contentHash` string, required
  - `activeMemberCount` integer, required
  - `removedOrderIds` string[], required

## Other responses

- `422`: Unprocessable Content

---

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