Line 0
Link Here
|
0 |
- |
1 |
{ |
|
|
2 |
"/acquisitions/orders": { |
3 |
"get": { |
4 |
"x-mojo-to": "Acquisitions::Orders#list_orders", |
5 |
"operationId": "listOrders", |
6 |
"tags": ["acquisitions","orders"], |
7 |
"produces": [ |
8 |
"application/json" |
9 |
], |
10 |
"parameters": [{ |
11 |
"name": "biblionumber", |
12 |
"in": "query", |
13 |
"description": "Identifier for a linked bibliographic record", |
14 |
"required": false, |
15 |
"type": "integer" |
16 |
}, { |
17 |
"name": "basketno", |
18 |
"in": "query", |
19 |
"description": "Identifier for a linked acquisition basket", |
20 |
"required": false, |
21 |
"type": "integer" |
22 |
}, { |
23 |
"name": "budget_id", |
24 |
"in": "query", |
25 |
"description": "Identifier for the budget the order goes against", |
26 |
"required": false, |
27 |
"type": "integer" |
28 |
}, { |
29 |
"name": "orderstatus", |
30 |
"in": "query", |
31 |
"description": "Current status for the order. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'", |
32 |
"required": false, |
33 |
"type": "string" |
34 |
}, { |
35 |
"$ref": "../parameters.json#/match" |
36 |
}, { |
37 |
"$ref": "../parameters.json#/order_by" |
38 |
}, { |
39 |
"$ref": "../parameters.json#/page" |
40 |
}, { |
41 |
"$ref": "../parameters.json#/per_page" |
42 |
}], |
43 |
"responses": { |
44 |
"200": { |
45 |
"description": "A list of orders", |
46 |
"schema": { |
47 |
"type": "array", |
48 |
"items": { |
49 |
"$ref": "../definitions.json#/order" |
50 |
} |
51 |
} |
52 |
}, |
53 |
"401": { |
54 |
"description": "Authentication required", |
55 |
"schema": { |
56 |
"$ref": "../definitions.json#/error" |
57 |
} |
58 |
}, |
59 |
"403": { |
60 |
"description": "Access forbidden", |
61 |
"schema": { |
62 |
"$ref": "../definitions.json#/error" |
63 |
} |
64 |
}, |
65 |
"404": { |
66 |
"description": "Vendor not found", |
67 |
"schema": { |
68 |
"$ref": "../definitions.json#/error" |
69 |
} |
70 |
}, |
71 |
"500": { |
72 |
"description": "Internal server error", |
73 |
"schema": { |
74 |
"$ref": "../definitions.json#/error" |
75 |
} |
76 |
}, |
77 |
"503": { |
78 |
"description": "Under maintenance", |
79 |
"schema": { |
80 |
"$ref": "../definitions.json#/error" |
81 |
} |
82 |
} |
83 |
}, |
84 |
"x-koha-authorization": { |
85 |
"permissions": { |
86 |
"acquisition": "order_manage", |
87 |
"acquisition": "order_manage_all" |
88 |
} |
89 |
} |
90 |
}, |
91 |
"post": { |
92 |
"x-mojo-to": "Acquisitions::Orders#add_order", |
93 |
"operationId": "addOrder", |
94 |
"tags": ["acquisitions","orders"], |
95 |
"parameters": [{ |
96 |
"name": "body", |
97 |
"in": "body", |
98 |
"description": "A JSON object representing an order", |
99 |
"required": true, |
100 |
"schema": { |
101 |
"$ref": "../definitions.json#/order" |
102 |
} |
103 |
}], |
104 |
"produces": [ |
105 |
"application/json" |
106 |
], |
107 |
"responses": { |
108 |
"200": { |
109 |
"description": "Vendor added", |
110 |
"schema": { |
111 |
"$ref": "../definitions.json#/order" |
112 |
} |
113 |
}, |
114 |
"401": { |
115 |
"description": "Authentication required", |
116 |
"schema": { |
117 |
"$ref": "../definitions.json#/error" |
118 |
} |
119 |
}, |
120 |
"403": { |
121 |
"description": "Access forbidden", |
122 |
"schema": { |
123 |
"$ref": "../definitions.json#/error" |
124 |
} |
125 |
}, |
126 |
"404": { |
127 |
"description": "Vendor not found", |
128 |
"schema": { |
129 |
"$ref": "../definitions.json#/error" |
130 |
} |
131 |
}, |
132 |
"500": { |
133 |
"description": "Internal server error", |
134 |
"schema": { |
135 |
"$ref": "../definitions.json#/error" |
136 |
} |
137 |
}, |
138 |
"503": { |
139 |
"description": "Under maintenance", |
140 |
"schema": { |
141 |
"$ref": "../definitions.json#/error" |
142 |
} |
143 |
} |
144 |
}, |
145 |
"x-koha-authorization": { |
146 |
"permissions": { |
147 |
"acquisition": "vendors_manage" |
148 |
} |
149 |
} |
150 |
} |
151 |
}, |
152 |
"/acquisitions/orders/{ordernumber}": { |
153 |
"get": { |
154 |
"x-mojo-to": "Acquisitions::Orders#get_order", |
155 |
"operationId": "getOrder", |
156 |
"tags": ["acquisitions","vendors"], |
157 |
"parameters": [{ |
158 |
"$ref": "../parameters.json#/vendoridPathParam" |
159 |
}], |
160 |
"produces": [ |
161 |
"application/json" |
162 |
], |
163 |
"responses": { |
164 |
"200": { |
165 |
"description": "A vendor", |
166 |
"schema": { |
167 |
"$ref": "../definitions.json#/vendor" |
168 |
} |
169 |
}, |
170 |
"401": { |
171 |
"description": "Authentication required", |
172 |
"schema": { |
173 |
"$ref": "../definitions.json#/error" |
174 |
} |
175 |
}, |
176 |
"403": { |
177 |
"description": "Access forbidden", |
178 |
"schema": { |
179 |
"$ref": "../definitions.json#/error" |
180 |
} |
181 |
}, |
182 |
"404": { |
183 |
"description": "Vendor not found", |
184 |
"schema": { |
185 |
"$ref": "../definitions.json#/error" |
186 |
} |
187 |
}, |
188 |
"500": { |
189 |
"description": "Internal server error", |
190 |
"schema": { |
191 |
"$ref": "../definitions.json#/error" |
192 |
} |
193 |
}, |
194 |
"503": { |
195 |
"description": "Under maintenance", |
196 |
"schema": { |
197 |
"$ref": "../definitions.json#/error" |
198 |
} |
199 |
} |
200 |
}, |
201 |
"x-koha-authorization": { |
202 |
"permissions": { |
203 |
"acquisition": "vendors_manage" |
204 |
} |
205 |
} |
206 |
}, |
207 |
"put": { |
208 |
"x-mojo-to": "Acquisitions::Orders#update_order", |
209 |
"operationId": "updateOrder", |
210 |
"tags": ["acquisitions","vendors"], |
211 |
"parameters": [{ |
212 |
"$ref": "../parameters.json#/vendoridPathParam" |
213 |
}, { |
214 |
"name": "body", |
215 |
"in": "body", |
216 |
"description": "A JSON object representing a vendor", |
217 |
"required": true, |
218 |
"schema": { |
219 |
"$ref": "../definitions.json#/vendor" |
220 |
} |
221 |
}], |
222 |
"produces": [ |
223 |
"application/json" |
224 |
], |
225 |
"responses": { |
226 |
"200": { |
227 |
"description": "A vendor", |
228 |
"schema": { |
229 |
"$ref": "../definitions.json#/vendor" |
230 |
} |
231 |
}, |
232 |
"401": { |
233 |
"description": "Authentication required", |
234 |
"schema": { |
235 |
"$ref": "../definitions.json#/error" |
236 |
} |
237 |
}, |
238 |
"403": { |
239 |
"description": "Access forbidden", |
240 |
"schema": { |
241 |
"$ref": "../definitions.json#/error" |
242 |
} |
243 |
}, |
244 |
"404": { |
245 |
"description": "Vendor not found", |
246 |
"schema": { |
247 |
"$ref": "../definitions.json#/error" |
248 |
} |
249 |
}, |
250 |
"500": { |
251 |
"description": "Internal server error", |
252 |
"schema": { |
253 |
"$ref": "../definitions.json#/error" |
254 |
} |
255 |
}, |
256 |
"503": { |
257 |
"description": "Under maintenance", |
258 |
"schema": { |
259 |
"$ref": "../definitions.json#/error" |
260 |
} |
261 |
} |
262 |
}, |
263 |
"x-koha-authorization": { |
264 |
"permissions": { |
265 |
"acquisition": "vendors_manage" |
266 |
} |
267 |
} |
268 |
}, |
269 |
"delete": { |
270 |
"x-mojo-to": "Acquisitions::Orders#delete_order", |
271 |
"operationId": "deleteOrder", |
272 |
"tags": ["acquisitions","vendors"], |
273 |
"parameters": [{ |
274 |
"$ref": "../parameters.json#/vendoridPathParam" |
275 |
}], |
276 |
"produces": [ |
277 |
"application/json" |
278 |
], |
279 |
"responses": { |
280 |
"200": { |
281 |
"description": "Vendor deleted", |
282 |
"schema": { |
283 |
"type": "string" |
284 |
} |
285 |
}, |
286 |
"401": { |
287 |
"description": "Authentication required", |
288 |
"schema": { |
289 |
"$ref": "../definitions.json#/error" |
290 |
} |
291 |
}, |
292 |
"403": { |
293 |
"description": "Access forbidden", |
294 |
"schema": { |
295 |
"$ref": "../definitions.json#/error" |
296 |
} |
297 |
}, |
298 |
"404": { |
299 |
"description": "Vendor not found", |
300 |
"schema": { |
301 |
"$ref": "../definitions.json#/error" |
302 |
} |
303 |
}, |
304 |
"500": { |
305 |
"description": "Internal server error", |
306 |
"schema": { |
307 |
"$ref": "../definitions.json#/error" |
308 |
} |
309 |
}, |
310 |
"503": { |
311 |
"description": "Under maintenance", |
312 |
"schema": { |
313 |
"$ref": "../definitions.json#/error" |
314 |
} |
315 |
} |
316 |
}, |
317 |
"x-koha-authorization": { |
318 |
"permissions": { |
319 |
"acquisition": "vendors_manage" |
320 |
} |
321 |
} |
322 |
} |
323 |
} |
324 |
} |