Bug 31591 - REST API should include a patron import function
Summary: REST API should include a patron import function
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-21 13:26 UTC by Justin Rittenhouse
Modified: 2022-09-21 13:31 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Rittenhouse 2022-09-21 13:26:05 UTC
The GUI-based batch patron upload form allows for selecting a match point, neither of which is the Koha ID, as an external system generating patrons is not going to be Koha-aware.  Yet the REST API now requires knowledge of the patron's Koha ID to update a patron, necessitating a manual patron lookup request prior to submitting either an add or update request.  For individual transactions, this is cumbersome.  For bulk transactions, it's unwieldy.

It would be more helpful to have the option to choose a match point in the request, and for the software to intelligently add or update a patron as necessary.  This would significantly cut down on the external development necessary to create patrons via API, as well as API requests per patron add/update.
Comment 1 Katrin Fischer 2022-09-21 13:31:01 UTC
We have implemented a batch update with the current API using look-ups and also deciding on which fields in a patron we want to update. I think you have more control of the process the current way, but what you describe has it's own merits. 

Maybe instead of using the patron API using the patron import CLI script could be an option for you? It's very close to the how the tool works.