# DELETE /api/v1/purchase-orders/{id}

> Delete inventory order

- **Tag:** purchase-orders
- **Operation ID:** `delete_order_api_v1_purchase_orders__id__delete`

## Description

Permanently delete a purchase order.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `id` (path, string · uuid, required)

## Responses

### 204 — Successful Response

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 409 — Conflict - Resource already exists

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X DELETE 'https://api.ondayzero.com/api/v1/purchase-orders/{id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/purchase-orders/{id}', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.delete("https://api.ondayzero.com/api/v1/purchase-orders/{id}", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/purchase-orders/delete-order
- OpenAPI slice: https://www.ondayzero.com/docs/reference/purchase-orders/delete-order/openapi.json
- Other endpoints in **purchase-orders**: https://www.ondayzero.com/docs/reference/purchase-orders
