# Delete a package

`DELETE /v2/packages`

**Base URLs:**

- Sandbox: `https://api.sandbox.bobgo.co.za`
- Production: `https://api.bobgo.co.za`

**Authentication:** Bearer token required (see the Authentication page).

## Example request

```bash
curl -X DELETE 'https://api.sandbox.bobgo.co.za/v2/packages' \
  -H "content-type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
  "id": 17
}'
```

Deletes one package, given its `id` in the JSON body. The id cannot go in the
query string.

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | integer | yes | The package to delete. |

A successful delete returns `204` with no body. The delete is soft: shipments
already created with those dimensions are untouched, and the package simply
stops being offered.

Two packages cannot be deleted:

| Message | When |
| --- | --- |
| `Cannot delete last remaining package.` | It is the only package on the account. |
| `Cannot delete a default package.` | It is the default. Make another package the default first, with [Update packages](packages_update.md). |

An `id` that is not on your account fails with
`Package does not belong to account.`
