Bug 16699: Reference new x-primitives in currently defined objects
[koha.git] / api / v1 / 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       "$ref": "../x-primitives.json#/branchcode"
128     },
129     "categorycode": {
130       "type": "string",
131       "description": "code of patron's category"
132     },
133     "dateenrolled": {
134       "type": ["string", "null"],
135       "description": "date the patron was added to Koha"
136     },
137     "dateexpiry": {
138       "type": ["string", "null"],
139       "description": "date the patron's card is set to expire"
140     },
141     "gonenoaddress": {
142       "type": ["string", "null"],
143       "description": "set to 1 if library marked this patron as having an unconfirmed address"
144     },
145     "lost": {
146       "type": ["string", "null"],
147       "description": "set to 1 if library marked this patron as having lost his card"
148     },
149     "debarred": {
150       "type": ["string", "null"],
151       "description": "until this date the patron can only check-in"
152     },
153     "debarredcomment": {
154       "type": ["string", "null"],
155       "description": "comment on the stop of the patron"
156     },
157     "contactname": {
158       "type": ["string", "null"],
159       "description": "used for children and professionals to include surname or last name of guarantor or organization name"
160     },
161     "contactfirstname": {
162       "type": ["string", "null"],
163       "description": "used for children to include first name of guarantor"
164     },
165     "contacttitle": {
166       "type": ["string", "null"],
167       "description": "used for children to include title of guarantor"
168     },
169     "guarantorid": {
170       "type": ["string", "null"],
171       "description": "borrowernumber used for children or professionals to link them to guarantor or organizations"
172     },
173     "borrowernotes": {
174       "type": ["string", "null"],
175       "description": "a note on the patron's account"
176     },
177     "relationship": {
178       "type": ["string", "null"],
179       "description": "used for children to include the relationship to their guarantor"
180     },
181     "sex": {
182       "type": ["string", "null"],
183       "description": "patron's gender"
184     },
185     "password": {
186       "type": ["string", "null"],
187       "description": "patron's encrypted password"
188     },
189     "flags": {
190       "type": ["string", "null"],
191       "description": "a number associated with the patron's permissions"
192     },
193     "userid": {
194       "type": ["string", "null"],
195       "description": "patron's login"
196     },
197     "opacnote": {
198       "type": ["string", "null"],
199       "description": "a note on the patron's account visible in OPAC and staff client"
200     },
201     "contactnote": {
202       "type": ["string", "null"],
203       "description": "a note related to patron's alternate address"
204     },
205     "sort1": {
206       "type": ["string", "null"],
207       "description": "a field that can be used for any information unique to the library"
208     },
209     "sort2": {
210       "type": ["string", "null"],
211       "description": "a field that can be used for any information unique to the library"
212     },
213     "altcontactfirstname": {
214       "type": ["string", "null"],
215       "description": "first name of alternate contact for the patron"
216     },
217     "altcontactsurname": {
218       "type": ["string", "null"],
219       "description": "surname or last name of the alternate contact for the patron"
220     },
221     "altcontactaddress1": {
222       "type": ["string", "null"],
223       "description": "the first address line for the alternate contact for the patron"
224     },
225     "altcontactaddress2": {
226       "type": ["string", "null"],
227       "description": "the second address line for the alternate contact for the patron"
228     },
229     "altcontactaddress3": {
230       "type": ["string", "null"],
231       "description": "the city for the alternate contact for the patron"
232     },
233     "altcontactstate": {
234       "type": ["string", "null"],
235       "description": "the state for the alternate contact for the patron"
236     },
237     "altcontactzipcode": {
238       "type": ["string", "null"],
239       "description": "the zipcode for the alternate contact for the patron"
240     },
241     "altcontactcountry": {
242       "type": ["string", "null"],
243       "description": "the country for the alternate contact for the patron"
244     },
245     "altcontactphone": {
246       "type": ["string", "null"],
247       "description": "the phone number for the alternate contact for the patron"
248     },
249     "smsalertnumber": {
250       "type": ["string", "null"],
251       "description": "the mobile phone number where the patron would like to receive notices (if SMS turned on)"
252     },
253     "sms_provider_id": {
254       "type": ["string", "null"],
255       "description": "the provider of the mobile phone number defined in smsalertnumber"
256     },
257     "privacy": {
258       "type": "string",
259       "description": "patron's privacy settings related to their reading history"
260     },
261     "privacy_guarantor_checkouts": {
262       "type": "string",
263       "description": "controls if relatives can see this patron's checkouts"
264     },
265     "checkprevcheckout": {
266       "type": "string",
267       "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'"
268     },
269     "updated_on": {
270       "type": "string",
271       "description": "time of last change could be useful for synchronization with external systems (among others)"
272     }
273   }
274 }