Bug 36641 - Add an endpoint to list effective circulation rules for an itemtype, branchcode, patron category combination
Summary: Add an endpoint to list effective circulation rules for an itemtype, branchco...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 34440
  Show dependency treegraph
 
Reported: 2024-04-18 12:45 UTC by Martin Renvoize
Modified: 2024-05-08 14:58 UTC (History)
2 users (show)

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


Attachments
Bug 36641: Add endpoint for fetching circulation rules (4.34 KB, patch)
2024-04-18 12:47 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2024-04-18 12:45:08 UTC
It would be helpful to have an API endpoint that allowed fetching the circulation rules for a given itemtype, branchcode and patron category combination.
Comment 1 Martin Renvoize 2024-04-18 12:47:42 UTC
Created attachment 165086 [details] [review]
Bug 36641: Add endpoint for fetching circulation rules

This patch is a proof of concept for an API endpoint that returns a list
of circulation rules for the specified itemtype, branchcode and patron
category combination.  You can also add a list of `rules` as a query
parameter to limit the response to only the rules you are interested in
for this combination.
Comment 2 Martin Renvoize 2024-04-18 13:04:27 UTC
Setting to NSO to get eyes.. but right at this moment it would fail QA for lack of tests.

I want feedback specifically on the URL and the form of the response and if we're happy for it to be an open object or want to a spec for it with each of the available circ rule keys listed but optional.
Comment 3 Tomás Cohen Arazi 2024-04-26 12:58:05 UTC
A few remarks:

* The order of the path parameters is arbitrary, right? I assume you thought about it
* The parameter names should be fixed to our current uses
* The returned structure is under specified
* I never liked /circulation-rules, can we make it /circulation_rules so it matches all other routes?