Bug 40495

Summary: Add option to subject purchase suggestion API call to OPAC requirements
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: REST APIAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38198
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2025-07-24 13:33:52 UTC
There are several ways to restrict purchase suggestions made via the Koha OPAC relative to suggestions made via the staff interface. Suggestions made via the API don't respect any of those options. We should add a header parameter to the Add Suggestion API call to make a request subject to those options.

AnonSuggestions - if disabled, OPAC purchase suggestions require a borrowernumber
OPACSuggestionMandatoryFields - defines which fields are required
suggestion - enables/disables OPAC suggestions at all
suggestionPatronCategoryExceptions - blocks specific categories from making OPAC suggestions

See also bug 38198, which seeks to add suggestions to BlockExpiredPatronOpacActions. When/if that happens we'd also want the option to block API suggestions for expired patrons.