Bug 19661: REST API - Funds Endpoint
[koha.git] / api / v1 / swagger / paths / acquisitions_funds.json
1 {
2   "/acquisitions/funds": {
3     "get": {
4       "x-mojo-to": "Acquisitions::Funds#list_funds",
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": "budget_owner_id",
19         "in": "query",
20         "description": "Display only the funds that belongs to the given borrowernumber",
21         "required": false,
22         "type": "integer"
23       }
24       ],
25       "responses": {
26         "200": {
27           "description": "A list of funds",
28           "schema": {
29             "type": "array",
30             "items": {
31               "$ref": "../definitions.json#/fund"
32             }
33           }
34         },
35         "401": {
36           "description": "Authentication required",
37           "schema": {
38             "$ref": "../definitions.json#/error"
39           }
40         },
41         "403": {
42           "description": "Access forbidden",
43           "schema": {
44             "$ref": "../definitions.json#/error"
45           }
46         },
47         "404": {
48           "description": "Fund not found",
49           "schema": {
50             "$ref": "../definitions.json#/error"
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           "acquisition": "budget_manage_all"
69         }
70       }
71     }
72   }
73 }