4 x-mojo-to: Patrons#list
5 operationId: listPatrons
14 description: Search on patron_id
19 description: Case insensitive search on cardnumber
24 description: Case insensitive search on surname
29 description: Case insensitive search on firstname
34 description: Case insensitive search on title
39 description: Case insensitive search on othernames
44 description: Case insensitive search on initials
49 description: Case insensitive search on streetnumber
54 description: Case insensitive search on streettype
59 description: Case insensitive search on address
64 description: Case insensitive search on address2
69 description: Case insensitive search on city
74 description: Case insensitive search on state
79 description: Case insensitive search on zipcode
84 description: Case insensitive search on country
89 description: Case insensitive search on email
94 description: Case insensitive search on phone
99 description: Case insensitive search on mobile
104 description: Case insensitive search on fax
107 - name: secondary_email
109 description: Case insensitive search on secondary_email
112 - name: secondary_phone
114 description: Case insensitive search on secondary_phone
117 - name: altaddress_street_number
119 description: Case insensitive search on altaddress_street_number
122 - name: altaddress_street_type
124 description: Case insensitive search on altaddress_street_type
127 - name: altaddress_address
129 description: Case insensitive search on altaddress_address
132 - name: altaddress_address2
134 description: Case insensitive search on altaddress_address2
137 - name: altaddress_city
139 description: Case insensitive search on altaddress_city
142 - name: altaddress_state
144 description: Case insensitive search on altaddress_state
147 - name: altaddress_postal_code
149 description: Case insensitive search on altaddress_postal_code
152 - name: altaddress_country
154 description: Case insensitive search on altaddress_country
157 - name: altaddress_email
159 description: Case insensitive search on altaddress_email
162 - name: altaddress_phone
164 description: Case insensitive search on altaddress_phone
167 - name: date_of_birth
169 description: Case insensitive search on date_of_birth
174 description: Case insensitive search on library_id
179 description: Case insensitive search on category_id
182 - name: date_enrolled
184 description: Case insensitive search on date_enrolled
189 description: Case insensitive search on expiry_date
192 - name: incorrect_address
194 description: Search on incorrect_address
197 - name: patron_card_lost
199 description: Search on patron_card_lost
204 description: Filter search by restricted
209 description: Search on guarantor_id
214 description: Case insensitive search on staff_notes
217 - name: relationship_type
219 description: Case insensitive search on relationship_type
224 description: Case insensitive search on gender
229 description: Case insensitive search on userid
234 description: Case insensitive search on opac_notes
237 - name: altaddress_notes
239 description: Case insensitive search on altaddress_notes
244 description: Case insensitive search on statistics_1
249 description: Case insensitive search on statistics_2
252 - name: autorenew_checkouts
254 description: Search on autorenew_checkouts
257 - name: altcontact_firstname
259 description: Case insensitive search on altcontact_firstname
262 - name: altcontact_surname
264 description: Case insensitive search on altcontact_surname
267 - name: altcontact_address
269 description: Case insensitive search on altcontact_address
272 - name: altcontact_address2
274 description: Case insensitive search on altcontact_address2
277 - name: altcontact_city
279 description: Case insensitive search on altcontact_city
282 - name: altcontact_state
284 description: Case insensitive search on altcontact_state
287 - name: altcontact_postal_code
289 description: Case insensitive search on altcontact_postal_code
292 - name: altcontact_country
294 description: Case insensitive search on altcontact_country
297 - name: altcontact_phone
299 description: Case insensitive search on altcontact_phone
304 description: Case insensitive search on sms_number
307 - name: sms_provider_id
309 description: Case insensitive search on sms_provider_id
314 description: Search on privacy
317 - name: privacy_guarantor_checkouts
319 description: Search on privacy_guarantor_checkouts
322 - name: check_previous_checkout
324 description: Case insensitive search on check_previous_checkout
329 description: Search on updated_on
334 description: Case insensitive search on last_seen
339 description: Case insensitive search on lang
342 - name: login_attempts
344 description: Search on login_attempts
347 - $ref: ../parameters.yaml#/match
348 - $ref: ../parameters.yaml#/order_by
349 - $ref: ../parameters.yaml#/page
350 - $ref: ../parameters.yaml#/per_page
351 - $ref: ../parameters.yaml#/q_param
352 - $ref: ../parameters.yaml#/q_body
353 - $ref: ../parameters.yaml#/q_header
356 description: A list of patrons
360 $ref: ../definitions.yaml#/patron
362 description: Authentication required
364 $ref: ../definitions.yaml#/error
366 description: Access forbidden
368 $ref: ../definitions.yaml#/error
371 Internal server error. Possible `error_code` attribute values:
373 * `internal_server_error`
375 $ref: ../definitions.yaml#/error
377 description: Under maintenance
379 $ref: ../definitions.yaml#/error
380 x-koha-authorization:
384 - extended_attributes
386 x-mojo-to: Patrons#add
387 operationId: addPatron
394 description: A JSON object containing information about the new patron
397 $ref: ../definitions.yaml#/patron
404 description: A successfully created patron
407 $ref: ../definitions.yaml#/patron
409 description: Bad parameter
411 $ref: ../definitions.yaml#/error
413 description: Authentication required
415 $ref: ../definitions.yaml#/error
417 description: Access forbidden
419 $ref: ../definitions.yaml#/error
421 description: Resource not found
423 $ref: ../definitions.yaml#/error
425 description: Conflict in creating resource
427 $ref: ../definitions.yaml#/error
430 Internal server error. Possible `error_code` attribute values:
432 * `internal_server_error`
434 $ref: ../definitions.yaml#/error
436 description: Under maintenance
438 $ref: ../definitions.yaml#/error
439 x-koha-authorization:
441 borrowers: edit_borrowers
442 "/patrons/{patron_id}":
444 x-mojo-to: Patrons#get
445 operationId: getPatron
450 - $ref: ../parameters.yaml#/patron_id_pp
455 description: A patron
457 $ref: ../definitions.yaml#/patron
459 description: Authentication required
461 $ref: ../definitions.yaml#/error
463 description: Access forbidden
465 $ref: ../definitions.yaml#/error
467 description: Patron not found
469 $ref: ../definitions.yaml#/error
472 Internal server error. Possible `error_code` attribute values:
474 * `internal_server_error`
476 $ref: ../definitions.yaml#/error
478 description: Under maintenance
480 $ref: ../definitions.yaml#/error
481 x-koha-authorization:
483 borrowers: edit_borrowers
485 - extended_attributes
487 x-mojo-to: Patrons#update
488 operationId: updatePatron
491 summary: Update patron
493 - $ref: ../parameters.yaml#/patron_id_pp
496 description: A JSON object containing new information about existing patron
499 $ref: ../definitions.yaml#/patron
506 description: A successfully updated patron
509 $ref: ../definitions.yaml#/patron
511 description: Bad parameter
513 $ref: ../definitions.yaml#/error
515 description: Access forbidden
517 $ref: ../definitions.yaml#/error
519 description: Resource not found
521 $ref: ../definitions.yaml#/error
523 description: Conflict in updating resource
525 $ref: ../definitions.yaml#/error
528 Internal server error. Possible `error_code` attribute values:
530 * `internal_server_error`
532 $ref: ../definitions.yaml#/error
534 description: Under maintenance
536 $ref: ../definitions.yaml#/error
537 x-koha-authorization:
541 x-mojo-to: Patrons#delete
542 operationId: deletePatron
545 summary: Delete patron
547 - $ref: ../parameters.yaml#/patron_id_pp
552 description: Patron deleted
554 description: Patron deletion failed
556 $ref: ../definitions.yaml#/error
558 description: Authentication required
560 $ref: ../definitions.yaml#/error
562 description: Access forbidden
564 $ref: ../definitions.yaml#/error
566 description: Patron not found
568 $ref: ../definitions.yaml#/error
570 description: Conflict
572 $ref: ../definitions.yaml#/error
575 Internal server error. Possible `error_code` attribute values:
577 * `internal_server_error`
579 $ref: ../definitions.yaml#/error
581 description: Under maintenance
583 $ref: ../definitions.yaml#/error
584 x-koha-authorization:
586 borrowers: delete_borrowers