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/erm_agreement.yaml
28 $ref: ./definitions/erm_license.yaml
30 $ref: ./definitions/erm_package.yaml
32 $ref: ./definitions/error.yaml
34 $ref: ./definitions/fund.yaml
36 $ref: ./definitions/hold.yaml
38 $ref: ./definitions/holds.yaml
40 $ref: ./definitions/ill_backend.yaml
42 $ref: ./definitions/ill_backends.yaml
44 $ref: ./definitions/import_batch_profile.yaml
45 import_batch_profiles:
46 $ref: ./definitions/import_batch_profiles.yaml
48 $ref: ./definitions/import_record_match.yaml
50 $ref: ./definitions/invoice.yaml
52 $ref: ./definitions/item.yaml
54 $ref: ./definitions/item_group.yaml
56 $ref: ./definitions/job.yaml
58 $ref: ./definitions/library.yaml
60 $ref: ./definitions/order.yaml
62 $ref: ./definitions/patron.yaml
63 patron_account_credit:
64 $ref: ./definitions/patron_account_credit.yaml
66 $ref: ./definitions/patron_balance.yaml
67 patron_extended_attribute:
68 $ref: ./definitions/patron_extended_attribute.yaml
70 $ref: ./definitions/quote.yaml
72 $ref: ./definitions/renewal.yaml
74 $ref: ./definitions/renewals.yaml
76 $ref: ./definitions/return_claim.yaml
78 $ref: ./definitions/search_filter.yaml
80 $ref: ./definitions/smtp_server.yaml
82 $ref: ./definitions/suggestion.yaml
84 $ref: ./definitions/transfer_limit.yaml
86 $ref: ./definitions/vendor.yaml
88 /acquisitions/baskets/managers:
89 $ref: paths/acquisitions_baskets.yaml#/~1acquisitions~1baskets~1managers
91 $ref: ./paths/acquisitions_funds.yaml#/~1acquisitions~1funds
92 /acquisitions/funds/owners:
93 $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1owners
94 /acquisitions/funds/users:
95 $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1users
97 $ref: ./paths/acquisitions_orders.yaml#/~1acquisitions~1orders
98 "/acquisitions/orders/{order_id}":
99 $ref: "./paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id}"
100 /acquisitions/vendors:
101 $ref: ./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors
102 "/acquisitions/vendors/{vendor_id}":
103 $ref: "./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}"
104 /advanced_editor/macros:
105 $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros
106 /advanced_editor/macros/shared:
107 $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
109 $ref: ./paths/search_filters.yaml#/~1search_filters
110 "/search_filters/{search_filter_id}":
111 $ref: "./paths/search_filters.yaml#/~1search_filters~1{search_filter_id}"
112 "/advanced_editor/macros/shared/{advancededitormacro_id}":
113 $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}"
114 "/advanced_editor/macros/{advancededitormacro_id}":
115 $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
116 "/article_requests/{article_request_id}":
117 $ref: "./paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
118 /auth/otp/token_delivery:
119 $ref: paths/auth.yaml#/~1auth~1otp~1token_delivery
120 /auth/two-factor/registration:
121 $ref: paths/auth.yaml#/~1auth~1two-factor~1registration
122 /auth/two-factor/registration/verification:
123 $ref: paths/auth.yaml#/~1auth~1two-factor~1registration~1verification
124 "/biblios/{biblio_id}":
125 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
126 "/biblios/{biblio_id}/checkouts":
127 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts"
128 "/biblios/{biblio_id}/items":
129 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1items"
130 "/biblios/{biblio_id}/pickup_locations":
131 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations"
132 "/biblios/{biblio_id}/item_groups":
133 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups"
134 "/biblios/{biblio_id}/item_groups/{item_group_id}":
135 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}"
136 "/biblios/{biblio_id}/item_groups/{item_group_id}/items":
137 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items"
138 "/biblios/{biblio_id}/item_groups/{item_group_id}/items/{item_id}":
139 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items~1{item_id}"
140 "/cash_registers/{cash_register_id}/cashups":
141 $ref: "./paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups"
142 "/cashups/{cashup_id}":
143 $ref: "./paths/cash_registers.yaml#/~1cashups~1{cashup_id}"
145 $ref: ./paths/checkouts.yaml#/~1checkouts
146 "/checkouts/{checkout_id}":
147 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}"
148 "/checkouts/{checkout_id}/allows_renewal":
149 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal"
150 "/checkouts/{checkout_id}/renewals":
151 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewals"
152 "/checkouts/{checkout_id}/renewal":
153 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal"
154 /circulation-rules/kinds:
155 $ref: ./paths/circulation-rules.yaml#/~1circulation-rules~1kinds
157 $ref: ./paths/cities.yaml#/~1cities
159 $ref: "./paths/cities.yaml#/~1cities~1{city_id}"
160 "/clubs/{club_id}/holds":
161 $ref: "./paths/clubs.yaml#/~1clubs~1{club_id}~1holds"
162 /config/smtp_servers:
163 $ref: ./paths/config_smtp_servers.yaml#/~1config~1smtp_servers
164 "/config/smtp_servers/{smtp_server_id}":
165 $ref: "./paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}"
167 $ref: ./paths/erm_agreements.yaml#/~1erm~1agreements
168 "/erm/agreements/{agreement_id}":
169 $ref: "./paths/erm_agreements.yaml#/~1erm~1agreements~1{agreement_id}"
171 $ref: ./paths/erm_licenses.yaml#/~1erm~1licenses
172 "/erm/licenses/{license_id}":
173 $ref: "./paths/erm_licenses.yaml#/~1erm~1licenses~1{license_id}"
175 $ref: ./paths/erm_packages.yaml#/~1erm~1packages
176 "/erm/packages/{package_id}":
177 $ref: "./paths/erm_packages.yaml#/~1erm~1packages~1{package_id}"
179 $ref: ./paths/erm_users.yaml#/~1erm~1users
181 $ref: ./paths/holds.yaml#/~1holds
183 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}"
184 "/holds/{hold_id}/pickup_location":
185 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location"
186 "/holds/{hold_id}/pickup_locations":
187 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations"
188 "/holds/{hold_id}/priority":
189 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1priority"
190 "/holds/{hold_id}/suspension":
191 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1suspension"
193 $ref: ./paths/ill_backends.yaml#/~1ill_backends
194 "/ill_backends/{ill_backend_id}":
195 $ref: "./paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}"
197 $ref: ./paths/illrequests.yaml#/~1illrequests
198 "/import_batches/{import_batch_id}/records/{import_record_id}/matches/chosen":
199 $ref: "./paths/import_batches.yaml#/~1import_batches~1{import_batch_id}~1records~1{import_record_id}~1matches~1chosen"
200 /import_batch_profiles:
201 $ref: ./paths/import_batch_profiles.yaml#/~1import_batch_profiles
202 "/import_batch_profiles/{import_batch_profile_id}":
203 $ref: "./paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}"
205 $ref: ./paths/items.yaml#/~1items
207 $ref: "./paths/items.yaml#/~1items~1{item_id}"
208 "/items/{item_id}/bundled_items":
209 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items
210 "/items/{item_id}/bundled_items/{bundled_item_id}":
211 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items~1{bundled_item_id}
212 "/items/{item_id}/pickup_locations":
213 $ref: "./paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
215 $ref: ./paths/jobs.yaml#/~1jobs
217 $ref: "./paths/jobs.yaml#/~1jobs~1{job_id}"
219 $ref: ./paths/libraries.yaml#/~1libraries
220 "/libraries/{library_id}":
221 $ref: "./paths/libraries.yaml#/~1libraries~1{library_id}"
223 $ref: ./paths/oauth.yaml#/~1oauth~1token
225 $ref: ./paths/patrons.yaml#/~1patrons
226 "/patrons/{patron_id}":
227 $ref: "./paths/patrons.yaml#/~1patrons~1{patron_id}"
228 "/patrons/{patron_id}/account":
229 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account"
230 "/patrons/{patron_id}/account/credits":
231 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits"
232 "/patrons/{patron_id}/extended_attributes":
233 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes"
234 "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
235 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}"
236 "/patrons/{patron_id}/holds":
237 $ref: "./paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds"
238 "/patrons/{patron_id}/password":
239 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
240 "/patrons/{patron_id}/password/expiration_date":
241 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
242 "/public/biblios/{biblio_id}":
243 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
244 "/public/biblios/{biblio_id}/items":
245 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items"
246 "/public/biblios/{biblio_id}/ratings":
247 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1ratings"
249 $ref: ./paths/libraries.yaml#/~1public~1libraries
250 "/public/libraries/{library_id}":
251 $ref: "./paths/libraries.yaml#/~1public~1libraries~1{library_id}"
252 "/public/patrons/{patron_id}/article_requests/{article_request_id}":
253 $ref: "./paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}"
254 "/public/patrons/{patron_id}/guarantors/can_see_charges":
255 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges"
256 "/public/patrons/{patron_id}/guarantors/can_see_checkouts":
257 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts"
258 "/public/patrons/{patron_id}/password":
259 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
261 $ref: ./paths/quotes.yaml#/~1quotes
262 "/quotes/{quote_id}":
263 $ref: "./paths/quotes.yaml#/~1quotes~1{quote_id}"
265 $ref: ./paths/return_claims.yaml#/~1return_claims
266 "/return_claims/{claim_id}":
267 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}"
268 "/return_claims/{claim_id}/notes":
269 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes"
270 "/return_claims/{claim_id}/resolve":
271 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve"
272 "/rotas/{rota_id}/stages/{stage_id}/position":
273 $ref: "./paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position"
275 $ref: ./paths/suggestions.yaml#/~1suggestions
276 "/suggestions/{suggestion_id}":
277 $ref: "./paths/suggestions.yaml#/~1suggestions~1{suggestion_id}"
278 /suggestions/managers:
279 $ref: paths/suggestions.yaml#/~1suggestions~1managers
281 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits
282 /transfer_limits/batch:
283 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits~1batch
284 "/transfer_limits/{limit_id}":
285 $ref: "./paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
287 advancededitormacro_id_pp:
288 description: Advanced editor macro internal identifier
290 name: advancededitormacro_id
294 description: Agreement internal identifier
299 agreement_period_id_pp:
300 description: Agreement period internal identifier
302 name: agreement_period_id
306 description: Record internal identifier
311 candidate_match_id_pp:
312 description: Internal import record match identifier
314 name: candidate_match_id
318 description: Cash register internal identifier
320 name: cash_register_id
324 description: Cashup internal identifier
330 description: Internal checkout identifier
336 description: City internal identifier
342 description: Internal club identifier
354 description: Internal hold identifier
359 import_batch_profile_id_pp:
360 description: Internal profile identifier
362 name: import_batch_profile_id
366 description: Internal import record identifier
368 name: import_record_id
372 description: Internal item identifier
378 description: Job internal identifier
384 description: Internal library identifier
390 description: License internal identifier
396 description: Matching criteria
407 collectionFormat: csv
408 description: Sorting criteria
416 description: Internal order identifier
422 description: Package internal identifier
428 description: "Page number, for paginated object listing"
434 description: Internal patron identifier
440 description: Internal patron identifier
445 description: "Page size, for paginated object listing"
451 description: Query filter sent through request"s body
458 description: Query filter sent as a request header
464 description: Query filter sent as a request parameter
471 collectionFormat: multi
473 description: Quote internal identifier
479 description: Request id header
481 name: x-koha-request-id
485 name: search_filter_id
487 description: Search filter internal identifier
491 description: Item was seen flag
497 description: SMTP server internal identifier
503 description: Internal suggestion identifier
508 transfer_limit_id_pp:
509 description: Internal transfer limit identifier
515 description: Vendor id
525 url: http://www.gnu.org/licenses/gpl.txt
527 name: Koha Development Team
528 url: https://koha-community.org/
532 This API is documented in **OpenAPI format**.
536 The API supports the following authentication mechanisms
538 * HTTP Basic authentication
539 * OAuth2 (client credentials grant)
542 Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
543 by system preferences.
547 The API uses standard HTTP status codes to indicate the success or failure
548 of the API call. The body of the response will be JSON in the following format:
552 "error": "Current settings prevent the passed due date to be applied",
553 "error_code": "invalid_due_date"
557 Note: Some routes might offer additional attributes in their error responses but that"s
558 subject to change and thus not documented.
560 ## Filtering responses
562 The API allows for some advanced response filtering using a JSON based query syntax. The
563 query can be added to the requests:
565 * as a query parameter `q=`
566 * in the request body
567 * in a special header `x-koha-query`
569 For simple field equality matches we can use `{ "fieldname": "value" }` where the fieldname
570 matches one of the fields as described in the particular endpoints response object.
572 We can refine that with more complex matching clauses by nesting a the clause into the
573 object; `{ "fieldname": { "clause": "value" } }`.
575 Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
577 We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
578 level will result in an "AND" query, whilst combinding them in an `ARRAY` wilth result in an
579 "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
580 results with both field1 containing value2 AND field2 containing value2 for example.
582 Additionally, if you are requesting related data be embedded into the response one can query
583 on the related data using dot notation in the field names.
587 The following request would return any patron with firstname "Henry" and lastname "Acevedo";
589 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": "Acevedo", "firstname": "Henry" }"`
591 The following request would return any patron whose lastname begins with "Ace";
593 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
595 The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
597 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
599 The following request embeds the related patron extended attributes data and filters on it.
601 `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" }'`
607 This optional header allows the api consumer to request additional related data
608 to be returned in the api response. It also allows for cross referencing in the
609 queries as described above. It accepts a comma delimited list of relation names.
611 Relations may on occasion also support dot delimited nesting to allow traversal.
615 This optional header should be passed to give your api request a library
616 context; If it is not included in the request, then the request context
617 will default to using your api comsumer"s assigned home library.
619 - description: "Handle two factor authentication flows\n"
621 x-displayName: Two factor authentication
622 - description: "Manage article requests\n"
623 name: article_requests
624 x-displayName: Article requests
625 - description: "Manage baskets for the acquisitions module\n"
627 x-displayName: Baskets
628 - description: "Manage bibliographic records\n"
630 x-displayName: Biblios
631 - description: "Manage cash register cashups\n"
633 x-displayName: Cashups
634 - description: "Manage checkouts\n"
636 x-displayName: Checkouts
637 - description: "Manage circulation rules\n"
638 name: circulation_rules
639 x-displayName: Circulation rules
640 - description: "Manage cities\n"
642 x-displayName: Cities
643 - description: "Manage patron clubs\n"
646 - description: "Manage funds for the acquisitions module\n"
649 - description: "Manage holds\n"
652 - description: "Manage ILL module backends\n"
654 x-displayName: ILL backends
655 - description: "Manage ILL requests\n"
657 x-displayName: ILL requests
658 - description: "Manage import batches\n"
660 x-display-name: Import batches
661 - description: "Manage item groups\n"
663 x-displayName: Item groups
664 - description: "Manage items\n"
667 - description: "Manage jobs\n"
670 - description: "Manage libraries\n"
672 x-displayName: Libraries
673 - description: "Manage macros\n"
675 x-displayName: Macros
676 - description: "Manage acquisition orders\n"
678 x-displayName: Orders
679 - description: "Handle OAuth flows\n"
682 - description: "Manage patrons\n"
684 x-displayName: Patrons
685 - description: "Manage quotes\n"
687 x-displayName: Quotes
688 - description: "Manage return claims\n"
690 x-displayName: Return claims
691 - description: "Manage rotas\n"
694 - description: "Manage SMTP servers configurations\n"
696 x-displayName: SMTP servers
697 - description: "Manage transfer limits\n"
699 x-displayName: Transfer limits
700 - description: "Manage purchase suggestions\n"
702 x-displayName: Purchase suggestions
703 - description: "Manage vendors for the acquisitions module\n"
705 x-displayName: Vendors
706 - description: "Manage batch import profiles\n"
707 name: batch_import_profiles
708 x-displayName: Batch import profiles