Bug 13927 - Add API route to check hold capabilities
Summary: Add API route to check hold capabilities
Status: RESOLVED DUPLICATE of bug 16826
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
Depends on: 13903
Blocks: 16652
  Show dependency treegraph
 
Reported: 2015-03-30 12:40 UTC by Julian Maurice
Modified: 2020-05-22 09:35 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13927: Add API route to check hold capabilities (4.72 KB, patch)
2015-03-30 12:41 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2015-03-30 12:40:54 UTC
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.
Comment 1 Julian Maurice 2015-03-30 12:41:31 UTC
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
Comment 2 Jiri Kozlovsky 2016-07-31 10:05:01 UTC
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
Comment 3 Jiri Kozlovsky 2016-07-31 10:17:25 UTC
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
Comment 4 Julian Maurice 2020-05-22 09:35:10 UTC
Marked as duplicate of bug 16826

*** This bug has been marked as a duplicate of bug 16826 ***