Bug 33711

Summary: Refine the token passing mechanisms introduced in bug 23336
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: REST APIAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: koha-bugs, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 23336    
Bug Blocks: 33712    

Description Martin Renvoize (ashimema) 2023-05-10 12:12:31 UTC
Bug 23336 introduces an API workflow for checkouts by adding two endpoints.. one for availability that creates a token for confirmations that can then be used by the checkouts endpoint to verify that availability has been checked.

Whilst I think the availability endpoint is worthwhile in it's own right, I think we could also send back the token in the 409 pre-condition failed response of the checkouts endpoint so one could use that single endpoint for double duty in the right circumstances.

I also think we could work on how the confirmation token is sent to the endpoint.. it's currently a simple query param but may lend itself to being part of the x-koha-overrides header or another header?