Bug 27947: Add cancellation reason to article request
[koha.git] / api / v1 / swagger / paths / article_requests.json
1 {
2     "/article_requests/{ar_id}": {
3         "delete": {
4             "x-mojo-to": "ArticleRequests#cancel",
5             "operationId": "cancelArticleRequest",
6             "tags": [
7                 "article_requests"
8             ],
9             "summary": "Cancel article requests",
10             "parameters": [
11                 {
12                     "$ref": "../parameters.json#/ar_id_pp"
13                 },
14                 {
15                     "$ref": "../parameters.json#/ar_reason_qp"
16                 },
17                 {
18                     "$ref": "../parameters.json#/ar_notes_qp"
19                 }
20             ],
21             "produces": ["application/json"],
22             "responses": {
23                 "204": {
24                     "description": "Article request canceled"
25                 },
26                 "400": {
27                     "description": "Bad request",
28                     "schema": {
29                         "$ref": "../definitions.json#/error"
30                     }
31                 },
32                 "401": {
33                     "description": "Authentication required",
34                     "schema": {
35                         "$ref": "../definitions.json#/error"
36                     }
37                 },
38                 "403": {
39                     "description": "Access forbidden",
40                     "schema": {
41                         "$ref": "../definitions.json#/error"
42                     }
43                 },
44                 "404": {
45                     "description": "Patron not found",
46                     "schema": {
47                         "$ref": "../definitions.json#/error"
48                     }
49                 },
50                 "500": {
51                     "description": "Internal server error",
52                     "schema": {
53                         "$ref": "../definitions.json#/error"
54                     }
55                 },
56                 "503": {
57                     "description": "Under maintenance",
58                     "schema": {
59                         "$ref": "../definitions.json#/error"
60                     }
61                 }
62             },
63             "x-koha-authorization": {
64                 "permissions": {
65                     "reserveforothers": "1"
66                   }
67             }
68         }
69     }
70 }