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