Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route
[koha.git] / api / v1 / swagger / paths / biblios.json
1 {
2   "/biblios/{biblio_id}": {
3     "get": {
4       "x-mojo-to": "Biblios#get",
5       "operationId": "getBiblio",
6       "tags": [
7         "biblios"
8       ],
9       "parameters": [
10         {
11           "$ref": "../parameters.json#/biblio_id_pp"
12         }
13       ],
14       "produces": [
15         "application/json",
16         "application/marcxml+xml",
17         "application/marc-in-json",
18         "application/marc",
19         "text/plain"
20       ],
21       "responses": {
22         "200": {
23           "description": "A biblio"
24         },
25         "401": {
26           "description": "Authentication required",
27           "schema": {
28             "$ref": "../definitions.json#/error"
29           }
30         },
31         "403": {
32           "description": "Access forbidden",
33           "schema": {
34             "$ref": "../definitions.json#/error"
35           }
36         },
37         "404": {
38           "description": "Biblio not found",
39           "schema": {
40             "$ref": "../definitions.json#/error"
41           }
42         },
43         "406": {
44           "description": "Not acceptable",
45           "schema": {
46             "type": "array",
47             "description": "Accepted content-types",
48             "items": {
49                 "type": "string"
50             }
51           }
52         },
53         "500": {
54           "description": "Internal server error",
55           "schema": {
56             "$ref": "../definitions.json#/error"
57           }
58         },
59         "503": {
60           "description": "Under maintenance",
61           "schema": {
62             "$ref": "../definitions.json#/error"
63           }
64         }
65       },
66       "x-koha-authorization": {
67         "permissions": {
68             "catalogue": "1"
69         }
70       }
71     },
72     "delete": {
73       "x-mojo-to": "Biblios#delete",
74       "operationId": "deleteBiblio",
75       "tags": [
76         "biblios"
77       ],
78       "parameters": [
79         {
80           "$ref": "../parameters.json#/biblio_id_pp"
81         }
82       ],
83       "produces": [
84         "application/json"
85       ],
86       "responses": {
87         "204": {
88           "description": "Biblio deleted",
89           "schema": {
90             "type": "string"
91           }
92         },
93         "401": {
94           "description": "Authentication required",
95           "schema": {
96             "$ref": "../definitions.json#/error"
97           }
98         },
99         "403": {
100           "description": "Access forbidden",
101           "schema": {
102             "$ref": "../definitions.json#/error"
103           }
104         },
105         "404": {
106           "description": "Biblio not found",
107           "schema": {
108             "$ref": "../definitions.json#/error"
109           }
110         },
111         "409": {
112           "description": "Unable to perform action on biblio",
113           "schema": {
114             "$ref": "../definitions.json#/error"
115           }
116         },
117         "500": {
118           "description": "Internal error",
119           "schema": {
120             "$ref": "../definitions.json#/error"
121           }
122         },
123         "503": {
124           "description": "Under maintenance",
125           "schema": {
126             "$ref": "../definitions.json#/error"
127           }
128         }
129       },
130       "x-koha-authorization": {
131         "permissions": {
132           "editcatalogue": "edit_catalogue"
133         }
134       }
135     }
136   },
137   "/biblios/{biblio_id}/items": {
138     "get": {
139       "x-mojo-to": "Biblios#get_items",
140       "operationId": "getBiblioItems",
141       "tags": [
142         "biblios",
143         "items"
144       ],
145       "parameters": [
146         {
147           "$ref": "../parameters.json#/biblio_id_pp"
148         },
149         {
150           "$ref": "../parameters.json#/match"
151         },
152         {
153           "$ref": "../parameters.json#/order_by"
154         },
155         {
156           "$ref": "../parameters.json#/page"
157         },
158         {
159           "$ref": "../parameters.json#/per_page"
160         },
161         {
162           "$ref": "../parameters.json#/q_param"
163         },
164         {
165           "$ref": "../parameters.json#/q_body"
166         },
167         {
168           "$ref": "../parameters.json#/q_header"
169         }
170       ],
171       "consumes": [
172         "application/json"
173       ],
174       "produces": [
175         "application/json"
176       ],
177       "responses": {
178         "200": {
179           "description": "A list of the items attached to the record",
180           "schema": {
181             "type": "array",
182             "items": {
183               "$ref": "../definitions.json#/item"
184             }
185           }
186         },
187         "401": {
188           "description": "Authentication required",
189           "schema": {
190             "$ref": "../definitions.json#/error"
191           }
192         },
193         "403": {
194           "description": "Access forbidden",
195           "schema": {
196             "$ref": "../definitions.json#/error"
197           }
198         },
199         "404": {
200           "description": "Biblio not found",
201           "schema": {
202             "$ref": "../definitions.json#/error"
203           }
204         },
205         "406": {
206           "description": "Not acceptable",
207           "schema": {
208             "type": "array",
209             "description": "Accepted content-types",
210             "items": {
211                 "type": "string"
212             }
213           }
214         },
215         "500": {
216           "description": "Internal server error",
217           "schema": {
218             "$ref": "../definitions.json#/error"
219           }
220         },
221         "503": {
222           "description": "Under maintenance",
223           "schema": {
224             "$ref": "../definitions.json#/error"
225           }
226         }
227       },
228       "x-koha-authorization": {
229         "permissions": {
230             "catalogue": "1"
231         }
232       }
233     }
234   },
235   "/biblios/{biblio_id}/pickup_locations": {
236     "get": {
237       "x-mojo-to": "Biblios#pickup_locations",
238       "operationId": "getBiblioPickupLocations",
239       "tags": [
240         "biblios",
241         "pickup_locations"
242       ],
243       "parameters": [
244         {
245           "$ref": "../parameters.json#/biblio_id_pp"
246         },
247         {
248           "name": "patron_id",
249           "in": "query",
250           "description": "Internal patron identifier",
251           "required": true,
252           "type": "integer"
253         },
254         {
255           "$ref": "../parameters.json#/match"
256         },
257         {
258           "$ref": "../parameters.json#/order_by"
259         },
260         {
261           "$ref": "../parameters.json#/page"
262         },
263         {
264           "$ref": "../parameters.json#/per_page"
265         },
266         {
267           "$ref": "../parameters.json#/q_param"
268         },
269         {
270           "$ref": "../parameters.json#/q_body"
271         },
272         {
273           "$ref": "../parameters.json#/q_header"
274         }
275       ],
276       "consumes": [
277         "application/json"
278       ],
279       "produces": [
280         "application/json"
281       ],
282       "responses": {
283         "200": {
284           "description": "Biblio pickup locations",
285           "schema": {
286             "type": "array",
287             "items": {
288               "$ref": "../definitions.json#/library"
289             }
290           }
291         },
292         "400": {
293           "description": "Missing or wrong parameters",
294           "schema": {
295             "$ref": "../definitions.json#/error"
296           }
297         },
298         "401": {
299           "description": "Authentication required",
300           "schema": {
301             "$ref": "../definitions.json#/error"
302           }
303         },
304         "403": {
305           "description": "Access forbidden",
306           "schema": {
307             "$ref": "../definitions.json#/error"
308           }
309         },
310         "404": {
311           "description": "Biblio not found",
312           "schema": {
313             "$ref": "../definitions.json#/error"
314           }
315         },
316         "500": {
317           "description": "Internal server error",
318           "schema": {
319             "$ref": "../definitions.json#/error"
320           }
321         },
322         "503": {
323           "description": "Under maintenance",
324           "schema": {
325             "$ref": "../definitions.json#/error"
326           }
327         }
328       },
329       "x-koha-authorization": {
330         "permissions": {
331           "reserveforothers": "place_holds"
332         }
333       }
334     }
335   },
336   "/public/biblios/{biblio_id}": {
337     "get": {
338       "x-mojo-to": "Biblios#get_public",
339       "operationId": "getBiblioPublic",
340       "tags": [
341         "biblios"
342       ],
343       "parameters": [
344         {
345           "$ref": "../parameters.json#/biblio_id_pp"
346         }
347       ],
348       "produces": [
349         "application/marcxml+xml",
350         "application/marc-in-json",
351         "application/marc",
352         "text/plain"
353       ],
354       "responses": {
355         "200": {
356           "description": "A biblio"
357         },
358         "401": {
359           "description": "Authentication required",
360           "schema": {
361             "$ref": "../definitions.json#/error"
362           }
363         },
364         "403": {
365           "description": "Access forbidden",
366           "schema": {
367             "$ref": "../definitions.json#/error"
368           }
369         },
370         "404": {
371           "description": "Biblio not found",
372           "schema": {
373             "$ref": "../definitions.json#/error"
374           }
375         },
376         "406": {
377           "description": "Not acceptable",
378           "schema": {
379             "type": "array",
380             "description": "Accepted content-types",
381             "items": {
382                 "type": "string"
383             }
384           }
385         },
386         "500": {
387           "description": "Internal server error",
388           "schema": {
389             "$ref": "../definitions.json#/error"
390           }
391         },
392         "503": {
393           "description": "Under maintenance",
394           "schema": {
395             "$ref": "../definitions.json#/error"
396           }
397         }
398       }
399     }
400   }
401 }