# Release the stock this drop-ship line holds from a pre-allocation you decided not to submit

`DELETE /api/v1/dropship-orders/{dropship_order_id}/allocation` — Token required · df:write · write · 2 pts

Drop-ship orders

## Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `dropship_order_id` **required** | string | Drop-ship order id, from the drop-ship order list. Own channel only. (max length 64) |

## Response

The envelope is decided by the HTTP status alone: 2xx with `{ data: … }` (lists also carry `page / page_size / has_more` or `total_count`); 4xx / 5xx with `{ error: { code, message, hint, request_id, doc_url } }`.

```json
{
  "data": { … }
}
```

A success response carries no human-readable text — no `code / result / msg`. `error.code` is the only field your code should branch on; `message` follows `Accept-Language`.

> Send an `Idempotency-Key` header (any unique string, e.g. a UUID) on writes: a network retry never creates a second order. Orders are drafts by default until a person confirms them in the ERP.

## Examples

### curl

```bash
curl -X DELETE "https://connect.everugg.net.au/api/v1/dropship-orders/{dropship_order_id}/allocation" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: <uuid>"
```

### Python

```python
import requests

r = requests.delete(
    "https://connect.everugg.net.au/api/v1/dropship-orders/{dropship_order_id}/allocation",
    headers={"Authorization": "Bearer " + TOKEN, "Idempotency-Key": str(uuid.uuid4())},
)
data = r.json()
r.raise_for_status()  # 4xx/5xx: data["error"]["code"] / ["hint"]
```

### Node

```js
const res = await fetch("https://connect.everugg.net.au/api/v1/dropship-orders/{dropship_order_id}/allocation", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${TOKEN}`, "Idempotency-Key": crypto.randomUUID() },
})
const data = await res.json()
if (!res.ok) throw new Error(`${data.error?.code}: ${data.error?.message}`)
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://connect.everugg.net.au/api/v1/dropship-orders/{dropship_order_id}/allocation"))
    .header("Authorization", "Bearer " + token)
    .header("Idempotency-Key", UUID.randomUUID().toString())
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
```

---
Markdown source: https://connect.everugg.net.au/reference/delete-api-v1-dropship-orders-dropship-order-id-allocation.md?lang=en · Web page: https://connect.everugg.net.au/reference?op=delete-api-v1-dropship-orders-dropship-order-id-allocation&lang=en
