Delete a booking
Endpoint
Section titled “Endpoint”DELETE /api/bookings/v4/{id}Permanently removes a booking record, along with its sender, receiver, and all items. This is most commonly used to clean up quote records (status new) that you no longer need.
When to use this
Section titled “When to use this”Use this endpoint to remove draft bookings before they are paid or confirmed — typically when sender/receiver details turned out wrong and you want to start over.
You should not need to delete quotes (new status) routinely — they are cheap to leave in place and clean themselves up. Reach for this endpoint when you have a draft booking that’s no longer needed and you don’t want it appearing in lists.
Once a booking has been paid or confirmed, deletion is not possible. To cancel a paid or confirmed booking, contact support@transdirect.com.au.
Authentication
Section titled “Authentication”Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The unique booking ID. |
Example request
Section titled “Example request”curl -X DELETE \ -H "Api-key: YOUR_API_KEY" \ https://www.transdirect.com.au/api/bookings/v4/12345678Response
Section titled “Response”A successful deletion returns 204 No Content with an empty body.
Restrictions
Section titled “Restrictions”Deletion is only possible before a booking is paid or confirmed. The endpoint will reject the request if:
- The booking has been paid or confirmed. To cancel a paid or confirmed booking, contact support.
- The booking belongs to another member.
Error responses
Section titled “Error responses”| Status code | Description |
|---|---|
401 | Unauthorised — invalid or missing credentials. |
404 | Not found — no booking exists with the given ID, or it belongs to another member. |
500 | The booking is locked (paid) and cannot be deleted, or another internal error occurred. |