Delete a Booking
This section describes the endpoint for deleting a specific booking, including all associated skiers, in the hotel management system.
Delete an Existing Booking
Request:
DELETE /bookings/{booking_id}/
Example usage:
curl -X DELETE http://exampledomain.com/api/v1/bookings/12345/ \
-H "Authorization: Token YOUR_ACCESS_TOKEN"
Parameters:
booking_id- The unique identifier of the booking to be deleted.
Response:
Content-Type application/json
200 OK / 404 Not Found / 400 Bad Request
{
"status": "success" / "error",
"message": "Booking and related skiers deleted" / "Booking not found" / "Error details if any"
}
Note:
- Authorization Protected
- This endpoint deletes the booking specified by the
booking_id. - A
200 OKresponse is returned upon successful deletion. - If the booking does not exist, a
404 Not Foundresponse will be returned. - If there are any issues with the request, a
400 Bad Requestresponse will be returned, with details about the error.