# Booking Delete

Use this endpoint to permanently remove a booking and all associated metadata.

#### Endpoint

```http
DELETE /api/v1/client/bookings/{bookingId}
```

***

### Cascading Behavior

This is a **hard delete** operation. To protect data integrity, the system automatically performs an atomic cleanup of all related records:

* **Payments**: All payment records linked to this booking are deleted.
* **Stay Dates**: All nightly occupancy records are removed.
* **VCC & Keys**: Any associated Virtual Credit Cards or Door Keys are deleted.
* **Guest Auto-Cleanup**: The system checks if the guest has any other bookings in your property. If this was the guest's only booking, the **Guest record itself is also deleted** to keep your database clean.

#### Example Request

```bash
curl -X DELETE "/api/v1/client/bookings/e7b7f6bb-6c0c-4e2c-9b3e-9c6f2a1c0a77" \
  -H "X-API-Key: <your_api_key>"
```

#### Response

* **204 No Content**: Deletion successful.
* **404 Not Found**: Booking ID does not exist or belongs to another property.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hostelmate.co/api-documentation/bookings/delete.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
