Bug 28020: (follow-up) Add docs about error_code on the API
[koha.git] / api / v1 / swagger / paths / cash_registers.yaml
1 ---
2 "/cash_registers/{cash_register_id}/cashups":
3   get:
4     x-mojo-to: CashRegisters::Cashups#list
5     operationId: listCashups
6     tags:
7       - cashups
8     summary: List cashups for the cash register
9     produces:
10       - application/json
11     parameters:
12       - $ref: ../parameters.yaml#/cash_register_id_pp
13       - $ref: ../parameters.yaml#/match
14       - $ref: ../parameters.yaml#/order_by
15       - $ref: ../parameters.yaml#/page
16       - $ref: ../parameters.yaml#/per_page
17       - $ref: ../parameters.yaml#/q_param
18       - $ref: ../parameters.yaml#/q_body
19       - $ref: ../parameters.yaml#/q_header
20     responses:
21       "200":
22         description: Cashups performed on this register
23         schema:
24           type: array
25           items:
26             $ref: ../definitions.yaml#/cashup
27       "403":
28         description: Access forbidden
29         schema:
30           $ref: ../definitions.yaml#/error
31       "404":
32         description: Register not found
33         schema:
34           $ref: ../definitions.yaml#/error
35       "500":
36         description: |
37           Internal server error. Possible `error_code` attribute values:
38
39           * `internal_server_error`
40         schema:
41           $ref: ../definitions.yaml#/error
42       "503":
43         description: Under maintenance
44         schema:
45           $ref: ../definitions.yaml#/error
46     x-koha-authorization:
47       permissions:
48         cash_management: cashup
49     x-koha-embed:
50       - manager
51 "/cashups/{cashup_id}":
52   get:
53     x-mojo-to: CashRegisters::Cashups#get
54     operationId: getCashup
55     tags:
56       - cashups
57     summary: Get cashup
58     parameters:
59       - $ref: ../parameters.yaml#/cashup_id_pp
60     produces:
61       - application/json
62     responses:
63       "200":
64         description: A cashup
65         schema:
66           $ref: ../definitions.yaml#/cashup
67       "403":
68         description: Access forbidden
69         schema:
70           $ref: ../definitions.yaml#/error
71       "404":
72         description: Patron not found
73         schema:
74           $ref: ../definitions.yaml#/error
75       "500":
76         description: |
77           Internal server error. Possible `error_code` attribute values:
78
79           * `internal_server_error`
80         schema:
81           $ref: ../definitions.yaml#/error
82       "503":
83         description: Under maintenance
84         schema:
85           $ref: ../definitions.yaml#/error
86     x-koha-authorization:
87       permissions:
88         cash_management: cashup
89     x-koha-embed:
90       - summary