Endpoint
Authentication
This endpoint requires a valid JWT Bearer token with ADMIN role.Path Parameters
The unique receipt number of the repair request to delete (e.g., RR-20260308143025123456789)
Response
Returns a success message confirming the deletion.Response Fields
Indicates if the request was successful
Success message confirming the deletion
Examples
Response Example
Error Responses
401 Unauthorized
403 Forbidden
Returned when the authenticated user does not have ADMIN role.404 Not Found
Returned when the repair request with the specified receipt number does not exist.500 Internal Server Error
Returned when there’s an error during the deletion process.Notes
- This endpoint performs a soft delete — the record is marked as deleted but not permanently removed from the database
- The
deleted_attimestamp is set to the current date and time - Associated images are also deleted from both storage and the database
- The deletion operation is wrapped in a database transaction to ensure data integrity
- If the transaction fails (e.g., image deletion error), all changes are rolled back
- Soft-deleted repair requests will not appear in list or get endpoints
- The
receipt_numberis used to identify the repair request, not the databaseid