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/job.yaml
52 $ref: ./definitions/library.yaml
54 $ref: ./definitions/order.yaml
56 $ref: ./definitions/patron.yaml
57 patron_account_credit:
58 $ref: ./definitions/patron_account_credit.yaml
60 $ref: ./definitions/patron_balance.yaml
61 patron_extended_attribute:
62 $ref: ./definitions/patron_extended_attribute.yaml
64 $ref: ./definitions/quote.yaml
66 $ref: ./definitions/renewal.yaml
68 $ref: ./definitions/renewals.yaml
70 $ref: ./definitions/return_claim.yaml
72 $ref: ./definitions/smtp_server.yaml
74 $ref: ./definitions/suggestion.yaml
76 $ref: ./definitions/transfer_limit.yaml
78 $ref: ./definitions/vendor.yaml
80 /acquisitions/baskets/managers:
81 $ref: paths/acquisitions_baskets.yaml#/~1acquisitions~1baskets~1managers
83 $ref: ./paths/acquisitions_funds.yaml#/~1acquisitions~1funds
84 /acquisitions/funds/owners:
85 $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1owners
86 /acquisitions/funds/users:
87 $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds~1users
89 $ref: ./paths/acquisitions_orders.yaml#/~1acquisitions~1orders
90 "/acquisitions/orders/{order_id}":
91 $ref: "./paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id}"
92 /acquisitions/vendors:
93 $ref: ./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors
94 "/acquisitions/vendors/{vendor_id}":
95 $ref: "./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}"
96 /advanced_editor/macros:
97 $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros
98 /advanced_editor/macros/shared:
99 $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
100 "/advanced_editor/macros/shared/{advancededitormacro_id}":
101 $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}"
102 "/advanced_editor/macros/{advancededitormacro_id}":
103 $ref: "./paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
104 "/article_requests/{article_request_id}":
105 $ref: "./paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
106 /auth/otp/token_delivery:
107 $ref: paths/auth.yaml#/~1auth~1otp~1token_delivery
108 "/biblios/{biblio_id}":
109 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
110 "/biblios/{biblio_id}/checkouts":
111 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts"
112 "/biblios/{biblio_id}/items":
113 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1items"
114 "/biblios/{biblio_id}/pickup_locations":
115 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations"
116 "/biblios/{biblio_id}/item_groups":
117 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups"
118 "/biblios/{biblio_id}/item_groups/{item_group_id}":
119 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}"
120 "/biblios/{biblio_id}/item_groups/{item_group_id}/items":
121 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items"
122 "/biblios/{biblio_id}/item_groups/{item_group_id}/items/{item_id}":
123 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items~1{item_id}"
124 "/cash_registers/{cash_register_id}/cashups":
125 $ref: "./paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups"
126 "/cashups/{cashup_id}":
127 $ref: "./paths/cash_registers.yaml#/~1cashups~1{cashup_id}"
129 $ref: ./paths/checkouts.yaml#/~1checkouts
130 "/checkouts/{checkout_id}":
131 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}"
132 "/checkouts/{checkout_id}/allows_renewal":
133 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal"
134 "/checkouts/{checkout_id}/renewals":
135 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewals"
136 "/checkouts/{checkout_id}/renewal":
137 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal"
138 /circulation-rules/kinds:
139 $ref: ./paths/circulation-rules.yaml#/~1circulation-rules~1kinds
141 $ref: ./paths/cities.yaml#/~1cities
143 $ref: "./paths/cities.yaml#/~1cities~1{city_id}"
144 "/clubs/{club_id}/holds":
145 $ref: "./paths/clubs.yaml#/~1clubs~1{club_id}~1holds"
146 /config/smtp_servers:
147 $ref: ./paths/config_smtp_servers.yaml#/~1config~1smtp_servers
148 "/config/smtp_servers/{smtp_server_id}":
149 $ref: "./paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}"
151 $ref: ./paths/holds.yaml#/~1holds
153 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}"
154 "/holds/{hold_id}/pickup_location":
155 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location"
156 "/holds/{hold_id}/pickup_locations":
157 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations"
158 "/holds/{hold_id}/priority":
159 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1priority"
160 "/holds/{hold_id}/suspension":
161 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1suspension"
163 $ref: ./paths/ill_backends.yaml#/~1ill_backends
164 "/ill_backends/{ill_backend_id}":
165 $ref: "./paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}"
167 $ref: ./paths/illrequests.yaml#/~1illrequests
168 "/import_batches/{import_batch_id}/records/{import_record_id}/matches/chosen":
169 $ref: "./paths/import_batches.yaml#/~1import_batches~1{import_batch_id}~1records~1{import_record_id}~1matches~1chosen"
170 /import_batch_profiles:
171 $ref: ./paths/import_batch_profiles.yaml#/~1import_batch_profiles
172 "/import_batch_profiles/{import_batch_profile_id}":
173 $ref: "./paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}"
175 $ref: ./paths/items.yaml#/~1items
177 $ref: "./paths/items.yaml#/~1items~1{item_id}"
178 "/items/{item_id}/bundled_items":
179 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items
180 "/items/{item_id}/bundled_items/{bundled_item_id}":
181 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items~1{bundled_item_id}
182 "/items/{item_id}/pickup_locations":
183 $ref: "./paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
185 $ref: ./paths/jobs.yaml#/~1jobs
187 $ref: "./paths/jobs.yaml#/~1jobs~1{job_id}"
189 $ref: ./paths/libraries.yaml#/~1libraries
190 "/libraries/{library_id}":
191 $ref: "./paths/libraries.yaml#/~1libraries~1{library_id}"
193 $ref: ./paths/oauth.yaml#/~1oauth~1token
195 $ref: ./paths/patrons.yaml#/~1patrons
196 "/patrons/{patron_id}":
197 $ref: "./paths/patrons.yaml#/~1patrons~1{patron_id}"
198 "/patrons/{patron_id}/account":
199 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account"
200 "/patrons/{patron_id}/account/credits":
201 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits"
202 "/patrons/{patron_id}/extended_attributes":
203 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes"
204 "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
205 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}"
206 "/patrons/{patron_id}/holds":
207 $ref: "./paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds"
208 "/patrons/{patron_id}/password":
209 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
210 "/patrons/{patron_id}/password/expiration_date":
211 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
212 "/public/biblios/{biblio_id}":
213 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
214 "/public/biblios/{biblio_id}/items":
215 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items"
216 "/public/biblios/{biblio_id}/ratings":
217 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1ratings"
219 $ref: ./paths/libraries.yaml#/~1public~1libraries
220 "/public/libraries/{library_id}":
221 $ref: "./paths/libraries.yaml#/~1public~1libraries~1{library_id}"
222 "/public/patrons/{patron_id}/article_requests/{article_request_id}":
223 $ref: "./paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}"
224 "/public/patrons/{patron_id}/guarantors/can_see_charges":
225 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges"
226 "/public/patrons/{patron_id}/guarantors/can_see_checkouts":
227 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts"
228 "/public/patrons/{patron_id}/password":
229 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
231 $ref: ./paths/quotes.yaml#/~1quotes
232 "/quotes/{quote_id}":
233 $ref: "./paths/quotes.yaml#/~1quotes~1{quote_id}"
235 $ref: ./paths/return_claims.yaml#/~1return_claims
236 "/return_claims/{claim_id}":
237 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}"
238 "/return_claims/{claim_id}/notes":
239 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes"
240 "/return_claims/{claim_id}/resolve":
241 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve"
242 "/rotas/{rota_id}/stages/{stage_id}/position":
243 $ref: "./paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position"
245 $ref: ./paths/suggestions.yaml#/~1suggestions
246 "/suggestions/{suggestion_id}":
247 $ref: "./paths/suggestions.yaml#/~1suggestions~1{suggestion_id}"
248 /suggestions/managers:
249 $ref: paths/suggestions.yaml#/~1suggestions~1managers
251 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits
252 /transfer_limits/batch:
253 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits~1batch
254 "/transfer_limits/{limit_id}":
255 $ref: "./paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
257 advancededitormacro_id_pp:
258 description: Advanced editor macro internal identifier
260 name: advancededitormacro_id
264 description: Record internal identifier
269 candidate_match_id_pp:
270 description: Internal import record match identifier
272 name: candidate_match_id
276 description: Cash register internal identifier
278 name: cash_register_id
282 description: Cashup internal identifier
288 description: Internal checkout identifier
294 description: City internal identifier
300 description: Internal club identifier
312 description: Internal hold identifier
317 import_batch_profile_id_pp:
318 description: Internal profile identifier
320 name: import_batch_profile_id
324 description: Internal import record identifier
326 name: import_record_id
330 description: Internal item identifier
336 description: Job internal identifier
342 description: Internal library identifier
348 description: Matching criteria
359 collectionFormat: csv
360 description: Sorting criteria
368 description: Internal order identifier
374 description: "Page number, for paginated object listing"
380 description: Internal patron identifier
386 description: Internal patron identifier
391 description: "Page size, for paginated object listing"
397 description: Query filter sent through request"s body
404 description: Query filter sent as a request header
410 description: Query filter sent as a request parameter
417 collectionFormat: multi
419 description: Quote internal identifier
425 description: Request id header
427 name: x-koha-request-id
431 description: Item was seen flag
437 description: SMTP server internal identifier
443 description: Internal suggestion identifier
448 transfer_limit_id_pp:
449 description: Internal transfer limit identifier
455 description: Vendor id
465 url: http://www.gnu.org/licenses/gpl.txt
467 name: Koha Development Team
468 url: https://koha-community.org/
472 This API is documented in **OpenAPI format**.
476 The API supports the following authentication mechanisms
478 * HTTP Basic authentication
479 * OAuth2 (client credentials grant)
482 Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
483 by system preferences.
487 The API uses standard HTTP status codes to indicate the success or failure
488 of the API call. The body of the response will be JSON in the following format:
492 "error": "Current settings prevent the passed due date to be applied",
493 "error_code": "invalid_due_date"
497 Note: Some routes might offer additional attributes in their error responses but that"s
498 subject to change and thus not documented.
500 ## Filtering responses
502 The API allows for some advanced response filtering using a JSON based query syntax. The
503 query can be added to the requests:
505 * as a query parameter `q=`
506 * in the request body
507 * in a special header `x-koha-query`
509 For simple field equality matches we can use `{ "fieldname": "value" }` where the fieldname
510 matches one of the fields as described in the particular endpoints response object.
512 We can refine that with more complex matching clauses by nesting a the clause into the
513 object; `{ "fieldname": { "clause": "value" } }`.
515 Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
517 We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
518 level will result in an "AND" query, whilst combinding them in an `ARRAY` wilth result in an
519 "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
520 results with both field1 containing value2 AND field2 containing value2 for example.
522 Additionally, if you are requesting related data be embedded into the response one can query
523 on the related data using dot notation in the field names.
527 The following request would return any patron with firstname "Henry" and lastname "Acevedo";
529 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": "Acevedo", "firstname": "Henry" }"`
531 The following request would return any patron whose lastname begins with "Ace";
533 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
535 The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
537 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
539 The following request embeds the related patron extended attributes data and filters on it.
541 `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" }'`
547 This optional header allows the api consumer to request additional related data
548 to be returned in the api response. It also allows for cross referencing in the
549 queries as described above. It accepts a comma delimited list of relation names.
551 Relations may on occasion also support dot delimited nesting to allow traversal.
555 This optional header should be passed to give your api request a library
556 context; If it is not included in the request, then the request context
557 will default to using your api comsumer"s assigned home library.
559 - description: "Handle two factor authentication flows\n"
561 x-displayName: Two factor authentication
562 - description: "Manage article requests\n"
563 name: article_requests
564 x-displayName: Article requests
565 - description: "Manage baskets for the acquisitions module\n"
567 x-displayName: Baskets
568 - description: "Manage bibliographic records\n"
570 x-displayName: Biblios
571 - description: "Manage cash register cashups\n"
573 x-displayName: Cashups
574 - description: "Manage checkouts\n"
576 x-displayName: Checkouts
577 - description: "Manage circulation rules\n"
578 name: circulation_rules
579 x-displayName: Circulation rules
580 - description: "Manage cities\n"
582 x-displayName: Cities
583 - description: "Manage patron clubs\n"
586 - description: "Manage funds for the acquisitions module\n"
589 - description: "Manage holds\n"
592 - description: "Manage ILL module backends\n"
594 x-displayName: ILL backends
595 - description: "Manage ILL requests\n"
597 x-displayName: ILL requests
598 - description: "Manage import batches\n"
600 x-display-name: Import batches
601 - description: "Manage item groups\n"
603 x-displayName: Item groups
604 - description: "Manage items\n"
607 - description: "Manage jobs\n"
610 - description: "Manage libraries\n"
612 x-displayName: Libraries
613 - description: "Manage macros\n"
615 x-displayName: Macros
616 - description: "Manage acquisition orders\n"
618 x-displayName: Orders
619 - description: "Handle OAuth flows\n"
622 - description: "Manage patrons\n"
624 x-displayName: Patrons
625 - description: "Manage quotes\n"
627 x-displayName: Quotes
628 - description: "Manage return claims\n"
630 x-displayName: Return claims
631 - description: "Manage rotas\n"
634 - description: "Manage SMTP servers configurations\n"
636 x-displayName: SMTP servers
637 - description: "Manage transfer limits\n"
639 x-displayName: Transfer limits
640 - description: "Manage purchase suggestions\n"
642 x-displayName: Purchase suggestions
643 - description: "Manage vendors for the acquisitions module\n"
645 x-displayName: Vendors
646 - description: "Manage batch import profiles\n"
647 name: batch_import_profiles
648 x-displayName: Batch import profiles