> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fire.rest/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel purchase order

> Cancels the purchase order. Returns HTTP 204. POST ...?action=cancel is equivalent.

<ParamField header="x-api-key" type="string" required>
  API key with `inventory:write` scope.
</ParamField>

<ParamField path="vendorId" type="string" required>
  Vendor UUID.
</ParamField>

<ParamField path="orderId" type="string" required>
  Purchase order UUID. Can be cancelled at any pre-received point (DRAFT, SUBMITTED, or CONFIRMED).
</ParamField>

<ResponseExample>
  ```json 204 theme={null}
  ```

  ```json 422 theme={null}
  {
    "error": {
      "kind": "purchase_order_cannot_cancel",
      "message": "Purchase order cannot be cancelled in its current status"
    }
  }
  ```
</ResponseExample>
