Endpoint
Description
Permanently deletes a reservation from the system by its unique identifier. See implementation inserver/src/modules/reservations/reservations.controller.ts:157-168.
Authentication
This endpoint requires Bearer token authentication. Include your access token in the
Authorization header.Path Parameters
The unique identifier of the reservation to deleteExample:
res789Response
HTTP status code (200 for success)
Information about the deleted reservation or deletion result
Example Request
Example Response
Error Responses
Not Found
If the reservation doesn’t exist:Unauthorized
Use Cases
- Cancel an appointment
- Remove a reservation from the system
- Clean up test or outdated reservations
- Allow users to cancel their bookings
Important Considerations
Before Deleting
- Verify the reservation exists using Get One
- Check if the reservation has an associated payment that may need refunding
- Consider the professional’s cancellation policy
- Notify relevant parties (client and professional) about the cancellation
Alternative Approach
Instead of deleting, consider updating the reservation status toCANCELLED if you need to maintain records:
Best Practices
- Implement confirmation dialogs in your UI before deletion
- Log deletion events for audit purposes
- Handle refunds if payment was processed
- Send cancellation notifications to affected parties
- Consider a “soft delete” pattern for business requirements
Related Endpoints
- Get One - Retrieve reservation details before deletion
- Create Without Payment - Create a new reservation
- Get By User - View all user reservations