---
title: "Delete an order"
method: DELETE
path: "/public/v1/orders/{id}"
tags: ["Order"]
---

# Delete an order

`DELETE /public/v1/orders/{id}`

Deletes a sales order. This is a hard delete: the order is permanently removed together with its line items, charges, and shipments — it disappears from `GET /public/v1/orders`, `GET /public/v1/orders/{id}` returns 404 for it, and it cannot be recovered through the API. Responds 204 with no body on success, or 404 if no order with that `id` exists in your company (including one that belongs to another company or was already deleted).

Some orders cannot be deleted; each of these is refused with a 400 and nothing is changed:

• An order matched to a compliance transfer (Metrc or BioTrack). Unmatch it first if the transfer allows it; otherwise it can never be deleted through the API.
• An order with MERGED status. Delete the combined order it was merged into instead — that resets its source orders back to PENDING, after which they can be deleted individually.
• An order with [returns](#model-return) recorded against it.
• A historical shared-license order.
• Any custom validation rule your company has configured for order deletion can also refuse the delete.

[Inventory](#model-inventory) assigned to the order's line items is released back to available inventory, whatever the order's status — including quantities already deducted by a COMPLETED order. Assemblies that were created to produce items for this order and are still PENDING are deleted too, releasing the ingredient inventory they had claimed.

The order's invoices are hard-deleted in the same call: their payments are removed, credits generated by overpaying them are canceled, and credit balance applied to them is released back onto the credits. If your company is integrated with QuickBooks Online, the linked invoices are scheduled for deletion there too (that sync is eventual — observe it in QuickBooks Online, not in the 204).

Other effects, all in one atomic call: if this is a combined order, the orders that were merged into it are reset to PENDING status; tasks tied to the order are deleted; files attached to the order are detached but kept. Nothing is synced to Metrc or BioTrack, and an order imported from LeafLink is not rejected in LeafLink.

Required permission: `orders_permissions_delete` (plus access to the order under team restrictions).

## Path parameters

- `id` string, required

## Response `204`

No Content

## Other responses

- `400` — Invalid parameters
- `401` — Missing or invalid API token
- `403` — The API token lacks the required permission
- `404` — Not Found

---

[API](https://skmtc.dev/distru/apis/distru-api.md) · [All operations](https://skmtc.dev/distru/apis/distru-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/distru/distru-api/revisions/f8930b2c2924/schema)
