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