| Summary: | Lack of REST API Support for Linking Items to Orders | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Oswald Kaipainen <urho> |
| Component: | REST API | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | tomascohen |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
Currently, the Koha REST API does not provide a way to link items to orders. This functionality would be useful for managing acquisitions and ensuring that items are correctly associated with their corresponding orders. Proposed Changes: 1) Allow specifying order_id when creating or updating items: POST /biblios/{biblio_id}/items: Support an optional order_id field to link the item to an order during creation. PUT /biblios/{biblio_id}/items/{item_id}: Allow updating an existing item to set or change its order_id. 2) Enable batch linking of items to orders: POST /acquisitions/orders/ and PUT /orders/{order_id} should accept an array of item IDs in the request body: {"items": [12345, 12346]} This would allow multiple items to be linked to an order in a single request. 3) Validation Requirement: Ensure that an item is not already linked to another order