---
title: "Discard Dispatch Plan Changes"
method: POST
path: "/v1/plans/{planId}/discard"
tags: ["Dispatch plans"]
---

# Discard Dispatch Plan Changes

`POST /v1/plans/{planId}/discard`

## Request

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

Return the draft to its last saved version, discarding unsaved changes by anyone. Orders that joined or left the plan since stay as they are. 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

- DispatchPlanWrite
  - `expectedRevision` integer, required: The `revision` of the plan you last read.

## Response `200`

OK

- DispatchPlanWriteResult
  - `planId` string, required
  - `revision` integer, required
  - `contentHash` string, required
  - `restoreVersionNumber` integer, required: The saved version that Discard returns the plan to.

## 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)
