https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #233 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 193087
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193087&action=edit
Bug 23415: Add REST API support for fine override on renewal

This commit adds support for the AllowFineOverrideRenewing functionality
to the REST API renewal endpoints using the standard x-koha-override pattern.

Changes:
1. Added x-koha-override header parameter to both renewal endpoints:
   - POST /checkouts/{checkout_id}/renewal
   - POST /checkouts/{checkout_id}/renewals
2. Updated Koha::REST::V1::Checkouts::renew() to:
   - Check for 'debt_limit' in the overrides stash
   - Check AllowFineOverrideRenewing preference when override is requested
   - Allow renewal override only when both:
     * x-koha-override header contains 'debt_limit' AND
     * AllowFineOverrideRenewing preference is enabled
   - Follows the established x-koha-override pattern used by other endpoints
3. Updated OpenAPI specification (swagger) to document the new header
   using the standard pattern with enum values

Usage:
  curl -X POST /api/v1/checkouts/123/renewal \
    -H "x-koha-override: debt_limit"

The override only works for too_much_owing errors and requires
the AllowFineOverrideRenewing system preference to be enabled.

This implementation follows the same pattern as holds and other
endpoints that support overrides, maintaining consistency across
the REST API.

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Andrew Fuerste Henry <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to