Bug 28020: (follow-up) Add docs about error_code on the API
[koha.git] / api / v1 / swagger / paths / rotas.yaml
1 ---
2 "/rotas/{rota_id}/stages/{stage_id}/position":
3   put:
4     x-mojo-to: Stage#move
5     operationId: moveStage
6     summary: Update stage
7     tags:
8       - rotas
9     parameters:
10       - name: rota_id
11         in: path
12         required: true
13         description: A rotas ID
14         type: integer
15       - name: stage_id
16         in: path
17         required: true
18         description: A stages ID
19         type: integer
20       - name: position
21         in: body
22         required: true
23         description: A stages position in the rota
24         schema:
25           type: integer
26     produces:
27       - application/json
28     responses:
29       "200":
30         description: OK
31       "400":
32         description: Bad request
33         schema:
34           $ref: ../definitions.yaml#/error
35       "401":
36         description: Authentication required
37         schema:
38           $ref: ../definitions.yaml#/error
39       "403":
40         description: Access forbidden
41         schema:
42           $ref: ../definitions.yaml#/error
43       "404":
44         description: Position not found
45         schema:
46           $ref: ../definitions.yaml#/error
47       "500":
48         description: |
49           Internal server error. Possible `error_code` attribute values:
50
51           * `internal_server_error`
52         schema:
53           $ref: ../definitions.yaml#/error
54       "503":
55         description: Under maintenance
56         schema:
57           $ref: ../definitions.yaml#/error
58     x-koha-authorization:
59       permissions:
60         stockrotation: "1"