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