Raw
1 get:
2 operationId: GetRefundReasons
3 summary: List Refund Reasons
4 description: >-
5 Retrieve a list of refund reasons. The refund reasons can be filtered by
6 fields such as `id`. The refund reasons can also be sorted or paginated.
7 x-authenticated: true
8 parameters:
9 - name: fields
10 in: query
11 description: >-
12 Comma-separated fields that should be included in the returned data. if
13 a field is prefixed with `+` it will be added to the default fields,
14 using `-` will remove it from the default fields. without prefix it will
15 replace the entire default fields.
16 required: false
17 schema:
18 type: string
19 title: fields
20 description: >-
21 Comma-separated fields that should be included in the returned data.
22 if a field is prefixed with `+` it will be added to the default
23 fields, using `-` will remove it from the default fields. without
24 prefix it will replace the entire default fields.
25 externalDocs:
26 url: '#select-fields-and-relations'
27 - name: offset
28 in: query
29 description: The number of items to skip when retrieving a list.
30 required: false
31 schema:
32 type: number
33 title: offset
34 description: The number of items to skip when retrieving a list.
35 externalDocs:
36 url: '#pagination'
37 - name: limit
38 in: query
39 description: Limit the number of items returned in the list.
40 required: false
41 schema:
42 type: number
43 title: limit
44 description: Limit the number of items returned in the list.
45 externalDocs:
46 url: '#pagination'
47 - name: order
48 in: query
49 description: >-
50 The field to sort the data by. By default, the sort order is ascending.
51 To change the order to descending, prefix the field name with `-`.
52 required: false
53 schema:
54 type: string
55 title: order
56 description: >-
57 The field to sort the data by. By default, the sort order is
58 ascending. To change the order to descending, prefix the field name
59 with `-`.
60 - name: id
61 in: query
62 required: false
63 schema:
64 oneOf:
65 - type: string
66 title: id
67 description: Filter by a refund reason's ID.
68 - type: array
69 description: Filter by refund reason IDs.
70 items:
71 type: string
72 title: id
73 description: A refund reason ID.
74 - name: q
75 in: query
76 description: Search term to filter the refund reason's searchable properties.
77 required: false
78 schema:
79 type: string
80 title: q
81 description: Search term to filter the refund reason's searchable properties.
82 - name: $and
83 in: query
84 description: >-
85 Join query parameters with an AND condition. Each object's content is
86 the same type as the expected query parameters.
87 required: false
88 schema:
89 type: array
90 description: >-
91 Join query parameters with an AND condition. Each object's content is
92 the same type as the expected query parameters.
93 items:
94 type: object
95 title: $and
96 - name: $or
97 in: query
98 description: >-
99 Join query parameters with an OR condition. Each object's content is the
100 same type as the expected query parameters.
101 required: false
102 schema:
103 type: array
104 description: >-
105 Join query parameters with an OR condition. Each object's content is
106 the same type as the expected query parameters.
107 items:
108 type: object
109 title: $or
110 - name: with_deleted
111 in: query
112 description: Whether to include deleted records in the result.
113 required: false
114 schema:
115 type: boolean
116 title: with_deleted
117 description: Whether to include deleted records in the result.
118 security:
119 - api_token: []
120 - cookie_auth: []
121 - jwt_token: []
122 x-codeSamples:
123 - lang: JavaScript
124 label: JS SDK
125 source:
126 $ref: ../code_samples/JavaScript/admin_refund-reasons/get.js
127 - lang: Shell
128 label: cURL
129 source:
130 $ref: ../code_samples/Shell/admin_refund-reasons/get.sh
131 tags:
132 - Refund Reasons
133 responses:
134 '200':
135 description: OK
136 content:
137 application/json:
138 schema:
139 allOf:
140 - type: object
141 description: The paginated list of refund reasons.
142 required:
143 - limit
144 - offset
145 - count
146 properties:
147 limit:
148 type: number
149 title: limit
150 description: The maximum number of items returned.
151 offset:
152 type: number
153 title: offset
154 description: >-
155 The number of items skipped before retrieving the returned
156 items.
157 count:
158 type: number
159 title: count
160 description: The total number of items.
161 - type: object
162 description: The paginated list of refund reasons.
163 required:
164 - refund_reasons
165 properties:
166 refund_reasons:
167 type: array
168 description: The refund reason's refund reasons.
169 items:
170 $ref: ../components/schemas/AdminRefundReason.yaml
171 '400':
172 $ref: ../components/responses/400_error.yaml
173 '401':
174 $ref: ../components/responses/unauthorized.yaml
175 '404':
176 $ref: ../components/responses/not_found_error.yaml
177 '409':
178 $ref: ../components/responses/invalid_state_error.yaml
179 '422':
180 $ref: ../components/responses/invalid_request_error.yaml
181 '500':
182 $ref: ../components/responses/500_error.yaml
183 post:
184 operationId: PostRefundReasons
185 summary: Create Refund Reason
186 description: Create a refund reason.
187 x-authenticated: true
188 parameters:
189 - name: fields
190 in: query
191 description: >-
192 Comma-separated fields that should be included in the returned data. if
193 a field is prefixed with `+` it will be added to the default fields,
194 using `-` will remove it from the default fields. without prefix it will
195 replace the entire default fields.
196 required: false
197 schema:
198 type: string
199 title: fields
200 description: >-
201 Comma-separated fields that should be included in the returned data.
202 if a field is prefixed with `+` it will be added to the default
203 fields, using `-` will remove it from the default fields. without
204 prefix it will replace the entire default fields.
205 externalDocs:
206 url: '#select-fields-and-relations'
207 security:
208 - api_token: []
209 - cookie_auth: []
210 - jwt_token: []
211 requestBody:
212 content:
213 application/json:
214 schema:
215 $ref: ../components/schemas/AdminCreateRefundReason.yaml
216 x-codeSamples:
217 - lang: JavaScript
218 label: JS SDK
219 source:
220 $ref: ../code_samples/JavaScript/admin_refund-reasons/post.js
221 - lang: Shell
222 label: cURL
223 source:
224 $ref: ../code_samples/Shell/admin_refund-reasons/post.sh
225 tags:
226 - Refund Reasons
227 responses:
228 '200':
229 description: OK
230 content:
231 application/json:
232 schema:
233 $ref: ../components/schemas/RefundReasonResponse.yaml
234 '400':
235 $ref: ../components/responses/400_error.yaml
236 '401':
237 $ref: ../components/responses/unauthorized.yaml
238 '404':
239 $ref: ../components/responses/not_found_error.yaml
240 '409':
241 $ref: ../components/responses/invalid_state_error.yaml
242 '422':
243 $ref: ../components/responses/invalid_request_error.yaml
244 '500':
245 $ref: ../components/responses/500_error.yaml
246 x-workflow: createRefundReasonsWorkflow
247 x-events: []