1b0ebce147dc70a529bc32f4829aba4b51d50b15
[koha.git] / api / v1 / swagger / paths / acquisitions_funds.json
1 {
2   "/acquisitions/funds": {
3     "get": {
4       "x-mojo-to": "Acquisitions::Funds#list",
5       "operationId": "listFunds",
6       "tags": ["acquisitions","funds"],
7       "produces": [
8         "application/json"
9       ],
10       "parameters": [{
11         "name": "name",
12         "in": "query",
13         "description": "Case insensitive search on fund name",
14         "required": false,
15         "type": "string"
16       },
17       {
18         "name": "fund_owner_id",
19         "in": "query",
20         "description": "Display only the funds that belongs to the given patron ID",
21         "required": false,
22         "type": "integer"
23       },
24       {
25         "$ref": "../parameters.json#/match"
26       },
27       {
28         "$ref": "../parameters.json#/order_by"
29       },
30       {
31         "$ref": "../parameters.json#/page"
32       },
33       {
34         "$ref": "../parameters.json#/per_page"
35       }
36       ],
37       "responses": {
38         "200": {
39           "description": "A list of funds",
40           "schema": {
41             "type": "array",
42             "items": {
43               "$ref": "../definitions.json#/fund"
44             }
45           }
46         },
47         "401": {
48           "description": "Authentication required",
49           "schema": {
50             "$ref": "../definitions.json#/error"
51           }
52         },
53         "403": {
54           "description": "Access forbidden",
55           "schema": {
56             "$ref": "../definitions.json#/error"
57           }
58         },
59         "404": {
60           "description": "Fund not found",
61           "schema": {
62             "$ref": "../definitions.json#/error"
63           }
64         },
65         "500": {
66           "description": "Internal server error",
67           "schema": {
68             "$ref": "../definitions.json#/error"
69           }
70         },
71         "503": {
72           "description": "Under maintenance",
73           "schema": {
74             "$ref": "../definitions.json#/error"
75           }
76         }
77       },
78       "x-koha-authorization": {
79         "permissions": {
80           "acquisition": "budget_manage_all"
81         }
82       }
83     }
84   }
85 }