Often when a 3rd-party application want to deal with reserves in Koha, it must know in advance if the reserve is allowed (for example to hide the "place hold" link if hold is not allowed) This new route does just that, telling if a given hold is allowed for a given patron. Moreover, it also returns a list of available pickup locations (restricting to only the borrower's branch if IndependentBranches is set). Depends on bug 13903.
Created attachment 37365 [details] [review] Bug 13927: Add API route to check hold capabilities OPTIONS /borrowers/{borrowernumber}/reserves Request body should contain biblionumber or itemnumber, and response tells us if reserve is allowed, and which pickup locations are available
Well, the bug 13903 changed in the meanwhile. How about changing the route to: GET /holds?borrowernumber=X&biblionumber=X GET /holds?borrowernumber=X&itemnumber=X
Or even better to do it same way as is bug 16826: GET /availability/items?borrowernumber=&itemnumber=123 GET /availability/items?borrowernumber=&biblionumber=123 Could be quite good if the output was the same as in mentioned bug
Marked as duplicate of bug 16826 *** This bug has been marked as a duplicate of bug 16826 ***