Bug 29453: Add endpoints for fetching patron credits & debits
[koha.git] / api / v1 / swagger / swagger.yaml
1 ---
2 swagger: "2.0"
3 basePath: /api/v1
4 definitions:
5   account_line:
6     $ref: ./definitions/account_line.yaml
7   advancededitormacro:
8     $ref: ./definitions/advancededitormacro.yaml
9   allows_renewal:
10     $ref: ./definitions/allows_renewal.yaml
11   authorised_value:
12     $ref: ./definitions/authorised_value.yaml
13   authorised_value_category:
14     $ref: ./definitions/authorised_value_category.yaml
15   identity_provider:
16     "$ref": ./definitions/identity_provider.yaml
17   identity_provider_domain:
18     "$ref": ./definitions/identity_provider_domain.yaml
19   basket:
20     $ref: ./definitions/basket.yaml
21   bundle_link:
22     $ref: ./definitions/bundle_link.yaml
23   cashup:
24     $ref: ./definitions/cashup.yaml
25   checkout:
26     $ref: ./definitions/checkout.yaml
27   checkouts:
28     $ref: ./definitions/checkouts.yaml
29   circ-rule-kind:
30     $ref: ./definitions/circ-rule-kind.yaml
31   city:
32     $ref: ./definitions/city.yaml
33   credit:
34     $ref: ./definitions/credit.yaml
35   debit:
36     $ref: ./definitions/debit.yaml
37   erm_agreement:
38     $ref: ./definitions/erm_agreement.yaml
39   erm_eholdings_title:
40     $ref: ./definitions/erm_eholdings_title.yaml
41   erm_eholdings_package:
42     $ref: ./definitions/erm_eholdings_package.yaml
43   erm_eholdings_resource:
44     $ref: ./definitions/erm_eholdings_resource.yaml
45   erm_license:
46     $ref: ./definitions/erm_license.yaml
47   error:
48     $ref: ./definitions/error.yaml
49   fund:
50     $ref: ./definitions/fund.yaml
51   hold:
52     $ref: ./definitions/hold.yaml
53   holds:
54     $ref: ./definitions/holds.yaml
55   ill_backend:
56     $ref: ./definitions/ill_backend.yaml
57   ill_backends:
58     $ref: ./definitions/ill_backends.yaml
59   ill_status:
60     $ref: ./definitions/ill_status.yaml
61   ill_request:
62     $ref: ./definitions/ill_request.yaml
63   import_batch_profile:
64     $ref: ./definitions/import_batch_profile.yaml
65   import_batch_profiles:
66     $ref: ./definitions/import_batch_profiles.yaml
67   import_record_match:
68     $ref: ./definitions/import_record_match.yaml
69   invoice:
70     $ref: ./definitions/invoice.yaml
71   item:
72     $ref: ./definitions/item.yaml
73   item_group:
74     $ref: ./definitions/item_group.yaml
75   job:
76     $ref: ./definitions/job.yaml
77   library:
78     $ref: ./definitions/library.yaml
79   order:
80     $ref: ./definitions/order.yaml
81   patron:
82     $ref: ./definitions/patron.yaml
83   patron_account_credit:
84     $ref: ./definitions/patron_account_credit.yaml
85   patron_balance:
86     $ref: ./definitions/patron_balance.yaml
87   patron_extended_attribute:
88     $ref: ./definitions/patron_extended_attribute.yaml
89   quote:
90     $ref: ./definitions/quote.yaml
91   renewal:
92     $ref: ./definitions/renewal.yaml
93   renewals:
94     $ref: ./definitions/renewals.yaml
95   return_claim:
96     $ref: ./definitions/return_claim.yaml
97   search_filter:
98     $ref: ./definitions/search_filter.yaml
99   smtp_server:
100     $ref: ./definitions/smtp_server.yaml
101   suggestion:
102     $ref: ./definitions/suggestion.yaml
103   ticket:
104     $ref: ./definitions/ticket.yaml
105   ticket_update:
106     $ref: ./definitions/ticket_update.yaml
107   transfer_limit:
108     $ref: ./definitions/transfer_limit.yaml
109   vendor:
110     $ref: ./definitions/vendor.yaml
111 paths:
112   /acquisitions/baskets/managers:
113     $ref: paths/acquisitions_baskets.yaml#/~1acquisitions~1baskets~1managers
114   /acquisitions/funds:
115     $ref: ./paths/acquisitions_funds.yaml#/~1acquisitions~1funds
116   /acquisitions/funds/owners:
117     $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1owners
118   /acquisitions/funds/users:
119     $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1users
120   /acquisitions/orders:
121     $ref: ./paths/acquisitions_orders.yaml#/~1acquisitions~1orders
122   "/acquisitions/orders/{order_id}":
123     $ref: "./paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id}"
124   /acquisitions/vendors:
125     $ref: ./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors
126   "/acquisitions/vendors/{vendor_id}":
127     $ref: "./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}"
128   /advanced_editor/macros:
129     $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros
130   /advanced_editor/macros/shared:
131     $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
132   /search_filters:
133     $ref: ./paths/search_filters.yaml#/~1search_filters
134   "/search_filters/{search_filter_id}":
135     $ref: "./paths/search_filters.yaml#/~1search_filters~1{search_filter_id}"
136   "/advanced_editor/macros/shared/{advancededitormacro_id}":
137     $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}"
138   "/advanced_editor/macros/{advancededitormacro_id}":
139     $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
140   "/article_requests/{article_request_id}":
141     $ref: "./paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
142   /auth/otp/token_delivery:
143     $ref: paths/auth.yaml#/~1auth~1otp~1token_delivery
144   "/auth/password/validation":
145     $ref: "./paths/auth.yaml#/~1auth~1password~1validation"
146   /auth/two-factor/registration:
147     $ref: paths/auth.yaml#/~1auth~1two-factor~1registration
148   /auth/two-factor/registration/verification:
149     $ref: paths/auth.yaml#/~1auth~1two-factor~1registration~1verification
150   /auth/identity_providers:
151     $ref: paths/auth.yaml#/~1auth~1identity_providers
152   "/auth/identity_providers/{identity_provider_id}":
153     $ref: paths/auth.yaml#/~1auth~1identity_providers~1{identity_provider_id}
154   "/auth/identity_providers/{identity_provider_id}/domains":
155     $ref: paths/auth.yaml#/~1auth~1identity_providers~1{identity_provider_id}~1domains
156   "/auth/identity_providers/{identity_provider_id}/domains/{identity_provider_domain_id}":
157     $ref: paths/auth.yaml#/~1auth~1identity_providers~1{identity_provider_id}~1domains~1{identity_provider_domain_id}
158   /authorised_value_categories:
159     $ref: paths/authorised_value_categories.yaml#/~1authorised_value_categories
160   "/authorised_value_categories/{authorised_value_category_name}/authorised_values":
161     $ref: "./paths/authorised_values.yaml#/~1authorised_value_categories~1{authorised_value_category_name}~1authorised_values"
162   "/authorities":
163     $ref: paths/authorities.yaml#/~1authorities
164   "/authorities/{authority_id}":
165     $ref: paths/authorities.yaml#/~1authorities~1{authority_id}
166   "/biblios":
167     $ref: "./paths/biblios.yaml#/~1biblios"
168   "/biblios/{biblio_id}":
169     $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
170   "/biblios/{biblio_id}/checkouts":
171     $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts"
172   "/biblios/{biblio_id}/items":
173     $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1items"
174   "/biblios/{biblio_id}/pickup_locations":
175     $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations"
176   "/biblios/{biblio_id}/item_groups":
177     $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups"
178   "/biblios/{biblio_id}/item_groups/{item_group_id}":
179     $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}"
180   "/biblios/{biblio_id}/item_groups/{item_group_id}/items":
181     $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items"
182   "/biblios/{biblio_id}/item_groups/{item_group_id}/items/{item_id}":
183     $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items~1{item_id}"
184   "/cash_registers/{cash_register_id}/cashups":
185     $ref: "./paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups"
186   "/cashups/{cashup_id}":
187     $ref: "./paths/cash_registers.yaml#/~1cashups~1{cashup_id}"
188   /checkouts:
189     $ref: ./paths/checkouts.yaml#/~1checkouts
190   "/checkouts/{checkout_id}":
191     $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}"
192   "/checkouts/{checkout_id}/allows_renewal":
193     $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal"
194   "/checkouts/{checkout_id}/renewals":
195     $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewals"
196   "/checkouts/{checkout_id}/renewal":
197     $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal"
198   /circulation-rules/kinds:
199     $ref: ./paths/circulation-rules.yaml#/~1circulation-rules~1kinds
200   /cities:
201     $ref: ./paths/cities.yaml#/~1cities
202   "/cities/{city_id}":
203     $ref: "./paths/cities.yaml#/~1cities~1{city_id}"
204   "/clubs/{club_id}/holds":
205     $ref: "./paths/clubs.yaml#/~1clubs~1{club_id}~1holds"
206   /config/smtp_servers:
207     $ref: ./paths/config_smtp_servers.yaml#/~1config~1smtp_servers
208   "/config/smtp_servers/{smtp_server_id}":
209     $ref: "./paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}"
210   /erm/agreements:
211     $ref: ./paths/erm_agreements.yaml#/~1erm~1agreements
212   "/erm/agreements/{agreement_id}":
213     $ref: "./paths/erm_agreements.yaml#/~1erm~1agreements~1{agreement_id}"
214   "/erm/documents/{document_id}/file/content":
215     $ref: "./paths/erm_documents.yaml#/~1erm~1documents~1{document_id}~1file~1content"
216   "/erm/eholdings/{provider}/titles":
217     $ref: "./paths/erm_eholdings_titles.yaml#/~1erm~1eholdings~1{provider}~1titles"
218   /erm/eholdings/local/titles/import:
219     $ref: ./paths/erm_eholdings_titles.yaml#/~1erm~1eholdings~1local~1titles~1import
220   "/erm/eholdings/{provider}/titles/{title_id}":
221     $ref: "./paths/erm_eholdings_titles.yaml#/~1erm~1eholdings~1{provider}~1titles~1{title_id}"
222   "/erm/eholdings/{provider}/titles/{title_id}/resources":
223     $ref: "./paths/erm_eholdings_titles_resources.yaml#/~1erm~1eholdings~1{provider}~1titles~1{title_id}~1resources"
224   "/erm/eholdings/{provider}/packages":
225     $ref: "./paths/erm_eholdings_packages.yaml#/~1erm~1eholdings~1{provider}~1packages"
226   "/erm/eholdings/{provider}/resources":
227     $ref: "./paths/erm_eholdings_resources.yaml#/~1erm~1eholdings~1{provider}~1resources"
228   "/erm/eholdings/{provider}/resources/{resource_id}":
229     $ref: "./paths/erm_eholdings_resources.yaml#/~1erm~1eholdings~1{provider}~1resources~1{resource_id}"
230   "/erm/eholdings/{provider}/packages/{package_id}":
231     $ref: "./paths/erm_eholdings_packages.yaml#/~1erm~1eholdings~1{provider}~1packages~1{package_id}"
232   "/erm/eholdings/{provider}/packages/{package_id}/resources":
233     $ref: "./paths/erm_eholdings_packages_resources.yaml#/~1erm~1eholdings~1{provider}~1packages~1{package_id}~1resources"
234   /erm/licenses:
235     $ref: ./paths/erm_licenses.yaml#/~1erm~1licenses
236   "/erm/licenses/{license_id}":
237     $ref: "./paths/erm_licenses.yaml#/~1erm~1licenses~1{license_id}"
238   /erm/users:
239     $ref: ./paths/erm_users.yaml#/~1erm~1users
240   /holds:
241     $ref: ./paths/holds.yaml#/~1holds
242   "/holds/{hold_id}":
243     $ref: "./paths/holds.yaml#/~1holds~1{hold_id}"
244   "/holds/{hold_id}/pickup_location":
245     $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location"
246   "/holds/{hold_id}/pickup_locations":
247     $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations"
248   "/holds/{hold_id}/priority":
249     $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1priority"
250   "/holds/{hold_id}/suspension":
251     $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1suspension"
252   /ill/backends:
253     $ref: ./paths/ill_backends.yaml#/~1ill~1backends
254   "/ill/backends/{ill_backend_id}":
255     $ref: "./paths/ill_backends.yaml#/~1ill~1backends~1{ill_backend_id}"
256   /ill/requests:
257     $ref: ./paths/ill_requests.yaml#/~1ill~1requests
258   "/import_batches/{import_batch_id}/records/{import_record_id}/matches/chosen":
259     $ref: "./paths/import_batches.yaml#/~1import_batches~1{import_batch_id}~1records~1{import_record_id}~1matches~1chosen"
260   /import_batch_profiles:
261     $ref: ./paths/import_batch_profiles.yaml#/~1import_batch_profiles
262   "/import_batch_profiles/{import_batch_profile_id}":
263     $ref: "./paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}"
264   /items:
265     $ref: ./paths/items.yaml#/~1items
266   "/items/{item_id}":
267     $ref: "./paths/items.yaml#/~1items~1{item_id}"
268   "/items/{item_id}/bundled_items":
269     $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items
270   "/items/{item_id}/bundled_items/{bundled_item_id}":
271     $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items~1{bundled_item_id}
272   "/items/{item_id}/pickup_locations":
273     $ref: "./paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
274   /jobs:
275     $ref: ./paths/jobs.yaml#/~1jobs
276   "/jobs/{job_id}":
277     $ref: "./paths/jobs.yaml#/~1jobs~1{job_id}"
278   /libraries:
279     $ref: ./paths/libraries.yaml#/~1libraries
280   "/libraries/{library_id}":
281     $ref: "./paths/libraries.yaml#/~1libraries~1{library_id}"
282   /oauth/token:
283     $ref: ./paths/oauth.yaml#/~1oauth~1token
284   /patrons:
285     $ref: ./paths/patrons.yaml#/~1patrons
286   "/patrons/{patron_id}":
287     $ref: "./paths/patrons.yaml#/~1patrons~1{patron_id}"
288   "/patrons/{patron_id}/account":
289     $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account"
290   "/patrons/{patron_id}/account/credits":
291     $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits"
292   "/patrons/{patron_id}/account/debits":
293     $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1debits"
294   "/patrons/{patron_id}/extended_attributes":
295     $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes"
296   "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
297     $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}"
298   "/patrons/{patron_id}/holds":
299     $ref: "./paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds"
300   "/patrons/{patron_id}/password":
301     $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
302   "/patrons/{patron_id}/password/expiration_date":
303     $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
304   "/public/biblios/{biblio_id}":
305     $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
306   "/public/items":
307     $ref: "./paths/items.yaml#/~1public~1items"
308   "/public/biblios/{biblio_id}/items":
309     $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items"
310   "/public/biblios/{biblio_id}/ratings":
311     $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1ratings"
312   /public/libraries:
313     $ref: ./paths/libraries.yaml#/~1public~1libraries
314   "/public/libraries/{library_id}":
315     $ref: "./paths/libraries.yaml#/~1public~1libraries~1{library_id}"
316   "/public/oauth/login/{provider_code}/{interface}":
317     $ref: ./paths/public_oauth.yaml#/~1public~1oauth~1login~1{provider_code}~1{interface}
318   "/public/patrons/{patron_id}/article_requests/{article_request_id}":
319     $ref: "./paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}"
320   "/public/patrons/{patron_id}/guarantors/can_see_charges":
321     $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges"
322   "/public/patrons/{patron_id}/guarantors/can_see_checkouts":
323     $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts"
324   "/public/patrons/{patron_id}/password":
325     $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
326   "/public/tickets":
327     $ref: "./paths/tickets.yaml#/~1public~1tickets"
328   /quotes:
329     $ref: ./paths/quotes.yaml#/~1quotes
330   "/quotes/{quote_id}":
331     $ref: "./paths/quotes.yaml#/~1quotes~1{quote_id}"
332   /return_claims:
333     $ref: ./paths/return_claims.yaml#/~1return_claims
334   "/return_claims/{claim_id}":
335     $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}"
336   "/return_claims/{claim_id}/notes":
337     $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes"
338   "/return_claims/{claim_id}/resolve":
339     $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve"
340   "/rotas/{rota_id}/stages/{stage_id}/position":
341     $ref: "./paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position"
342   /suggestions:
343     $ref: ./paths/suggestions.yaml#/~1suggestions
344   "/suggestions/{suggestion_id}":
345     $ref: "./paths/suggestions.yaml#/~1suggestions~1{suggestion_id}"
346   /suggestions/managers:
347     $ref: paths/suggestions.yaml#/~1suggestions~1managers
348   "/tickets":
349     $ref: "./paths/tickets.yaml#/~1tickets"
350   "/tickets/{ticket_id}":
351     $ref: "./paths/tickets.yaml#/~1tickets~1{ticket_id}"
352   "/tickets/{ticket_id}/updates":
353     $ref: "./paths/tickets.yaml#/~1tickets~1{ticket_id}~1updates"
354   /transfer_limits:
355     $ref: ./paths/transfer_limits.yaml#/~1transfer_limits
356   /transfer_limits/batch:
357     $ref: ./paths/transfer_limits.yaml#/~1transfer_limits~1batch
358   "/transfer_limits/{limit_id}":
359     $ref: "./paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
360 parameters:
361   advancededitormacro_id_pp:
362     description: Advanced editor macro internal identifier
363     in: path
364     name: advancededitormacro_id
365     required: true
366     type: integer
367   agreement_id_pp:
368     description: Agreement internal identifier
369     in: path
370     name: agreement_id
371     required: true
372     type: integer
373   agreement_period_id_pp:
374     description: Agreement period internal identifier
375     in: path
376     name: agreement_period_id
377     required: true
378     type: integer
379   authorised_value_id_pp:
380     description: Authorised value internal identifier
381     in: path
382     name: authorised_value_id
383     required: true
384     type: integer
385   authority_id_pp:
386     description: Authority identifier
387     in: path
388     name: authority_id
389     required: true
390     type: integer
391   authority_type_header:
392     description: Authority type code. Use when content type is not application/json
393     name: x-authority-type
394     in: header
395     required: false
396     type: string
397   framework_id_header:
398     description: Framework id. Use when content type is not application/json
399     name: x-framework-id
400     in: header
401     required: false
402     type: string
403   marc_schema_header:
404     description: March schema. One of MARC21 or UNIMARC
405     name: x-record-schema
406     in: header
407     required: false
408     type: string
409     enum:
410       - MARC21
411       - UNIMARC
412   confirm_not_duplicate_header:
413     description: Confirm the posted element is not a duplicate
414     name: x-confirm-not-duplicate
415     in: header
416     required: false
417     type: integer
418   identity_provider_id_pp:
419     description: Authentication provider internal identifier
420     in: path
421     name: identity_provider_id
422     required: true
423     type: integer
424   identity_provider_domain_id_pp:
425     description: Authentication provider domain internal identifier
426     in: path
427     name: identity_provider_domain_id
428     required: true
429     type: integer
430   biblio_id_pp:
431     description: Record internal identifier
432     in: path
433     name: biblio_id
434     required: true
435     type: integer
436   candidate_match_id_pp:
437     description: Internal import record match identifier
438     in: path
439     name: candidate_match_id
440     required: true
441     type: integer
442   cash_register_id_pp:
443     description: Cash register internal identifier
444     in: path
445     name: cash_register_id
446     required: true
447     type: integer
448   cashup_id_pp:
449     description: Cashup internal identifier
450     in: path
451     name: cashup_id
452     required: true
453     type: integer
454   checkout_id_pp:
455     description: Internal checkout identifier
456     in: path
457     name: checkout_id
458     required: true
459     type: integer
460   city_id_pp:
461     description: City internal identifier
462     in: path
463     name: city_id
464     required: true
465     type: integer
466   club_id_pp:
467     description: Internal club identifier
468     in: path
469     name: club_id
470     required: true
471     type: integer
472   eholdings_title_id_pp:
473     description: Title internal identifier
474     in: path
475     name: title_id
476     required: true
477     type: integer
478   eholdings_package_id_pp:
479     description: Package internal identifier
480     in: path
481     name: package_id
482     required: true
483     type: string
484   eholdings_resource_id_pp:
485     description: Resource internal identifier
486     in: path
487     name: resource_id
488     required: true
489     type: string
490   fund_id_pp:
491     description: Fund id
492     in: path
493     name: fund_id
494     required: true
495     type: integer
496   hold_id_pp:
497     description: Internal hold identifier
498     in: path
499     name: hold_id
500     required: true
501     type: integer
502   import_batch_profile_id_pp:
503     description: Internal profile identifier
504     in: path
505     name: import_batch_profile_id
506     required: true
507     type: integer
508   import_record_id_pp:
509     description: Internal import record identifier
510     in: path
511     name: import_record_id
512     required: true
513     type: integer
514   item_id_pp:
515     description: Internal item identifier
516     in: path
517     name: item_id
518     required: true
519     type: integer
520   job_id_pp:
521     description: Job internal identifier
522     in: path
523     name: job_id
524     required: true
525     type: integer
526   library_id_pp:
527     description: Internal library identifier
528     in: path
529     name: library_id
530     required: true
531     type: string
532   license_id_pp:
533     description: License internal identifier
534     in: path
535     name: license_id
536     required: true
537     type: integer
538   match:
539     description: Matching criteria
540     enum:
541       - contains
542       - exact
543       - starts_with
544       - ends_with
545     in: query
546     name: _match
547     required: false
548     type: string
549   order_by:
550     collectionFormat: csv
551     description: Sorting criteria
552     in: query
553     items:
554       type: string
555     name: _order_by
556     required: false
557     type: array
558   order_id_pp:
559     description: Internal order identifier
560     in: path
561     name: order_id
562     required: true
563     type: integer
564   page:
565     description: "Page number, for paginated object listing"
566     in: query
567     name: _page
568     required: false
569     type: integer
570   patron_id_pp:
571     description: Internal patron identifier
572     in: path
573     name: patron_id
574     required: true
575     type: integer
576   patron_id_qp:
577     description: Internal patron identifier
578     in: query
579     name: patron_id
580     type: integer
581   per_page:
582     description: "Page size, for paginated object listing"
583     in: query
584     name: _per_page
585     required: false
586     type: integer
587   q_body:
588     description: Query filter sent through request"s body
589     in: body
590     name: query
591     required: false
592     schema:
593       type: object
594   q_header:
595     description: Query filter sent as a request header
596     in: header
597     name: x-koha-query
598     required: false
599     type: string
600   q_param:
601     description: Query filter sent as a request parameter
602     in: query
603     name: q
604     required: false
605     type: array
606     items:
607       type: string
608     collectionFormat: multi
609   quote_id_pp:
610     description: Quote internal identifier
611     in: path
612     name: quote_id
613     required: true
614     type: integer
615   request_id_header:
616     description: Request id header
617     in: header
618     name: x-koha-request-id
619     required: false
620     type: integer
621   search_filter_id_pp:
622     name: search_filter_id
623     in: path
624     description: Search filter internal identifier
625     required: true
626     type: integer
627   seen_pp:
628     description: Item was seen flag
629     in: query
630     name: seen
631     required: false
632     type: integer
633   smtp_server_id_pp:
634     description: SMTP server internal identifier
635     in: path
636     name: smtp_server_id
637     required: true
638     type: integer
639   suggestion_id_pp:
640     description: Internal suggestion identifier
641     in: path
642     name: suggestion_id
643     required: true
644     type: integer
645   ticket_id_pp:
646     description: Internal ticket identifier
647     in: path
648     name: ticket_id
649     required: true
650     type: integer
651   transfer_limit_id_pp:
652     description: Internal transfer limit identifier
653     in: path
654     name: limit_id
655     required: true
656     type: string
657   vendor_id_pp:
658     description: Vendor id
659     in: path
660     name: vendor_id
661     required: true
662     type: integer
663 info:
664   title: Koha REST API
665   version: "1"
666   license:
667     name: "GPL v3,"
668     url: http://www.gnu.org/licenses/gpl.txt
669   contact:
670     name: Koha Development Team
671     url: https://koha-community.org/
672   description: |
673     ## Introduction
674
675     This API is documented in **OpenAPI format**.
676
677     ## Authentication
678
679     The API supports the following authentication mechanisms
680
681     * HTTP Basic authentication
682     * OAuth2 (client credentials grant)
683     * Cookie-based
684
685     Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
686     by system preferences.
687
688     ## Errors
689
690     The API uses standard HTTP status codes to indicate the success or failure
691     of the API call. The body of the response will be JSON in the following format:
692
693     ```
694     {
695       "error": "Current settings prevent the passed due date to be applied",
696       "error_code": "invalid_due_date"
697     }
698     ```
699
700     Note: Some routes might offer additional attributes in their error responses but that"s
701     subject to change and thus not documented.
702
703     ## Filtering responses
704
705     The API allows for some advanced response filtering using a JSON based query syntax. The
706     query can be added to the requests:
707
708     * as a query parameter `q=`
709     * in the request body
710     * in a special header `x-koha-query`
711
712     For simple field equality matches we can use `{ "fieldname": "value" }` where the fieldname
713     matches one of the fields as described in the particular endpoints response object.
714
715     We can refine that with more complex matching clauses by nesting a the clause into the
716     object; `{ "fieldname": { "clause": "value" } }`.
717
718     Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
719
720     We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
721     level will result in an "AND" query, whilst combinding them in an `ARRAY` wilth result in an
722     "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
723     results with both field1 containing value2 AND field2 containing value2 for example.
724
725     Additionally, if you are requesting related data be embedded into the response one can query
726     on the related data using dot notation in the field names.
727
728     ### Examples
729
730     The following request would return any patron with firstname "Henry" and lastname "Acevedo";
731
732     `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": "Acevedo", "firstname": "Henry" }"`
733
734     The following request would return any patron whose lastname begins with "Ace";
735
736     `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
737
738     The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
739
740     `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
741
742     The following request embeds the related patron extended attributes data and filters on it.
743
744     `curl -u koha:koha =--request GET 'http://127.0.0.1:8081/api/v1/patrons/' --header 'x-koha-embed: extended_attributes' --data-raw '{ "extended_attributes.code": "internet", "extended_attributes.attribute": "1" }'`
745
746     ## Special headers
747
748     ### x-koha-embed
749
750     This optional header allows the api consumer to request additional related data
751     to be returned in the api response.  It also allows for cross referencing in the
752     queries as described above. It accepts a comma delimited list of relation names.
753
754     Relations may on occasion also support dot delimited nesting to allow traversal.
755
756     ### x-koha-library
757
758     This optional header should be passed to give your api request a library
759     context; If it is not included in the request, then the request context
760     will default to using your api comsumer"s assigned home library.
761 tags:
762   - description: "Handle two factor authentication flows\n"
763     name: 2fa
764     x-displayName: Two factor authentication
765   - description: "Manage article requests\n"
766     name: article_requests
767     x-displayName: Article requests
768   - description: "Manage identity providers\n"
769     name: identity_providers
770     x-displayName: Identity providers
771   - description: "Manage baskets for the acquisitions module\n"
772     name: baskets
773     x-displayName: Baskets
774   - description: "Manage Authority records\n"
775     name: authorities
776     x-displayName: Authorities
777   - description: "Manage bibliographic records\n"
778     name: biblios
779     x-displayName: Biblios
780   - description: "Manage cash register cashups\n"
781     name: cashups
782     x-displayName: Cashups
783   - description: "Manage checkouts\n"
784     name: checkouts
785     x-displayName: Checkouts
786   - description: "Manage circulation rules\n"
787     name: circulation_rules
788     x-displayName: Circulation rules
789   - description: "Manage cities\n"
790     name: cities
791     x-displayName: Cities
792   - description: "Manage patron clubs\n"
793     name: clubs
794     x-displayName: Clubs
795   - description: "Manage funds for the acquisitions module\n"
796     name: funds
797     x-displayName: Funds
798   - description: "Manage holds\n"
799     name: holds
800     x-displayName: Holds
801   - description: "Manage ILL module backends\n"
802     name: ill_backends
803     x-displayName: ILL backends
804   - description: "Manage ILL requests\n"
805     name: ill_requests
806     x-displayName: ILL requests
807   - description: "Manage import batches\n"
808     name: import_batches
809     x-display-name: Import batches
810   - description: "Manage item groups\n"
811     name: item_groups
812     x-displayName: Item groups
813   - description: "Manage items\n"
814     name: items
815     x-displayName: Items
816   - description: "Manage jobs\n"
817     name: jobs
818     x-displayName: Jobs
819   - description: "Manage libraries\n"
820     name: libraries
821     x-displayName: Libraries
822   - description: "Manage macros\n"
823     name: macros
824     x-displayName: Macros
825   - description: "Manage acquisition orders\n"
826     name: orders
827     x-displayName: Orders
828   - description: "Handle OAuth flows\n"
829     name: oauth
830     x-displayName: OAuth
831   - description: "Manage patrons\n"
832     name: patrons
833     x-displayName: Patrons
834   - description: "Manage quotes\n"
835     name: quotes
836     x-displayName: Quotes
837   - description: "Manage return claims\n"
838     name: return_claims
839     x-displayName: Return claims
840   - description: "Manage rotas\n"
841     name: rotas
842     x-displayName: Rotas
843   - description: "Manage SMTP servers configurations\n"
844     name: smtp_servers
845     x-displayName: SMTP servers
846   - description: "Manage transfer limits\n"
847     name: transfer
848     x-displayName: Transfer limits
849   - description: "Manage purchase suggestions\n"
850     name: suggestions
851     x-displayName: Purchase suggestions
852   - description: "Manage vendors for the acquisitions module\n"
853     name: vendors
854     x-displayName: Vendors
855   - description: "Manage batch import profiles\n"
856     name: batch_import_profiles
857     x-displayName: Batch import profiles