Bug 29620: Move the OpenAPI spec to YAML format
[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     x-koha-authorization:
36       permissions:
37         cash_management: cashup
38     x-koha-embed:
39       - manager
40 "/cashups/{cashup_id}":
41   get:
42     x-mojo-to: CashRegisters::Cashups#get
43     operationId: getCashup
44     tags:
45       - cashups
46     summary: Get cashup
47     parameters:
48       - $ref: ../parameters.yaml#/cashup_id_pp
49     produces:
50       - application/json
51     responses:
52       "200":
53         description: A cashup
54         schema:
55           $ref: ../definitions.yaml#/cashup
56       "403":
57         description: Access forbidden
58         schema:
59           $ref: ../definitions.yaml#/error
60       "404":
61         description: Patron not found
62         schema:
63           $ref: ../definitions.yaml#/error
64     x-koha-authorization:
65       permissions:
66         cash_management: cashup
67     x-koha-embed:
68       - summary