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