Skip to content

Delete Booking

Bookings Destructive

Permanently remove an existing booking and its associated data from the system. This action cannot be undone.

⚠️ Warning

Irreversible operation

Auth

Bearer token required

Use cases

Cancel unpaid · Remove duplicates · Clean test data


Endpoint overview

DELETE Authenticated

URL: {{base_url}}/employee/booking/delete-booking/{{booking_id}}

  • Requires a valid bearer token in the Authorization header.
  • Replace {{booking_id}} with the actual booking ID.
  • Cannot delete bookings that have been processed or shipped.

Required headers

Header Value
Authorization Bearer {{token}}

Path parameters

Parameter Type Required Description
booking_id string Yes The unique identifier of the booking

Sample request

DELETE /employee/booking/delete-booking/69090bfcabc57c5eb35b0f15 HTTP/1.1
Host: {{ base_url }}
Authorization: Bearer {{ token }}

Response

{
  "success": true,
  "data": {},
  "status": 200,
  "message": "Deleted successfully!",
  "timestamp": "2025-11-11T09:26:26.855Z"
}

Response fields

Field Type Description
success boolean Indicates whether the delete operation was successful
data object Empty object (no data returned on successful deletion)
status number HTTP status code (200 for success)
message string Confirmation message
timestamp string ISO timestamp of the response

Error responses

Booking Not Found

{
  "success": false,
  "status": 404,
  "message": "Booking not found",
  "timestamp": "2025-11-11T09:26:26.855Z"
}

Cannot Delete Processed Booking

{
  "success": false,
  "status": 400,
  "message": "Cannot delete a booking that has been processed or shipped",
  "timestamp": "2025-11-11T09:26:26.855Z"
}

Unauthorized

{
  "success": false,
  "status": 401,
  "message": "Invalid or expired token",
  "timestamp": "2025-11-11T09:26:26.855Z"
}

Important notes

  • Irreversible: Deleted bookings cannot be recovered. Consider updating the booking state instead if you need to retain records.
  • State restrictions: Bookings with active shipments or completed orders cannot be deleted. Check bookingState and orderState before attempting deletion.
  • Related data: Deleting a booking may also remove associated quotes, but invoices and receipts may be retained for audit purposes.

Alternative: If you need to cancel a booking but retain records for auditing, consider using the Update Booking endpoint to change the booking state instead.