Bug 30719: (QA follow-up) Rename illbatches endpoint to ill/batches
[koha.git] / api / v1 / swagger / paths / ill_batches.yaml
1 ---
2 /ill/batches:
3   get:
4     x-mojo-to: Illbatches#list
5     operationId: listIllbatches
6     tags:
7       - ill_batches
8     summary: List ILL batches
9     parameters: []
10     produces:
11       - application/json
12     responses:
13       "200":
14         description: A list of ILL batches
15         schema:
16           $ref: "../swagger.yaml#/definitions/ill_batches"
17       "401":
18         description: Authentication required
19         schema:
20           $ref: "../swagger.yaml#/definitions/error"
21       "403":
22         description: Access forbidden
23         schema:
24           $ref: "../swagger.yaml#/definitions/error"
25       "404":
26         description: ILL batches not found
27         schema:
28           $ref: "../swagger.yaml#/definitions/error"
29       "500":
30         description: |
31           Internal server error. Possible `error_code` attribute values:
32
33           * `internal_server_error`
34         schema:
35           $ref: "../swagger.yaml#/definitions/error"
36       "503":
37         description: Under maintenance
38         schema:
39           $ref: "../swagger.yaml#/definitions/error"
40     x-koha-authorization:
41       permissions:
42         ill: "1"
43   post:
44     x-mojo-to: Illbatches#add
45     operationId: addIllbatch
46     tags:
47       - ill_batches
48     summary: Add ILL batch
49     parameters:
50       - name: body
51         in: body
52         description: A JSON object containing informations about the new batch
53         required: true
54         schema:
55           $ref: "../swagger.yaml#/definitions/ill_batch"
56     produces:
57       - application/json
58     responses:
59       "201":
60         description: Batch added
61         schema:
62           $ref: "../swagger.yaml#/definitions/ill_batch"
63       "400":
64         description: Bad request
65         schema:
66           $ref: "../swagger.yaml#/definitions/error"
67       "401":
68         description: Authentication required
69         schema:
70           $ref: "../swagger.yaml#/definitions/error"
71       "403":
72         description: Access forbidden
73         schema:
74           $ref: "../swagger.yaml#/definitions/error"
75       "404":
76         description: Patron with given cardnumber not found
77         schema:
78           $ref: "../swagger.yaml#/definitions/error"
79       "409":
80         description: Conflict in creating resource
81         schema:
82           $ref: "../swagger.yaml#/definitions/error"
83       "500":
84         description: |
85           Internal server error. Possible `error_code` attribute values:
86
87           * `internal_server_error`
88         schema:
89           $ref: "../swagger.yaml#/definitions/error"
90       "503":
91         description: Under maintenance
92         schema:
93           $ref: "../swagger.yaml#/definitions/error"
94     x-koha-authorization:
95       permissions:
96         ill: "1"
97 "/ill/batches/{ill_batch_id}":
98   get:
99     x-mojo-to: Illbatches#get
100     operationId: getIllbatches
101     tags:
102       - ill_batches
103     summary: Get ILL batch
104     parameters:
105       - name: ill_batch_id
106         in: path
107         description: ILL batch id/name/contents
108         required: true
109         type: string
110     produces:
111       - application/json
112     responses:
113       "200":
114         description: An ILL batch
115         schema:
116           $ref: "../swagger.yaml#/definitions/ill_batch"
117       "401":
118         description: Authentication required
119         schema:
120           $ref: "../swagger.yaml#/definitions/error"
121       "403":
122         description: Access forbidden
123         schema:
124           $ref: "../swagger.yaml#/definitions/error"
125       "404":
126         description: ILL batch not found
127         schema:
128           $ref: "../swagger.yaml#/definitions/error"
129       "500":
130         description: |
131           Internal server error. Possible `error_code` attribute values:
132
133           * `internal_server_error`
134         schema:
135           $ref: "../swagger.yaml#/definitions/error"
136       "503":
137         description: Under maintenance
138         schema:
139           $ref: "../swagger.yaml#/definitions/error"
140     x-koha-authorization:
141       permissions:
142         ill: "1"
143   put:
144     x-mojo-to: Illbatches#update
145     operationId: updateIllBatch
146     tags:
147       - ill_batches
148     summary: Update batch
149     parameters:
150       - $ref: "../swagger.yaml#/parameters/ill_batch_id_pp"
151       - name: body
152         in: body
153         description: A JSON object containing information on the batch
154         required: true
155         schema:
156           $ref: "../swagger.yaml#/definitions/ill_batch"
157     consumes:
158       - application/json
159     produces:
160       - application/json
161     responses:
162       "200":
163         description: An ILL batch
164         schema:
165           $ref: "../swagger.yaml#/definitions/ill_batch"
166       "400":
167         description: Bad request
168         schema:
169           $ref: "../swagger.yaml#/definitions/error"
170       "401":
171         description: Authentication required
172         schema:
173           $ref: "../swagger.yaml#/definitions/error"
174       "403":
175         description: Access forbidden
176         schema:
177           $ref: "../swagger.yaml#/definitions/error"
178       "404":
179         description: ILL batch not found
180         schema:
181           $ref: "../swagger.yaml#/definitions/error"
182       "500":
183         description: |
184           Internal server error. Possible `error_code` attribute values:
185
186           * `internal_server_error`
187         schema:
188           $ref: "../swagger.yaml#/definitions/error"
189       "503":
190         description: Under maintenance
191         schema:
192           $ref: "../swagger.yaml#/definitions/error"
193     x-koha-authorization:
194       permissions:
195         ill: "1"
196   delete:
197     x-mojo-to: Illbatches#delete
198     operationId: deleteBatch
199     tags:
200       - ill_batches
201     summary: Delete ILL batch
202     parameters:
203       - $ref: "../swagger.yaml#/parameters/ill_batch_id_pp"
204     produces:
205       - application/json
206     responses:
207       "204":
208         description: ILL batch deleted
209         schema:
210           type: string
211       "401":
212         description: Authentication required
213         schema:
214           $ref: "../swagger.yaml#/definitions/error"
215       "403":
216         description: Access forbidden
217         schema:
218           $ref: "../swagger.yaml#/definitions/error"
219       "404":
220         description: ILL batch not found
221         schema:
222           $ref: "../swagger.yaml#/definitions/error"
223       "500":
224         description: |
225           Internal server error. Possible `error_code` attribute values:
226
227           * `internal_server_error`
228         schema:
229           $ref: "../swagger.yaml#/definitions/error"
230       "503":
231         description: Under maintenance
232         schema:
233           $ref: "../swagger.yaml#/definitions/error"
234     x-koha-authorization:
235       permissions:
236         ill: "1"