Koha-clms/api/v1/swagger
Tomás Cohen Arazi f7caec076f
Bug 42679: Add GET /patrons/{patron_id}/overdues_count endpoint
Returns the count of overdue checkouts for a patron as a plain integer.
Computed live from the database (date_due < NOW()) to ensure accuracy,
as overdue status is time-based with no discrete event to trigger updates.

This endpoint is intended for async loading in the patron search table,
allowing the main search results to render immediately while overdues
are fetched separately per visible page.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/api/v1/patrons_overdues_count.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-11 16:05:56 +00:00
..
definitions Bug 10190: fix permissions 2026-09-10 14:24:34 +00:00
parameters Bug 29002: Add bookings objects and API classes 2023-11-03 12:04:07 -03:00
paths Bug 42679: Add GET /patrons/{patron_id}/overdues_count endpoint 2026-09-11 16:05:56 +00:00
swagger.yaml Bug 42679: Add GET /patrons/{patron_id}/overdues_count endpoint 2026-09-11 16:05:56 +00:00