6 $ref: ./definitions/account_line.yaml
8 $ref: ./definitions/advancededitormacro.yaml
10 $ref: ./definitions/allows_renewal.yaml
12 $ref: ./definitions/basket.yaml
14 $ref: ./definitions/bundle_link.yaml
16 $ref: ./definitions/cashup.yaml
18 $ref: ./definitions/checkout.yaml
20 $ref: ./definitions/checkouts.yaml
22 $ref: ./definitions/circ-rule-kind.yaml
24 $ref: ./definitions/city.yaml
26 $ref: ./definitions/error.yaml
28 $ref: ./definitions/fund.yaml
30 $ref: ./definitions/hold.yaml
32 $ref: ./definitions/holds.yaml
34 $ref: ./definitions/ill_backend.yaml
36 $ref: ./definitions/ill_backends.yaml
38 $ref: ./definitions/import_batch_profile.yaml
39 import_batch_profiles:
40 $ref: ./definitions/import_batch_profiles.yaml
42 $ref: ./definitions/import_record_match.yaml
44 $ref: ./definitions/invoice.yaml
46 $ref: ./definitions/item.yaml
48 $ref: ./definitions/item_group.yaml
50 $ref: ./definitions/library.yaml
52 $ref: ./definitions/order.yaml
54 $ref: ./definitions/patron.yaml
55 patron_account_credit:
56 $ref: ./definitions/patron_account_credit.yaml
58 $ref: ./definitions/patron_balance.yaml
59 patron_extended_attribute:
60 $ref: ./definitions/patron_extended_attribute.yaml
62 $ref: ./definitions/quote.yaml
64 $ref: ./definitions/renewal.yaml
66 $ref: ./definitions/renewals.yaml
68 $ref: ./definitions/return_claim.yaml
70 $ref: ./definitions/smtp_server.yaml
72 $ref: ./definitions/suggestion.yaml
74 $ref: ./definitions/transfer_limit.yaml
76 $ref: ./definitions/vendor.yaml
78 /acquisitions/baskets/managers:
79 $ref: paths/acquisitions_baskets.yaml#/~1acquisitions~1baskets~1managers
81 $ref: ./paths/acquisitions_funds.yaml#/~1acquisitions~1funds
82 /acquisitions/funds/owners:
83 $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1owners
84 /acquisitions/funds/users:
85 $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1users
87 $ref: ./paths/acquisitions_orders.yaml#/~1acquisitions~1orders
88 "/acquisitions/orders/{order_id}":
89 $ref: "./paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id}"
90 /acquisitions/vendors:
91 $ref: ./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors
92 "/acquisitions/vendors/{vendor_id}":
93 $ref: "./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}"
94 /advanced_editor/macros:
95 $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros
96 /advanced_editor/macros/shared:
97 $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
98 "/advanced_editor/macros/shared/{advancededitormacro_id}":
99 $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}"
100 "/advanced_editor/macros/{advancededitormacro_id}":
101 $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
102 "/article_requests/{article_request_id}":
103 $ref: "./paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
104 /auth/otp/token_delivery:
105 $ref: paths/auth.yaml#/~1auth~1otp~1token_delivery
106 "/biblios/{biblio_id}":
107 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
108 "/biblios/{biblio_id}/checkouts":
109 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts"
110 "/biblios/{biblio_id}/items":
111 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1items"
112 "/biblios/{biblio_id}/pickup_locations":
113 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations"
114 "/biblios/{biblio_id}/item_groups":
115 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups"
116 "/biblios/{biblio_id}/item_groups/{item_group_id}":
117 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}"
118 "/biblios/{biblio_id}/item_groups/{item_group_id}/items":
119 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items"
120 "/biblios/{biblio_id}/item_groups/{item_group_id}/items/{item_id}":
121 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items~1{item_id}"
122 "/cash_registers/{cash_register_id}/cashups":
123 $ref: "./paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups"
124 "/cashups/{cashup_id}":
125 $ref: "./paths/cash_registers.yaml#/~1cashups~1{cashup_id}"
127 $ref: ./paths/checkouts.yaml#/~1checkouts
128 "/checkouts/{checkout_id}":
129 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}"
130 "/checkouts/{checkout_id}/allows_renewal":
131 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal"
132 "/checkouts/{checkout_id}/renewals":
133 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewals"
134 "/checkouts/{checkout_id}/renewal":
135 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal"
136 /circulation-rules/kinds:
137 $ref: ./paths/circulation-rules.yaml#/~1circulation-rules~1kinds
139 $ref: ./paths/cities.yaml#/~1cities
141 $ref: "./paths/cities.yaml#/~1cities~1{city_id}"
142 "/clubs/{club_id}/holds":
143 $ref: "./paths/clubs.yaml#/~1clubs~1{club_id}~1holds"
144 /config/smtp_servers:
145 $ref: ./paths/config_smtp_servers.yaml#/~1config~1smtp_servers
146 "/config/smtp_servers/{smtp_server_id}":
147 $ref: "./paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}"
149 $ref: ./paths/holds.yaml#/~1holds
151 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}"
152 "/holds/{hold_id}/pickup_location":
153 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location"
154 "/holds/{hold_id}/pickup_locations":
155 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations"
156 "/holds/{hold_id}/priority":
157 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1priority"
158 "/holds/{hold_id}/suspension":
159 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1suspension"
161 $ref: ./paths/ill_backends.yaml#/~1ill_backends
162 "/ill_backends/{ill_backend_id}":
163 $ref: "./paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}"
165 $ref: ./paths/illrequests.yaml#/~1illrequests
166 "/import_batches/{import_batch_id}/records/{import_record_id}/matches/chosen":
167 $ref: "./paths/import_batches.yaml#/~1import_batches~1{import_batch_id}~1records~1{import_record_id}~1matches~1chosen"
168 /import_batch_profiles:
169 $ref: ./paths/import_batch_profiles.yaml#/~1import_batch_profiles
170 "/import_batch_profiles/{import_batch_profile_id}":
171 $ref: "./paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}"
173 $ref: ./paths/items.yaml#/~1items
175 $ref: "./paths/items.yaml#/~1items~1{item_id}"
176 "/items/{item_id}/bundled_items":
177 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items
178 "/items/{item_id}/bundled_items/{bundled_item_id}":
179 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items~1{bundled_item_id}
180 "/items/{item_id}/pickup_locations":
181 $ref: "./paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
183 $ref: ./paths/libraries.yaml#/~1libraries
184 "/libraries/{library_id}":
185 $ref: "./paths/libraries.yaml#/~1libraries~1{library_id}"
187 $ref: ./paths/oauth.yaml#/~1oauth~1token
189 $ref: ./paths/patrons.yaml#/~1patrons
190 "/patrons/{patron_id}":
191 $ref: "./paths/patrons.yaml#/~1patrons~1{patron_id}"
192 "/patrons/{patron_id}/account":
193 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account"
194 "/patrons/{patron_id}/account/credits":
195 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits"
196 "/patrons/{patron_id}/extended_attributes":
197 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes"
198 "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
199 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}"
200 "/patrons/{patron_id}/holds":
201 $ref: "./paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds"
202 "/patrons/{patron_id}/password":
203 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
204 "/patrons/{patron_id}/password/expiration_date":
205 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
206 "/public/biblios/{biblio_id}":
207 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
208 "/public/biblios/{biblio_id}/items":
209 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items"
210 "/public/biblios/{biblio_id}/ratings":
211 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1ratings"
213 $ref: ./paths/libraries.yaml#/~1public~1libraries
214 "/public/libraries/{library_id}":
215 $ref: "./paths/libraries.yaml#/~1public~1libraries~1{library_id}"
216 "/public/patrons/{patron_id}/article_requests/{article_request_id}":
217 $ref: "./paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}"
218 "/public/patrons/{patron_id}/guarantors/can_see_charges":
219 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges"
220 "/public/patrons/{patron_id}/guarantors/can_see_checkouts":
221 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts"
222 "/public/patrons/{patron_id}/password":
223 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
225 $ref: ./paths/quotes.yaml#/~1quotes
226 "/quotes/{quote_id}":
227 $ref: "./paths/quotes.yaml#/~1quotes~1{quote_id}"
229 $ref: ./paths/return_claims.yaml#/~1return_claims
230 "/return_claims/{claim_id}":
231 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}"
232 "/return_claims/{claim_id}/notes":
233 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes"
234 "/return_claims/{claim_id}/resolve":
235 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve"
236 "/rotas/{rota_id}/stages/{stage_id}/position":
237 $ref: "./paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position"
239 $ref: ./paths/suggestions.yaml#/~1suggestions
240 "/suggestions/{suggestion_id}":
241 $ref: "./paths/suggestions.yaml#/~1suggestions~1{suggestion_id}"
242 /suggestions/managers:
243 $ref: paths/suggestions.yaml#/~1suggestions~1managers
245 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits
246 /transfer_limits/batch:
247 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits~1batch
248 "/transfer_limits/{limit_id}":
249 $ref: "./paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
251 advancededitormacro_id_pp:
252 description: Advanced editor macro internal identifier
254 name: advancededitormacro_id
258 description: Record internal identifier
263 candidate_match_id_pp:
264 description: Internal import record match identifier
266 name: candidate_match_id
270 description: Cash register internal identifier
272 name: cash_register_id
276 description: Cashup internal identifier
282 description: Internal checkout identifier
288 description: City internal identifier
294 description: Internal club identifier
306 description: Internal hold identifier
311 import_batch_profile_id_pp:
312 description: Internal profile identifier
314 name: import_batch_profile_id
318 description: Internal import record identifier
320 name: import_record_id
324 description: Internal item identifier
330 description: Internal library identifier
336 description: Matching criteria
347 collectionFormat: csv
348 description: Sorting criteria
356 description: Internal order identifier
362 description: "Page number, for paginated object listing"
368 description: Internal patron identifier
374 description: Internal patron identifier
379 description: "Page size, for paginated object listing"
385 description: Query filter sent through request"s body
392 description: Query filter sent as a request header
398 description: Query filter sent as a request parameter
405 collectionFormat: multi
407 description: Quote internal identifier
413 description: Request id header
415 name: x-koha-request-id
419 description: Item was seen flag
425 description: SMTP server internal identifier
431 description: Internal suggestion identifier
436 transfer_limit_id_pp:
437 description: Internal transfer limit identifier
443 description: Vendor id
453 url: http://www.gnu.org/licenses/gpl.txt
455 name: Koha Development Team
456 url: https://koha-community.org/
460 This API is documented in **OpenAPI format**.
464 The API supports the following authentication mechanisms
466 * HTTP Basic authentication
467 * OAuth2 (client credentials grant)
470 Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
471 by system preferences.
475 The API uses standard HTTP status codes to indicate the success or failure
476 of the API call. The body of the response will be JSON in the following format:
480 "error": "Current settings prevent the passed due date to be applied",
481 "error_code": "invalid_due_date"
485 Note: Some routes might offer additional attributes in their error responses but that"s
486 subject to change and thus not documented.
488 ## Filtering responses
490 The API allows for some advanced response filtering using a JSON based query syntax. The
491 query can be added to the requests:
493 * as a query parameter `q=`
494 * in the request body
495 * in a special header `x-koha-query`
497 For simple field equality matches we can use `{ "fieldname": "value" }` where the fieldname
498 matches one of the fields as described in the particular endpoints response object.
500 We can refine that with more complex matching clauses by nesting a the clause into the
501 object; `{ "fieldname": { "clause": "value" } }`.
503 Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
505 We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
506 level will result in an "AND" query, whilst combinding them in an `ARRAY` wilth result in an
507 "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
508 results with both field1 containing value2 AND field2 containing value2 for example.
510 Additionally, if you are requesting related data be embedded into the response one can query
511 on the related data using dot notation in the field names.
515 The following request would return any patron with firstname "Henry" and lastname "Acevedo";
517 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": "Acevedo", "firstname": "Henry" }"`
519 The following request would return any patron whose lastname begins with "Ace";
521 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
523 The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
525 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
527 The following request embeds the related patron extended attributes data and filters on it.
529 `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" }'`
535 This optional header allows the api consumer to request additional related data
536 to be returned in the api response. It also allows for cross referencing in the
537 queries as described above. It accepts a comma delimited list of relation names.
539 Relations may on occasion also support dot delimited nesting to allow traversal.
543 This optional header should be passed to give your api request a library
544 context; If it is not included in the request, then the request context
545 will default to using your api comsumer"s assigned home library.
547 - description: "Handle two factor authentication flows\n"
549 x-displayName: Two factor authentication
550 - description: "Manage article requests\n"
551 name: article_requests
552 x-displayName: Article requests
553 - description: "Manage baskets for the acquisitions module\n"
555 x-displayName: Baskets
556 - description: "Manage bibliographic records\n"
558 x-displayName: Biblios
559 - description: "Manage cash register cashups\n"
561 x-displayName: Cashups
562 - description: "Manage checkouts\n"
564 x-displayName: Checkouts
565 - description: "Manage circulation rules\n"
566 name: circulation_rules
567 x-displayName: Circulation rules
568 - description: "Manage cities\n"
570 x-displayName: Cities
571 - description: "Manage patron clubs\n"
574 - description: "Manage funds for the acquisitions module\n"
577 - description: "Manage holds\n"
580 - description: "Manage ILL module backends\n"
582 x-displayName: ILL backends
583 - description: "Manage ILL requests\n"
585 x-displayName: ILL requests
586 - description: "Manage import batches\n"
588 x-display-name: Import batches
589 - description: "Manage item groups\n"
591 x-displayName: Item groups
592 - description: "Manage items\n"
595 - description: "Manage libraries\n"
597 x-displayName: Libraries
598 - description: "Manage macros\n"
600 x-displayName: Macros
601 - description: "Manage acquisition orders\n"
603 x-displayName: Orders
604 - description: "Handle OAuth flows\n"
607 - description: "Manage patrons\n"
609 x-displayName: Patrons
610 - description: "Manage quotes\n"
612 x-displayName: Quotes
613 - description: "Manage return claims\n"
615 x-displayName: Return claims
616 - description: "Manage rotas\n"
619 - description: "Manage SMTP servers configurations\n"
621 x-displayName: SMTP servers
622 - description: "Manage transfer limits\n"
624 x-displayName: Transfer limits
625 - description: "Manage purchase suggestions\n"
627 x-displayName: Purchase suggestions
628 - description: "Manage vendors for the acquisitions module\n"
630 x-displayName: Vendors
631 - description: "Manage batch import profiles\n"
632 name: batch_import_profiles
633 x-displayName: Batch import profiles