| Summary: | Enhance POST /checkouts endpoint to accept barcode or item_id | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jan Kissig <bibliothek> |
| Component: | REST API | Assignee: | Bugs List <koha-bugs> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | matt.blenkinsop, tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| Change sponsored?: | --- | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Attachments: |
Bug 37253: Enhance POST /checkouts endpoint to accept barcode or item_id
Bug 37253: Enhance POST /checkouts endpoint to accept barcode or item_id Bug 37253: Tidy changes |
||
|
Description
Jan Kissig
2024-07-04 08:43:27 UTC
Created attachment 168503 [details] [review] Bug 37253: Enhance POST /checkouts endpoint to accept barcode or item_id This patch adds external_id as a body param in POST /checkouts which acts as the items barcode. This enhances the checkouts route to checkout items directly via barcode which could be useful for external tools like Koha Offline Circulation Tool Test plan: a) apply patch b) enable system preference RESTBasicAuth c) check out an item via an API testing tool. Be sure that item is not checked out already. Auth: username: koha & password: koha Body JSON: { "external_id" : "39999000011418", "library_id": "CPL" } POST http://localhost:8081/api/v1/checkouts d) check response code 201 and response content Created attachment 168507 [details] [review] Bug 37253: Enhance POST /checkouts endpoint to accept barcode or item_id This patch adds external_id as a body param in POST /checkouts which acts as the items barcode. This enhances the checkouts route to checkout items directly via barcode which could be useful for external tools like Koha Offline Circulation Tool Test plan: a) apply patch b) enable system preference RESTBasicAuth c) check out an item via an API testing tool. Be sure that item is not checked out already. Auth: username: koha & password: koha Body JSON: { "external_id" : "39999000011418", "library_id": "CPL", "patron_id": 5 } POST http://localhost:8081/api/v1/checkouts d) check response code 201 and response content Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Created attachment 168508 [details] [review] Bug 37253: Tidy changes Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> All works fine, just amended the test plan to include a patron_id and tidied a few lines to satisfy the QA tests |