|
Text to go in the release notes:
|
A new REST API endpoint `/api/v1/holds/cancellation_bulk` has been added to support cancelling multiple holds in a single request, with the cancellations processed as a background job.
This endpoint accepts an array of hold IDs and optionally a cancellation reason, then queues a background job to process the cancellations asynchronously. This prevents timeouts and improves performance when cancelling large numbers of holds.
**Endpoint details:**
- **Method:** POST
- **Path:** `/api/v1/holds/cancellation_bulk`
- **Parameters:**
- `hold_ids` (required): Array of hold IDs to cancel
- `cancellation_reason` (optional): Reason for cancellation
- **Response:** Returns a background job ID for tracking the cancellation progress
**For developers:**
This endpoint is used by the staff interface patron holds tables (Bug 40551) to handle bulk hold cancellations. The background job approach ensures reliable processing even when dealing with hundreds of holds, and allows the user interface to remain responsive.
**Required permissions:**
- `reserveforothers` - Place and modify holds for patrons
|