Bug 29032: Pre-load ILL backends to speed up response
[koha.git] / api / v1 / swagger / paths / return_claims.json
1 {
2   "/return_claims": {
3     "post": {
4       "x-mojo-to": "ReturnClaims#claim_returned",
5       "operationId": "claimReturned",
6       "summary": "Add a return claim",
7       "tags": [
8         "return_claims"
9       ],
10       "parameters": [
11         {
12           "name": "body",
13           "in": "body",
14           "description": "A JSON object containing fields to modify",
15           "required": true,
16           "schema": {
17             "type": "object",
18             "properties": {
19               "item_id" : {
20                 "description": "Internal item id to claim as returned",
21                 "type": "integer"
22               },
23               "notes": {
24                 "description": "Notes about this return claim",
25                 "type": "string"
26               },
27               "created_by": {
28                 "description": "User id for the librarian submitting this claim",
29                 "type": "string"
30               },
31               "charge_lost_fee": {
32                 "description": "Charge a lost fee if true and Koha is set to allow a choice. Ignored otherwise.",
33                 "type": "boolean"
34               }
35             },
36             "additionalProperties": false
37           }
38         }
39       ],
40       "produces": [
41         "application/json"
42       ],
43       "responses": {
44         "201": {
45           "description": "Created claim",
46           "schema": {
47             "$ref": "../definitions.json#/return_claim"
48           }
49         },
50         "400": {
51           "description": "Bad request",
52           "schema": {
53             "$ref": "../definitions.json#/error"
54           }
55         },
56         "401": {
57           "description": "Authentication required",
58           "schema": {
59             "$ref": "../definitions.json#/error"
60           }
61         },
62         "403": {
63           "description": "Access forbidden",
64           "schema": {
65             "$ref": "../definitions.json#/error"
66           }
67         },
68         "404": {
69             "description": "Checkout not found",
70             "schema": {
71                 "$ref": "../definitions.json#/error"
72             }
73         },
74         "409": {
75             "description": "Conflict creating the resource",
76             "schema": {
77                 "$ref": "../definitions.json#/error"
78             }
79         },
80         "500": {
81           "description": "Internal server error",
82           "schema": {
83             "$ref": "../definitions.json#/error"
84           }
85         },
86         "503": {
87           "description": "Under maintenance",
88           "schema": {
89             "$ref": "../definitions.json#/error"
90           }
91         }
92       },
93       "x-koha-authorization": {
94         "permissions": {
95           "circulate": "circulate_remaining_permissions"
96         }
97       }
98     }
99   },
100   "/return_claims/{claim_id}/notes": {
101     "put": {
102       "x-mojo-to": "ReturnClaims#update_notes",
103       "operationId": "updateClaimNotes",
104       "summary": "Update notes",
105       "tags": [
106         "return_claims"
107       ],
108       "parameters": [
109         {
110           "name": "claim_id",
111           "in": "path",
112           "required": true,
113           "description": "Unique identifier for the claim whose notes are to be updated",
114           "type": "integer"
115         },
116         {
117           "name": "body",
118           "in": "body",
119           "description": "A JSON object containing fields to modify",
120           "required": true,
121           "schema": {
122             "type": "object",
123             "properties": {
124               "notes": {
125                 "description": "Notes about this return claim",
126                 "type": "string"
127               },
128               "updated_by": {
129                 "description": "Interal identifier for the librarian updating the claim notes",
130                 "type": "string"
131               }
132             },
133             "additionalProperties": false
134           }
135         }
136       ],
137       "produces": [
138         "application/json"
139       ],
140       "responses": {
141         "200": {
142           "description": "Claim notes updated",
143           "schema": {
144             "$ref": "../definitions.json#/return_claim"
145           }
146         },
147         "400": {
148           "description": "Bad request",
149           "schema": {
150             "$ref": "../definitions.json#/error"
151           }
152         },
153         "401": {
154           "description": "Authentication required",
155           "schema": {
156             "$ref": "../definitions.json#/error"
157           }
158         },
159         "403": {
160           "description": "Access forbidden",
161           "schema": {
162             "$ref": "../definitions.json#/error"
163           }
164         },
165         "404": {
166           "description": "Claim not found",
167           "schema": {
168             "$ref": "../definitions.json#/error"
169           }
170         },
171         "500": {
172           "description": "Internal server error",
173           "schema": {
174             "$ref": "../definitions.json#/error"
175           }
176         },
177         "503": {
178           "description": "Under maintenance",
179           "schema": {
180             "$ref": "../definitions.json#/error"
181           }
182         }
183       },
184       "x-koha-authorization": {
185         "permissions": {
186           "circulate": "circulate_remaining_permissions"
187         }
188       }
189     }
190   },
191   "/return_claims/{claim_id}": {
192     "delete": {
193       "x-mojo-to": "ReturnClaims#delete_claim",
194       "operationId": "deletedClaim",
195       "summary": "Delete claim",
196       "tags": [ "return_claims" ],
197       "parameters": [
198         {
199           "name": "claim_id",
200           "in": "path",
201           "required": true,
202           "description": "Unique identifier for the claim to be deleted",
203           "type": "integer"
204         }
205       ],
206       "produces": [
207         "application/json"
208       ],
209       "responses": {
210         "204": {
211           "description": "Claim deleted",
212           "schema": {
213             "$ref": "../definitions.json#/return_claim"
214           }
215         },
216         "400": {
217           "description": "Bad request",
218           "schema": {
219             "$ref": "../definitions.json#/error"
220           }
221         },
222         "401": {
223           "description": "Authentication required",
224           "schema": {
225             "$ref": "../definitions.json#/error"
226           }
227         },
228         "403": {
229           "description": "Access forbidden",
230           "schema": {
231             "$ref": "../definitions.json#/error"
232           }
233         },
234         "404": {
235           "description": "Claim not found",
236           "schema": {
237             "$ref": "../definitions.json#/error"
238           }
239         },
240         "500": {
241           "description": "Internal server error",
242           "schema": {
243             "$ref": "../definitions.json#/error"
244           }
245         },
246         "503": {
247           "description": "Under maintenance",
248           "schema": {
249             "$ref": "../definitions.json#/error"
250           }
251         }
252       },
253       "x-koha-authorization": {
254         "permissions": {
255           "circulate": "circulate_remaining_permissions"
256         }
257       }
258     }
259   },
260   "/return_claims/{claim_id}/resolve": {
261     "put": {
262       "x-mojo-to": "ReturnClaims#resolve_claim",
263       "operationId": "updateClaimResolve",
264       "summary": "Resolve claim",
265       "tags": [ "return_claims" ],
266       "parameters": [
267         {
268           "name": "claim_id",
269           "in": "path",
270           "required": true,
271           "description": "Unique identifier for the claim to be resolved",
272           "type": "integer"
273         },
274         {
275           "name": "body",
276           "in": "body",
277           "description": "A JSON object containing fields to modify",
278           "required": true,
279           "schema": {
280             "type": "object",
281             "properties": {
282               "resolution": {
283                 "description": "The RETURN_CLAIM_RESOLUTION code to be used to resolve the calim",
284                 "type": "string"
285               },
286               "resolved_by": {
287                 "description": "User id for the librarian resolving the claim",
288                 "type": "string"
289               },
290               "new_lost_status": {
291                 "description": "New lost status to set to the item",
292                 "type": "string"
293               }
294             },
295             "additionalProperties": false
296           }
297         }
298       ],
299       "produces": [
300         "application/json"
301       ],
302       "responses": {
303         "200": {
304           "description": "Claim resolved",
305           "schema": {
306             "$ref": "../definitions.json#/return_claim"
307           }
308         },
309         "400": {
310           "description": "Bad request",
311           "schema": {
312             "$ref": "../definitions.json#/error"
313           }
314         },
315         "401": {
316           "description": "Authentication required",
317           "schema": {
318             "$ref": "../definitions.json#/error"
319           }
320         },
321         "403": {
322           "description": "Access forbidden",
323           "schema": {
324             "$ref": "../definitions.json#/error"
325           }
326         },
327         "404": {
328           "description": "Claim not found",
329           "schema": {
330             "$ref": "../definitions.json#/error"
331           }
332         },
333         "500": {
334           "description": "Internal server error",
335           "schema": {
336             "$ref": "../definitions.json#/error"
337           }
338         },
339         "503": {
340           "description": "Under maintenance",
341           "schema": {
342             "$ref": "../definitions.json#/error"
343           }
344         }
345       },
346       "x-koha-authorization": {
347         "permissions": {
348           "circulate": "circulate_remaining_permissions"
349         }
350       }
351     }
352   }
353 }