From eaf8cd2feaec41586a941baa708d4a5b78bee299 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 15 Sep 2025 14:17:19 +0100 Subject: [PATCH] Bug 40808: Add account_lines embedding support to POST /holds endpoint Adds x-koha-embed parameter to the POST /holds endpoint to allow embedding account_lines in the response when creating a hold. This enables API consumers to immediately see any charges/fees that are created as part of the hold placement process in a single API call. Usage: POST /api/v1/holds x-koha-embed: account_lines The response will include any account lines (fees) automatically created during hold placement, such as hold placement fees. --- api/v1/swagger/paths/holds.yaml | 10 ++++++++++ api/v1/swagger/paths/patrons_holds.yaml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/api/v1/swagger/paths/holds.yaml b/api/v1/swagger/paths/holds.yaml index d1d20715cb6..112948bd42a 100644 --- a/api/v1/swagger/paths/holds.yaml +++ b/api/v1/swagger/paths/holds.yaml @@ -232,6 +232,16 @@ - hold_limit - restricted collectionFormat: csv + - name: x-koha-embed + in: header + required: false + description: Embed list sent as a request header + type: array + items: + type: string + enum: + - debits + collectionFormat: csv consumes: - application/json produces: diff --git a/api/v1/swagger/paths/patrons_holds.yaml b/api/v1/swagger/paths/patrons_holds.yaml index 739451e2fa9..9fb99b4c885 100644 --- a/api/v1/swagger/paths/patrons_holds.yaml +++ b/api/v1/swagger/paths/patrons_holds.yaml @@ -34,7 +34,7 @@ - deleted_biblio - item - pickup_library - - account_lines + - debits collectionFormat: csv produces: - application/json -- 2.51.0