Bug 29924: (QA follow-up) Remove password_expiration_date from API
[koha.git] / api / v1 / swagger / definitions / patron.yaml
1 ---
2 type: object
3 properties:
4   patron_id:
5     type: integer
6     description: Internal patron identifier
7   cardnumber:
8     type:
9       - string
10       - "null"
11     description: library assigned user identifier
12   surname:
13     type:
14       - string
15       - "null"
16     description: patron's last name
17   firstname:
18     type:
19       - string
20       - "null"
21     description: patron's first name
22   title:
23     type:
24       - string
25       - "null"
26     description: patron's title
27   other_name:
28     type:
29       - string
30       - "null"
31     description: any other names associated with the patron
32   initials:
33     type:
34       - string
35       - "null"
36     description: initials of the patron
37   street_number:
38     type:
39       - string
40       - "null"
41     description: street number of patron's primary address
42   street_type:
43     type:
44       - string
45       - "null"
46     description: street type of patron's primary address
47   address:
48     type:
49       - string
50       - "null"
51     description: first address line of patron's primary address
52   address2:
53     type:
54       - string
55       - "null"
56     description: second address line of patron's primary address
57   city:
58     type:
59       - string
60       - "null"
61     description: city or town of patron's primary address
62   state:
63     type:
64       - string
65       - "null"
66     description: state or province of patron's primary address
67   postal_code:
68     type:
69       - string
70       - "null"
71     description: zip or postal code of patron's primary address
72   country:
73     type:
74       - string
75       - "null"
76     description: country of patron's primary address
77   email:
78     type:
79       - string
80       - "null"
81     description: primary email address for patron's primary address
82   phone:
83     type:
84       - string
85       - "null"
86     description: primary phone number for patron's primary address
87   mobile:
88     type:
89       - string
90       - "null"
91     description: the other phone number for patron's primary address
92   fax:
93     type:
94       - string
95       - "null"
96     description: fax number for patron's primary address
97   secondary_email:
98     type:
99       - string
100       - "null"
101     description: secondary email address for patron's primary address
102   secondary_phone:
103     type:
104       - string
105       - "null"
106     description: secondary phone number for patron's primary address
107   altaddress_street_number:
108     type:
109       - string
110       - "null"
111     description: street number of patron's alternate address
112   altaddress_street_type:
113     type:
114       - string
115       - "null"
116     description: street type of patron's alternate address
117   altaddress_address:
118     type:
119       - string
120       - "null"
121     description: first address line of patron's alternate address
122   altaddress_address2:
123     type:
124       - string
125       - "null"
126     description: second address line of patron's alternate address
127   altaddress_city:
128     type:
129       - string
130       - "null"
131     description: city or town of patron's alternate address
132   altaddress_state:
133     type:
134       - string
135       - "null"
136     description: state or province of patron's alternate address
137   altaddress_postal_code:
138     type:
139       - string
140       - "null"
141     description: zip or postal code of patron's alternate address
142   altaddress_country:
143     type:
144       - string
145       - "null"
146     description: country of patron's alternate address
147   altaddress_email:
148     type:
149       - string
150       - "null"
151     description: email address for patron's alternate address
152   altaddress_phone:
153     type:
154       - string
155       - "null"
156     description: phone number for patron's alternate address
157   date_of_birth:
158     type:
159       - string
160       - "null"
161     format: date
162     description: patron's date of birth
163   library_id:
164     type: string
165     description: Internal identifier for the patron's home library
166   category_id:
167     type: string
168     description: Internal identifier for the patron's category
169   date_enrolled:
170     type:
171       - string
172       - "null"
173     format: date
174     description: date the patron was added to Koha
175   expiry_date:
176     type:
177       - string
178       - "null"
179     format: date
180     description: date the patron's card is set to expire
181   date_renewed:
182     type:
183       - string
184       - "null"
185     format: date
186     description: date the patron's card was last renewed
187   incorrect_address:
188     type:
189       - boolean
190       - "null"
191     description: set to 1 if library marked this patron as having an unconfirmed address
192   patron_card_lost:
193     type:
194       - boolean
195       - "null"
196     description: set to 1 if library marked this patron as having lost his card
197   restricted:
198     type: boolean
199     readOnly: true
200     description: If any restriction applies to the patron
201   staff_notes:
202     type:
203       - string
204       - "null"
205     description: a note on the patron's account
206   relationship_type:
207     type:
208       - string
209       - "null"
210     description: used for children to include the relationship to their guarantor
211   gender:
212     type:
213       - string
214       - "null"
215     description: patron's gender
216   userid:
217     type:
218       - string
219       - "null"
220     description: patron's login
221   opac_notes:
222     type:
223       - string
224       - "null"
225     description: a note on the patron's account visible in OPAC and staff interface
226   altaddress_notes:
227     type:
228       - string
229       - "null"
230     description: a note related to patron's alternate address
231   statistics_1:
232     type:
233       - string
234       - "null"
235     description: a field that can be used for any information unique to the library
236   statistics_2:
237     type:
238       - string
239       - "null"
240     description: a field that can be used for any information unique to the library
241   autorenew_checkouts:
242     type: boolean
243     description: indicate whether auto-renewal is allowed for patron
244   altcontact_firstname:
245     type:
246       - string
247       - "null"
248     description: first name of alternate contact for the patron
249   altcontact_surname:
250     type:
251       - string
252       - "null"
253     description: surname or last name of the alternate contact for the patron
254   altcontact_address:
255     type:
256       - string
257       - "null"
258     description: the first address line for the alternate contact for the patron
259   altcontact_address2:
260     type:
261       - string
262       - "null"
263     description: the second address line for the alternate contact for the patron
264   altcontact_city:
265     type:
266       - string
267       - "null"
268     description: the city for the alternate contact for the patron
269   altcontact_state:
270     type:
271       - string
272       - "null"
273     description: the state for the alternate contact for the patron
274   altcontact_postal_code:
275     type:
276       - string
277       - "null"
278     description: the zipcode for the alternate contact for the patron
279   altcontact_country:
280     type:
281       - string
282       - "null"
283     description: the country for the alternate contact for the patron
284   altcontact_phone:
285     type:
286       - string
287       - "null"
288     description: the phone number for the alternate contact for the patron
289   sms_number:
290     type:
291       - string
292       - "null"
293     description: the mobile phone number where the patron would like to receive notices (if
294       SMS turned on)
295   sms_provider_id:
296     type:
297       - integer
298       - "null"
299     description: the provider of the mobile phone number defined in smsalertnumber
300   privacy:
301     type: integer
302     description: patron's privacy settings related to their checkout history
303   privacy_guarantor_checkouts:
304     type: integer
305     description: controls if relatives can see this patron's checkouts
306   privacy_guarantor_fines:
307     type: boolean
308     description: controls if relatives can see this patron's fines
309   check_previous_checkout:
310     type: string
311     description: produce a warning for this patron if this item has previously been checked
312       out to this patron if 'yes', not if 'no', defer to category setting if
313       'inherit'
314   updated_on:
315     type: string
316     format: date-time
317     description: time of last change could be useful for synchronization with external
318       systems (among others)
319   last_seen:
320     type:
321       - string
322       - "null"
323     format: date-time
324     description: last time a patron has been seen (connected at the OPAC or staff interface)
325   lang:
326     type: string
327     description: lang to use to send notices to this patron
328   login_attempts:
329     type:
330       - integer
331       - "null"
332     description: number of failed login attemps
333   overdrive_auth_token:
334     type:
335       - string
336       - "null"
337     description: persist OverDrive auth token
338   anonymized:
339     type: boolean
340     readOnly: true
341     description: If the patron has been anonymized
342   extended_attributes:
343     type: array
344     description: patron's extended attributes
345     items:
346       $ref: "patron_extended_attribute.yaml"
347   checkouts_count:
348     type:
349       - integer
350       - "null"
351     description: Number of checkouts
352   overdues_count:
353     type:
354       - integer
355       - "null"
356     description: Number of overdued checkouts
357   account_balance:
358     type:
359       - number
360       - "null"
361     description: Balance of the patron's account
362 additionalProperties: false
363 required:
364   - surname
365   - address
366   - city
367   - library_id
368   - category_id