Bug 38205

Summary: 'bookable' should be queryable on the /items endpoint
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: CirculationAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 35906    
Bug Blocks:    

Description Martin Renvoize (ashimema) 2024-10-18 11:24:41 UTC
We added further support for bookable on the /biblio/{biblio_id}/items endpoint.. we should really replicate that on the /items endpoint including enhancing the support from just ?bookable= param to the q= param handling.

I also think we should rename from bookable to effective_bookable because that's what the special handling actually uses now.
Comment 1 Martin Renvoize (ashimema) 2024-10-18 11:26:41 UTC
From bug 35906 comment 85

We should support the ?bookable filter on the plain /api/v1/items endpoint too.

Also.. I'm tempted to rename it 'effective_bookable' to more clearly distinguish been effective bookable and localised item bookable fields.

I'd love to see this also taken account of within q= as well as the local param option.. that could be a future follow-up though.
Comment 2 Katrin Fischer 2024-10-18 11:30:59 UTC
I like the idea to follow the pattern with effective_ here. Would it make sense to expose both, the item level information and the combined status from item type and item or is the latter enough really?
Comment 3 Tomás Cohen Arazi (tcohen) 2025-05-28 18:36:58 UTC
I like the idea of having a ?bookable=1 filter in both controller methods.

I don't like the fact the 'effective_*' attributes are returned without an embed. Because we end up answering in chat or support tickets questions about weird 500 errors caused by passing those attributes.

When it is an embed, the docs at least can add `(x-koha-embed)` on the side so consumers know what to expect.