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 "/biblios/{biblio_id}":
105 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}"
106 "/biblios/{biblio_id}/checkouts":
107 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts"
108 "/biblios/{biblio_id}/items":
109 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1items"
110 "/biblios/{biblio_id}/pickup_locations":
111 $ref: "./paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations"
112 "/biblios/{biblio_id}/item_groups":
113 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups"
114 "/biblios/{biblio_id}/item_groups/{item_group_id}":
115 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}"
116 "/biblios/{biblio_id}/item_groups/{item_group_id}/items":
117 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items"
118 "/biblios/{biblio_id}/item_groups/{item_group_id}/items/{item_id}":
119 $ref: "./paths/biblios_item_groups.yaml#/~1biblios~1{biblio_id}~1item_groups~1{item_group_id}~1items~1{item_id}"
120 "/cash_registers/{cash_register_id}/cashups":
121 $ref: "./paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups"
122 "/cashups/{cashup_id}":
123 $ref: "./paths/cash_registers.yaml#/~1cashups~1{cashup_id}"
125 $ref: ./paths/checkouts.yaml#/~1checkouts
126 "/checkouts/{checkout_id}":
127 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}"
128 "/checkouts/{checkout_id}/allows_renewal":
129 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal"
130 "/checkouts/{checkout_id}/renewals":
131 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewals"
132 "/checkouts/{checkout_id}/renewal":
133 $ref: "./paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal"
134 /circulation-rules/kinds:
135 $ref: ./paths/circulation-rules.yaml#/~1circulation-rules~1kinds
137 $ref: ./paths/cities.yaml#/~1cities
139 $ref: "./paths/cities.yaml#/~1cities~1{city_id}"
140 "/clubs/{club_id}/holds":
141 $ref: "./paths/clubs.yaml#/~1clubs~1{club_id}~1holds"
142 /config/smtp_servers:
143 $ref: ./paths/config_smtp_servers.yaml#/~1config~1smtp_servers
144 "/config/smtp_servers/{smtp_server_id}":
145 $ref: "./paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}"
147 $ref: ./paths/holds.yaml#/~1holds
149 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}"
150 "/holds/{hold_id}/pickup_location":
151 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location"
152 "/holds/{hold_id}/pickup_locations":
153 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations"
154 "/holds/{hold_id}/priority":
155 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1priority"
156 "/holds/{hold_id}/suspension":
157 $ref: "./paths/holds.yaml#/~1holds~1{hold_id}~1suspension"
159 $ref: ./paths/ill_backends.yaml#/~1ill_backends
160 "/ill_backends/{ill_backend_id}":
161 $ref: "./paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}"
163 $ref: ./paths/illrequests.yaml#/~1illrequests
164 "/import_batches/{import_batch_id}/records/{import_record_id}/matches/chosen":
165 $ref: "./paths/import_batches.yaml#/~1import_batches~1{import_batch_id}~1records~1{import_record_id}~1matches~1chosen"
166 /import_batch_profiles:
167 $ref: ./paths/import_batch_profiles.yaml#/~1import_batch_profiles
168 "/import_batch_profiles/{import_batch_profile_id}":
169 $ref: "./paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}"
171 $ref: ./paths/items.yaml#/~1items
173 $ref: "./paths/items.yaml#/~1items~1{item_id}"
174 "/items/{item_id}/bundled_items":
175 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items
176 "/items/{item_id}/bundled_items/{bundled_item_id}":
177 $ref: ./paths/items.yaml#/~1items~1{item_id}~1bundled_items~1{bundled_item_id}
178 "/items/{item_id}/pickup_locations":
179 $ref: "./paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
181 $ref: ./paths/libraries.yaml#/~1libraries
182 "/libraries/{library_id}":
183 $ref: "./paths/libraries.yaml#/~1libraries~1{library_id}"
185 $ref: ./paths/oauth.yaml#/~1oauth~1token
187 $ref: ./paths/patrons.yaml#/~1patrons
188 "/patrons/{patron_id}":
189 $ref: "./paths/patrons.yaml#/~1patrons~1{patron_id}"
190 "/patrons/{patron_id}/account":
191 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account"
192 "/patrons/{patron_id}/account/credits":
193 $ref: "./paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits"
194 "/patrons/{patron_id}/extended_attributes":
195 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes"
196 "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
197 $ref: "./paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}"
198 "/patrons/{patron_id}/holds":
199 $ref: "./paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds"
200 "/patrons/{patron_id}/password":
201 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
202 "/patrons/{patron_id}/password/expiration_date":
203 $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
204 "/public/biblios/{biblio_id}":
205 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
206 "/public/biblios/{biblio_id}/items":
207 $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items"
209 $ref: ./paths/libraries.yaml#/~1public~1libraries
210 "/public/libraries/{library_id}":
211 $ref: "./paths/libraries.yaml#/~1public~1libraries~1{library_id}"
212 "/public/patrons/{patron_id}/article_requests/{article_request_id}":
213 $ref: "./paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}"
214 "/public/patrons/{patron_id}/guarantors/can_see_charges":
215 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges"
216 "/public/patrons/{patron_id}/guarantors/can_see_checkouts":
217 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts"
218 "/public/patrons/{patron_id}/password":
219 $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
221 $ref: ./paths/quotes.yaml#/~1quotes
222 "/quotes/{quote_id}":
223 $ref: "./paths/quotes.yaml#/~1quotes~1{quote_id}"
225 $ref: ./paths/return_claims.yaml#/~1return_claims
226 "/return_claims/{claim_id}":
227 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}"
228 "/return_claims/{claim_id}/notes":
229 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes"
230 "/return_claims/{claim_id}/resolve":
231 $ref: "./paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve"
232 "/rotas/{rota_id}/stages/{stage_id}/position":
233 $ref: "./paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position"
235 $ref: ./paths/suggestions.yaml#/~1suggestions
236 "/suggestions/{suggestion_id}":
237 $ref: "./paths/suggestions.yaml#/~1suggestions~1{suggestion_id}"
238 /suggestions/managers:
239 $ref: paths/suggestions.yaml#/~1suggestions~1managers
241 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits
242 /transfer_limits/batch:
243 $ref: ./paths/transfer_limits.yaml#/~1transfer_limits~1batch
244 "/transfer_limits/{limit_id}":
245 $ref: "./paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
247 advancededitormacro_id_pp:
248 description: Advanced editor macro internal identifier
250 name: advancededitormacro_id
254 description: Record internal identifier
259 candidate_match_id_pp:
260 description: Internal import record match identifier
262 name: candidate_match_id
266 description: Cash register internal identifier
268 name: cash_register_id
272 description: Cashup internal identifier
278 description: Internal checkout identifier
284 description: City internal identifier
290 description: Internal club identifier
302 description: Internal hold identifier
307 import_batch_profile_id_pp:
308 description: Internal profile identifier
310 name: import_batch_profile_id
314 description: Internal import record identifier
316 name: import_record_id
320 description: Internal item identifier
326 description: Internal library identifier
332 description: Matching criteria
343 collectionFormat: csv
344 description: Sorting criteria
352 description: Internal order identifier
358 description: "Page number, for paginated object listing"
364 description: Internal patron identifier
370 description: Internal patron identifier
375 description: "Page size, for paginated object listing"
381 description: Query filter sent through request"s body
388 description: Query filter sent as a request header
394 description: Query filter sent as a request parameter
401 collectionFormat: multi
403 description: Quote internal identifier
409 description: Request id header
411 name: x-koha-request-id
415 description: Item was seen flag
421 description: SMTP server internal identifier
427 description: Internal suggestion identifier
432 transfer_limit_id_pp:
433 description: Internal transfer limit identifier
439 description: Vendor id
449 url: http://www.gnu.org/licenses/gpl.txt
451 name: Koha Development Team
452 url: https://koha-community.org/
456 This API is documented in **OpenAPI format**.
460 The API supports the following authentication mechanisms
462 * HTTP Basic authentication
463 * OAuth2 (client credentials grant)
466 Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
467 by system preferences.
471 The API uses standard HTTP status codes to indicate the success or failure
472 of the API call. The body of the response will be JSON in the following format:
476 "error": "Current settings prevent the passed due date to be applied",
477 "error_code": "invalid_due_date"
481 Note: Some routes might offer additional attributes in their error responses but that"s
482 subject to change and thus not documented.
484 ## Filtering responses
486 The API allows for some advanced response filtering using a JSON based query syntax. The
487 query can be added to the requests:
489 * as a query parameter `q=`
490 * in the request body
491 * in a special header `x-koha-query`
493 For simple field equality matches we can use `{ "fieldname": "value" }` where the fieldname
494 matches one of the fields as described in the particular endpoints response object.
496 We can refine that with more complex matching clauses by nesting a the clause into the
497 object; `{ "fieldname": { "clause": "value" } }`.
499 Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
501 We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
502 level will result in an "AND" query, whilst combinding them in an `ARRAY` wilth result in an
503 "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
504 results with both field1 containing value2 AND field2 containing value2 for example.
506 Additionally, if you are requesting related data be embedded into the response one can query
507 on the related data using dot notation in the field names.
511 The following request would return any patron with firstname "Henry" and lastname "Acevedo";
513 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": "Acevedo", "firstname": "Henry" }"`
515 The following request would return any patron whose lastname begins with "Ace";
517 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
519 The following request would return any patron whose lastname is "Acevedo" OR "Bernardo"
521 `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
523 The following request embeds the related patron extended attributes data and filters on it.
525 `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" }'`
531 This optional header allows the api consumer to request additional related data
532 to be returned in the api response. It also allows for cross referencing in the
533 queries as described above. It accepts a comma delimited list of relation names.
535 Relations may on occasion also support dot delimited nesting to allow traversal.
539 This optional header should be passed to give your api request a library
540 context; If it is not included in the request, then the request context
541 will default to using your api comsumer"s assigned home library.
543 - description: "Manage article requests\n"
544 name: article_requests
545 x-displayName: Article requests
546 - description: "Manage baskets for the acquisitions module\n"
548 x-displayName: Baskets
549 - description: "Manage bibliographic records\n"
551 x-displayName: Biblios
552 - description: "Manage cash register cashups\n"
554 x-displayName: Cashups
555 - description: "Manage checkouts\n"
557 x-displayName: Checkouts
558 - description: "Manage circulation rules\n"
559 name: circulation_rules
560 x-displayName: Circulation rules
561 - description: "Manage cities\n"
563 x-displayName: Cities
564 - description: "Manage patron clubs\n"
567 - description: "Manage funds for the acquisitions module\n"
570 - description: "Manage holds\n"
573 - description: "Manage ILL module backends\n"
575 x-displayName: ILL backends
576 - description: "Manage ILL requests\n"
578 x-displayName: ILL requests
579 - description: "Manage import batches\n"
581 x-display-name: Import batches
582 - description: "Manage items\n"
585 - description: "Manage libraries\n"
587 x-displayName: Libraries
588 - description: "Manage macros\n"
590 x-displayName: Macros
591 - description: "Manage acquisition orders\n"
593 x-displayName: Orders
594 - description: "Handle OAuth flows\n"
597 - description: "Manage patrons\n"
599 x-displayName: Patrons
600 - description: "Manage quotes\n"
602 x-displayName: Quotes
603 - description: "Manage return claims\n"
605 x-displayName: Return claims
606 - description: "Manage rotas\n"
609 - description: "Manage SMTP servers configurations\n"
611 x-displayName: SMTP servers
612 - description: "Manage transfer limits\n"
614 x-displayName: Transfer limits
615 - description: "Manage purchase suggestions\n"
617 x-displayName: Purchase suggestions
618 - description: "Manage vendors for the acquisitions module\n"
620 x-displayName: Vendors
621 - description: "Manage batch import profiles\n"
622 name: batch_import_profiles
623 x-displayName: Batch import profiles