Bug 18508: Fix t/db_dependent/api/v1/swagger/definitions.t (follow-up of 6758)
[koha.git] / api / v1 / swagger / definitions / patron.json
1 {
2   "type": "object",
3   "properties": {
4     "borrowernumber": {
5       "$ref": "../x-primitives.json#/borrowernumber"
6     },
7     "cardnumber": {
8       "$ref": "../x-primitives.json#/cardnumber"
9     },
10     "surname": {
11       "$ref": "../x-primitives.json#/surname"
12     },
13     "firstname": {
14       "$ref": "../x-primitives.json#/firstname"
15     },
16     "title": {
17       "type": ["string", "null"],
18       "description": "patron's title"
19     },
20     "othernames": {
21       "type": ["string", "null"],
22       "description": "any other names associated with the patron"
23     },
24     "initials": {
25       "type": ["string", "null"],
26       "description": "initials of the patron"
27     },
28     "streetnumber": {
29       "type": ["string", "null"],
30       "description": "street number of patron's primary address"
31     },
32     "streettype": {
33       "type": ["string", "null"],
34       "description": "street type of patron's primary address"
35     },
36     "address": {
37       "type": "string",
38       "description": "first address line of patron's primary address"
39     },
40     "address2": {
41       "type": ["string", "null"],
42       "description": "second address line of patron's primary address"
43     },
44     "city": {
45       "type": "string",
46       "description": "city or town of patron's primary address"
47     },
48     "state": {
49       "type": ["string", "null"],
50       "description": "state or province of patron's primary address"
51     },
52     "zipcode": {
53       "type": ["string", "null"],
54       "description": "zip or postal code of patron's primary address"
55     },
56     "country": {
57       "type": ["string", "null"],
58       "description": "country of patron's primary address"
59     },
60     "email": {
61       "$ref": "../x-primitives.json#/email"
62     },
63     "phone": {
64       "$ref": "../x-primitives.json#/phone"
65     },
66     "mobile": {
67       "type": ["string", "null"],
68       "description": "the other phone number for patron's primary address"
69     },
70     "fax": {
71       "type": ["string", "null"],
72       "description": "fax number for patron's primary address"
73     },
74     "emailpro": {
75       "type": ["string", "null"],
76       "description": "secondary email address for patron's primary address"
77     },
78     "phonepro": {
79       "type": ["string", "null"],
80       "description": "secondary phone number for patron's primary address"
81     },
82     "B_streetnumber": {
83       "type": ["string", "null"],
84       "description": "street number of patron's alternate address"
85     },
86     "B_streettype": {
87       "type": ["string", "null"],
88       "description": "street type of patron's alternate address"
89     },
90     "B_address": {
91       "type": ["string", "null"],
92       "description": "first address line of patron's alternate address"
93     },
94     "B_address2": {
95       "type": ["string", "null"],
96       "description": "second address line of patron's alternate address"
97     },
98     "B_city": {
99       "type": ["string", "null"],
100       "description": "city or town of patron's alternate address"
101     },
102     "B_state": {
103       "type": ["string", "null"],
104       "description": "state or province of patron's alternate address"
105     },
106     "B_zipcode": {
107       "type": ["string", "null"],
108       "description": "zip or postal code of patron's alternate address"
109     },
110     "B_country": {
111       "type": ["string", "null"],
112       "description": "country of patron's alternate address"
113     },
114     "B_email": {
115       "type": ["string", "null"],
116       "description": "email address for patron's alternate address"
117     },
118     "B_phone": {
119       "type": ["string", "null"],
120       "description": "phone number for patron's alternate address"
121     },
122     "dateofbirth": {
123       "type": ["string", "null"],
124       "description": "patron's date of birth"
125     },
126     "branchcode": {
127       "type": "string",
128       "description": "code of patron's home branch"
129     },
130     "categorycode": {
131       "type": "string",
132       "description": "code of patron's category"
133     },
134     "dateenrolled": {
135       "type": ["string", "null"],
136       "description": "date the patron was added to Koha"
137     },
138     "dateexpiry": {
139       "type": ["string", "null"],
140       "description": "date the patron's card is set to expire"
141     },
142     "date_renewed": {
143       "type": ["string", "null"],
144       "description": "date the patron's card was last renewed"
145     },
146     "gonenoaddress": {
147       "type": ["boolean", "null"],
148       "description": "set to 1 if library marked this patron as having an unconfirmed address"
149     },
150     "lost": {
151       "type": ["boolean", "null"],
152       "description": "set to 1 if library marked this patron as having lost his card"
153     },
154     "debarred": {
155       "type": ["string", "null"],
156       "description": "until this date the patron can only check-in"
157     },
158     "debarredcomment": {
159       "type": ["string", "null"],
160       "description": "comment on the stop of the patron"
161     },
162     "contactname": {
163       "type": ["string", "null"],
164       "description": "used for children and professionals to include surname or last name of guarantor or organization name"
165     },
166     "contactfirstname": {
167       "type": ["string", "null"],
168       "description": "used for children to include first name of guarantor"
169     },
170     "contacttitle": {
171       "type": ["string", "null"],
172       "description": "used for children to include title of guarantor"
173     },
174     "guarantorid": {
175       "type": ["integer", "null"],
176       "description": "borrowernumber used for children or professionals to link them to guarantor or organizations"
177     },
178     "borrowernotes": {
179       "type": ["string", "null"],
180       "description": "a note on the patron's account"
181     },
182     "relationship": {
183       "type": ["string", "null"],
184       "description": "used for children to include the relationship to their guarantor"
185     },
186     "sex": {
187       "type": ["string", "null"],
188       "description": "patron's gender"
189     },
190     "password": {
191       "type": ["string", "null"],
192       "description": "patron's encrypted password"
193     },
194     "flags": {
195       "type": ["integer", "null"],
196       "description": "a number associated with the patron's permissions"
197     },
198     "userid": {
199       "type": ["string", "null"],
200       "description": "patron's login"
201     },
202     "opacnote": {
203       "type": ["string", "null"],
204       "description": "a note on the patron's account visible in OPAC and staff client"
205     },
206     "contactnote": {
207       "type": ["string", "null"],
208       "description": "a note related to patron's alternate address"
209     },
210     "sort1": {
211       "type": ["string", "null"],
212       "description": "a field that can be used for any information unique to the library"
213     },
214     "sort2": {
215       "type": ["string", "null"],
216       "description": "a field that can be used for any information unique to the library"
217     },
218     "altcontactfirstname": {
219       "type": ["string", "null"],
220       "description": "first name of alternate contact for the patron"
221     },
222     "altcontactsurname": {
223       "type": ["string", "null"],
224       "description": "surname or last name of the alternate contact for the patron"
225     },
226     "altcontactaddress1": {
227       "type": ["string", "null"],
228       "description": "the first address line for the alternate contact for the patron"
229     },
230     "altcontactaddress2": {
231       "type": ["string", "null"],
232       "description": "the second address line for the alternate contact for the patron"
233     },
234     "altcontactaddress3": {
235       "type": ["string", "null"],
236       "description": "the city for the alternate contact for the patron"
237     },
238     "altcontactstate": {
239       "type": ["string", "null"],
240       "description": "the state for the alternate contact for the patron"
241     },
242     "altcontactzipcode": {
243       "type": ["string", "null"],
244       "description": "the zipcode for the alternate contact for the patron"
245     },
246     "altcontactcountry": {
247       "type": ["string", "null"],
248       "description": "the country for the alternate contact for the patron"
249     },
250     "altcontactphone": {
251       "type": ["string", "null"],
252       "description": "the phone number for the alternate contact for the patron"
253     },
254     "smsalertnumber": {
255       "type": ["string", "null"],
256       "description": "the mobile phone number where the patron would like to receive notices (if SMS turned on)"
257     },
258     "sms_provider_id": {
259       "type": ["integer", "null"],
260       "description": "the provider of the mobile phone number defined in smsalertnumber"
261     },
262     "privacy": {
263       "type": "integer",
264       "description": "patron's privacy settings related to their reading history"
265     },
266     "privacy_guarantor_checkouts": {
267       "type": "integer",
268       "description": "controls if relatives can see this patron's checkouts"
269     },
270     "checkprevcheckout": {
271       "type": "string",
272       "description": "produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'"
273     },
274     "updated_on": {
275       "type": ["string", "null"],
276       "description": "time of last change could be useful for synchronization with external systems (among others)"
277     },
278     "lastseen": {
279       "type": ["string", "null"],
280       "description": "last time a patron has been seen (connected at the OPAC or staff interface)"
281     },
282     "lang": {
283       "type": ["string", "null"],
284       "description": "lang to use to send notices to this patron"
285     },
286     "login_attempts": {
287       "type": ["integer", "null"],
288       "description": "number of failed login attemps"
289     },
290     "overdrive_auth_token": {
291       "type": ["string", "null"],
292       "description": "persist OverDrive auth token"
293     }
294   }
295 }