Bug 27947: Add cancellation reason to article request
[koha.git] / api / v1 / swagger / paths / patrons_holds.json
1 {
2   "/patrons/{patron_id}/holds": {
3     "get": {
4       "x-mojo-to": "Patrons::Holds#list",
5       "operationId": "getPatronHolds",
6       "tags": [
7         "holds"
8       ],
9       "summary": "List holds for a patron",
10       "parameters": [
11         {
12           "$ref": "../parameters.json#/patron_id_pp"
13         },
14         {
15           "$ref": "../parameters.json#/match"
16         },
17         {
18           "$ref": "../parameters.json#/order_by"
19         },
20         {
21           "$ref": "../parameters.json#/page"
22         },
23         {
24           "$ref": "../parameters.json#/per_page"
25         },
26         {
27           "$ref": "../parameters.json#/q_param"
28         },
29         {
30           "$ref": "../parameters.json#/q_body"
31         },
32         {
33           "$ref": "../parameters.json#/q_header"
34         }
35       ],
36       "produces": [
37         "application/json"
38       ],
39       "responses": {
40         "200": {
41           "description": "The patron holds",
42           "schema": {
43             "type": "array",
44             "items": {
45               "$ref": "../definitions.json#/hold"
46             }
47           }
48         },
49         "401": {
50           "description": "Authentication required",
51           "schema": {
52             "$ref": "../definitions.json#/error"
53           }
54         },
55         "403": {
56           "description": "Access forbidden",
57           "schema": {
58             "$ref": "../definitions.json#/error"
59           }
60         },
61         "404": {
62           "description": "Patron not found",
63           "schema": {
64             "$ref": "../definitions.json#/error"
65           }
66         },
67         "500": {
68           "description": "Internal server error",
69           "schema": {
70             "$ref": "../definitions.json#/error"
71           }
72         },
73         "503": {
74           "description": "Under maintenance",
75           "schema": {
76             "$ref": "../definitions.json#/error"
77           }
78         }
79       },
80       "x-koha-authorization": {
81         "permissions": {
82           "borrowers": "edit_borrowers"
83         }
84       }
85     }
86   }
87 }