<!-- canonical: https://docs.costplus.io/api-reference/orders/cancelOrder -->

> Cancel an order if it has not been completed yet.
# Cancel an order

Cancel an order if it has not been completed yet.

## Endpoint

```
DELETE /orders/{id}
```

## Authentication

HTTP Basic — use your API key as the username with an empty password.

```bash
curl -u YOUR_API_KEY: https://api.costplus.online/v1/orders/{id}/
```

## Parameters

| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | `id` | string | yes | Order identifier |

## Responses

### 200 — The cancelled order

### 401 — Invalid or missing API key

### 403 — No authorization for the requested resource

## cURL

```bash
curl -u YOUR_API_KEY: \
  -X DELETE https://api.costplus.online/v1/orders/4851e31c-4137-4e91-95ef-1df945ee76a2/
```
