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