Lines 6-72
Link Here
|
6 |
"tags": ["patrons", "holds"], |
6 |
"tags": ["patrons", "holds"], |
7 |
"parameters": [ |
7 |
"parameters": [ |
8 |
{ |
8 |
{ |
9 |
"name": "reserve_id", |
9 |
"name": "hold_id", |
10 |
"in": "query", |
10 |
"in": "query", |
11 |
"description": "Internal reserve identifier", |
11 |
"description": "Internal reserve identifier", |
12 |
"type": "integer" |
12 |
"type": "integer" |
13 |
}, |
13 |
}, |
14 |
{ |
14 |
{ |
15 |
"name": "borrowernumber", |
15 |
"name": "patron_id", |
16 |
"in": "query", |
16 |
"in": "query", |
17 |
"description": "Internal patron identifier", |
17 |
"description": "Internal patron identifier", |
18 |
"type": "integer" |
18 |
"type": "integer" |
19 |
}, |
19 |
}, |
20 |
{ |
20 |
{ |
21 |
"name": "reservedate", |
21 |
"name": "hold_date", |
22 |
"in": "query", |
22 |
"in": "query", |
23 |
"description": "Reserve date", |
23 |
"description": "Hold", |
24 |
"type": "string" |
24 |
"type": "string", |
|
|
25 |
"format": "date" |
25 |
}, |
26 |
}, |
26 |
{ |
27 |
{ |
27 |
"name": "biblionumber", |
28 |
"name": "biblio_id", |
28 |
"in": "query", |
29 |
"in": "query", |
29 |
"description": "Internal biblio identifier", |
30 |
"description": "Internal biblio identifier", |
30 |
"type": "integer" |
31 |
"type": "integer" |
31 |
}, |
32 |
}, |
32 |
{ |
33 |
{ |
33 |
"name": "branchcode", |
34 |
"name": "pickup_library_id", |
34 |
"in": "query", |
|
|
35 |
"description": "Branch code", |
36 |
"type": "string" |
37 |
}, |
38 |
{ |
39 |
"name": "notificationdate", |
40 |
"in": "query", |
35 |
"in": "query", |
41 |
"description": "Notification date", |
36 |
"description": "Internal library identifier for the pickup library", |
42 |
"type": "string" |
37 |
"type": "string" |
43 |
}, |
38 |
}, |
44 |
{ |
39 |
{ |
45 |
"name": "reminderdate", |
40 |
"name": "cancelation_date", |
46 |
"in": "query", |
41 |
"in": "query", |
47 |
"description": "Reminder date", |
42 |
"description": "The date the hold was cancelled", |
48 |
"type": "string" |
43 |
"type": "string", |
49 |
}, |
44 |
"format": "date" |
50 |
{ |
|
|
51 |
"name": "cancellationdate", |
52 |
"in": "query", |
53 |
"description": "Cancellation date", |
54 |
"type": "string" |
55 |
}, |
45 |
}, |
56 |
{ |
46 |
{ |
57 |
"name": "reservenotes", |
47 |
"name": "notes", |
58 |
"in": "query", |
48 |
"in": "query", |
59 |
"description": "Reserve notes", |
49 |
"description": "Notes related to this hold", |
60 |
"type": "string" |
50 |
"type": "string" |
61 |
}, |
51 |
}, |
62 |
{ |
52 |
{ |
63 |
"name": "priority", |
53 |
"name": "priority", |
64 |
"in": "query", |
54 |
"in": "query", |
65 |
"description": "Priority", |
55 |
"description": "Where in the queue the patron sits", |
66 |
"type": "integer" |
56 |
"type": "integer" |
67 |
}, |
57 |
}, |
68 |
{ |
58 |
{ |
69 |
"name": "found", |
59 |
"name": "status", |
70 |
"in": "query", |
60 |
"in": "query", |
71 |
"description": "Found status", |
61 |
"description": "Found status", |
72 |
"type": "string" |
62 |
"type": "string" |
Lines 78-114
Link Here
|
78 |
"type": "string" |
68 |
"type": "string" |
79 |
}, |
69 |
}, |
80 |
{ |
70 |
{ |
81 |
"name": "itemnumber", |
71 |
"name": "item_id", |
82 |
"in": "query", |
72 |
"in": "query", |
83 |
"description": "Internal item identifier", |
73 |
"description": "Internal item identifier", |
84 |
"type": "integer" |
74 |
"type": "integer" |
85 |
}, |
75 |
}, |
86 |
{ |
76 |
{ |
87 |
"name": "waitingdate", |
77 |
"name": "waiting_date", |
88 |
"in": "query", |
78 |
"in": "query", |
89 |
"description": "Date the item was marked as waiting for the patron", |
79 |
"description": "Date the item was marked as waiting for the patron", |
90 |
"type": "string" |
80 |
"type": "string" |
91 |
}, |
81 |
}, |
92 |
{ |
82 |
{ |
93 |
"name": "expirationdate", |
83 |
"name": "expiration_date", |
94 |
"in": "query", |
84 |
"in": "query", |
95 |
"description": "Date the hold expires", |
85 |
"description": "Date the hold expires", |
96 |
"type": "string" |
86 |
"type": "string" |
97 |
}, |
87 |
}, |
98 |
{ |
88 |
{ |
99 |
"name": "lowestPriority", |
89 |
"name": "lowest_priority", |
100 |
"in": "query", |
90 |
"in": "query", |
101 |
"description": "Lowest priority", |
91 |
"description": "Lowest priority", |
102 |
"type": "integer" |
92 |
"type": "boolean" |
103 |
}, |
93 |
}, |
104 |
{ |
94 |
{ |
105 |
"name": "suspend", |
95 |
"name": "suspended", |
106 |
"in": "query", |
96 |
"in": "query", |
107 |
"description": "Suspended", |
97 |
"description": "Suspended", |
108 |
"type": "integer" |
98 |
"type": "boolean" |
109 |
}, |
99 |
}, |
110 |
{ |
100 |
{ |
111 |
"name": "suspend_until", |
101 |
"name": "suspended_until", |
112 |
"in": "query", |
102 |
"in": "query", |
113 |
"description": "Suspended until", |
103 |
"description": "Suspended until", |
114 |
"type": "string" |
104 |
"type": "string" |
Lines 154-161
Link Here
|
154 |
} |
144 |
} |
155 |
}, |
145 |
}, |
156 |
"x-koha-authorization": { |
146 |
"x-koha-authorization": { |
157 |
"allow-owner": true, |
|
|
158 |
"allow-guarantor": true, |
159 |
"permissions": { |
147 |
"permissions": { |
160 |
"borrowers": "edit_borrowers" |
148 |
"borrowers": "edit_borrowers" |
161 |
} |
149 |
} |
Lines 173-204
Link Here
|
173 |
"schema": { |
161 |
"schema": { |
174 |
"type": "object", |
162 |
"type": "object", |
175 |
"properties": { |
163 |
"properties": { |
176 |
"borrowernumber": { |
164 |
"patron_id": { |
177 |
"description": "Internal patron identifier", |
165 |
"description": "Internal patron identifier", |
178 |
"type": "integer" |
166 |
"type": "integer" |
179 |
}, |
167 |
}, |
180 |
"biblionumber": { |
168 |
"biblio_id": { |
181 |
"description": "Biblio internal identifier", |
169 |
"description": "Internal biblio identifier", |
182 |
"type": "integer" |
170 |
"type": [ "integer", "null" ] |
183 |
}, |
171 |
}, |
184 |
"itemnumber": { |
172 |
"item_id": { |
185 |
"description": "Item internal identifier", |
173 |
"description": "Internal item identifier", |
186 |
"type": "integer" |
174 |
"type": [ "integer", "null" ] |
187 |
}, |
175 |
}, |
188 |
"branchcode": { |
176 |
"pickup_library_id": { |
189 |
"description": "Pickup location", |
177 |
"description": "Internal library identifier for the pickup library", |
190 |
"type": "string" |
178 |
"type": "string" |
191 |
}, |
179 |
}, |
192 |
"expirationdate": { |
180 |
"expiration_date": { |
193 |
"description": "Hold end date", |
181 |
"description": "Hold end date", |
194 |
"type": "string", |
182 |
"type": ["string", "null"], |
195 |
"format": "date" |
183 |
"format": "date" |
196 |
}, |
184 |
}, |
197 |
"itemtype": { |
185 |
"notes": { |
|
|
186 |
"description": "Notes related to this hold", |
187 |
"type": [ "string", "null" ] |
188 |
}, |
189 |
"item_type": { |
198 |
"description": "Limit hold on one itemtype (ignored for item-level holds)", |
190 |
"description": "Limit hold on one itemtype (ignored for item-level holds)", |
199 |
"type": "string" |
191 |
"type": [ "string", "null" ] |
200 |
} |
192 |
} |
201 |
} |
193 |
}, |
|
|
194 |
"required": [ "patron_id", "pickup_library_id" ] |
202 |
} |
195 |
} |
203 |
} |
196 |
} |
204 |
], |
197 |
], |
Lines 249-268
Link Here
|
249 |
} |
242 |
} |
250 |
}, |
243 |
}, |
251 |
"x-koha-authorization": { |
244 |
"x-koha-authorization": { |
252 |
"allow-owner": true, |
|
|
253 |
"permissions": { |
245 |
"permissions": { |
254 |
"reserveforothers": "1" |
246 |
"reserveforothers": "1" |
255 |
} |
247 |
} |
256 |
} |
248 |
} |
257 |
} |
249 |
} |
258 |
}, |
250 |
}, |
259 |
"/holds/{reserve_id}": { |
251 |
"/holds/{hold_id}": { |
260 |
"put": { |
252 |
"put": { |
261 |
"x-mojo-to": "Hold#edit", |
253 |
"x-mojo-to": "Hold#edit", |
262 |
"operationId": "editHold", |
254 |
"operationId": "editHold", |
263 |
"tags": ["holds"], |
255 |
"tags": ["holds"], |
264 |
"parameters": [{ |
256 |
"parameters": [{ |
265 |
"$ref": "../parameters.json#/holdIdPathParam" |
257 |
"$ref": "../parameters.json#/hold_id_pp" |
266 |
}, { |
258 |
}, { |
267 |
"name": "body", |
259 |
"name": "body", |
268 |
"in": "body", |
260 |
"in": "body", |
Lines 336-343
Link Here
|
336 |
} |
328 |
} |
337 |
}, |
329 |
}, |
338 |
"x-koha-authorization": { |
330 |
"x-koha-authorization": { |
339 |
"allow-owner": true, |
|
|
340 |
"allow-guarantor": true, |
341 |
"permissions": { |
331 |
"permissions": { |
342 |
"reserveforothers": "1" |
332 |
"reserveforothers": "1" |
343 |
} |
333 |
} |
Lines 348-354
Link Here
|
348 |
"operationId": "deleteHold", |
338 |
"operationId": "deleteHold", |
349 |
"tags": ["holds"], |
339 |
"tags": ["holds"], |
350 |
"parameters": [{ |
340 |
"parameters": [{ |
351 |
"$ref": "../parameters.json#/holdIdPathParam" |
341 |
"$ref": "../parameters.json#/hold_id_pp" |
352 |
} |
342 |
} |
353 |
], |
343 |
], |
354 |
"produces": ["application/json"], |
344 |
"produces": ["application/json"], |