Raw
1 get:
2 operationId: GetTaxRates
3 summary: List Tax Rates
4 description: >-
5 Retrieve a list of tax rates. The tax rates can be filtered by fields such
6 as `id`. The tax rates 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: q
61 in: query
62 description: Search terms to filter the tax rate's searchable properties.
63 required: false
64 schema:
65 type: string
66 title: q
67 description: Search terms to filter the tax rate's searchable properties.
68 - name: tax_region_id
69 in: query
70 required: false
71 schema:
72 oneOf:
73 - type: string
74 title: tax_region_id
75 description: Filter by a tax region ID to retrieve its associated rates.
76 - type: array
77 description: Filter by tax region IDs to retrieve their associated rates.
78 items:
79 type: string
80 title: tax_region_id
81 description: A tax region ID.
82 - type: object
83 description: >-
84 Apply filters on the tax region ID to retrieve the rates
85 associated with the matching tax regions.
86 properties:
87 $eq:
88 type: string
89 description: Filter by an exact match.
90 $ne:
91 type: string
92 description: Filter by values not matching this parameter.
93 $in:
94 type: array
95 description: Filter by values in this array's items.
96 items:
97 type: string
98 $nin:
99 type: array
100 description: Filter by values not in this array's items.
101 items:
102 type: string
103 $like:
104 type: string
105 description: Apply a `like` filter. Useful for strings only.
106 $ilike:
107 type: string
108 description: >-
109 Apply a case-insensitive `like` filter. Useful for strings
110 only.
111 $re:
112 type: string
113 description: Apply a regex filter. Useful for strings only.
114 $contains:
115 type: array
116 description: >-
117 Filter arrays that contain some of the values of this
118 parameter.
119 items:
120 type: string
121 $gt:
122 type: string
123 description: >-
124 Filter by values greater than this parameter. Useful for
125 numbers and dates only.
126 $gte:
127 type: string
128 description: >-
129 Filter by values greater than or equal to this parameter.
130 Useful for numbers and dates only.
131 $lt:
132 type: string
133 description: >-
134 Filter by values less than this parameter. Useful for numbers
135 and dates only.
136 $lte:
137 type: string
138 description: >-
139 Filter by values less than or equal to this parameter. Useful
140 for numbers and dates only.
141 - name: is_default
142 in: query
143 required: false
144 description: Filter by whether the tax rate is a default in its tax region.
145 schema:
146 type: string
147 enum:
148 - 'true'
149 - 'false'
150 - name: created_at
151 in: query
152 description: Filter by a tax rate's creation date.
153 required: false
154 schema:
155 type: object
156 description: Filter by a tax rate's creation date.
157 properties:
158 $and:
159 type: array
160 description: >-
161 Join query parameters with an AND condition. Each object's content
162 is the same type as the expected query parameters.
163 items:
164 type: object
165 title: $and
166 $or:
167 type: array
168 description: >-
169 Join query parameters with an OR condition. Each object's content
170 is the same type as the expected query parameters.
171 items:
172 type: object
173 title: $or
174 $eq:
175 oneOf:
176 - type: string
177 title: $eq
178 description: Filter by an exact match.
179 - type: array
180 description: Filter by an exact match.
181 items:
182 type: string
183 title: $eq
184 description: Filter by an exact match.
185 $ne:
186 type: string
187 title: $ne
188 description: Filter by values not equal to this parameter.
189 $in:
190 type: array
191 description: Filter by values in this array.
192 items:
193 type: string
194 title: $in
195 description: Filter by values in this array.
196 $nin:
197 type: array
198 description: Filter by values not in this array.
199 items:
200 type: string
201 title: $nin
202 description: Filter by values not in this array.
203 $not:
204 oneOf:
205 - type: string
206 title: $not
207 description: >-
208 Filter by values not matching the conditions in this
209 parameter.
210 - type: object
211 description: >-
212 Filter by values not matching the conditions in this
213 parameter.
214 - type: array
215 description: >-
216 Filter by values not matching the conditions in this
217 parameter.
218 items:
219 type: string
220 title: $not
221 description: >-
222 Filter by values not matching the conditions in this
223 parameter.
224 $gt:
225 type: string
226 title: $gt
227 description: >-
228 Filter by values greater than this parameter. Useful for numbers
229 and dates only.
230 $gte:
231 type: string
232 title: $gte
233 description: >-
234 Filter by values greater than or equal to this parameter. Useful
235 for numbers and dates only.
236 $lt:
237 type: string
238 title: $lt
239 description: >-
240 Filter by values less than this parameter. Useful for numbers and
241 dates only.
242 $lte:
243 type: string
244 title: $lte
245 description: >-
246 Filter by values less than or equal to this parameter. Useful for
247 numbers and dates only.
248 $like:
249 type: string
250 title: $like
251 description: Apply a `like` filter. Useful for strings only.
252 $re:
253 type: string
254 title: $re
255 description: Apply a regex filter. Useful for strings only.
256 $ilike:
257 type: string
258 title: $ilike
259 description: Apply a case-insensitive `like` filter. Useful for strings only.
260 $fulltext:
261 type: string
262 title: $fulltext
263 description: Filter to apply on full-text properties.
264 $overlap:
265 type: array
266 description: Filter arrays that have overlapping values with this parameter.
267 items:
268 type: string
269 title: $overlap
270 description: Filter arrays that have overlapping values with this parameter.
271 $contains:
272 type: array
273 description: Filter arrays that contain some of the values of this parameter.
274 items:
275 type: string
276 title: $contains
277 description: Filter arrays that contain some of the values of this parameter.
278 $contained:
279 type: array
280 description: Filter arrays that contain all values of this parameter.
281 items:
282 type: string
283 title: $contained
284 description: Filter arrays that contain all values of this parameter.
285 $exists:
286 type: boolean
287 title: $exists
288 description: Filter by whether a value for this parameter exists (not `null`).
289 title: created_at
290 - name: updated_at
291 in: query
292 description: Filter by a tax rate's update date.
293 required: false
294 schema:
295 type: object
296 description: Filter by a tax rate's update date.
297 properties:
298 $and:
299 type: array
300 description: >-
301 Join query parameters with an AND condition. Each object's content
302 is the same type as the expected query parameters.
303 items:
304 type: object
305 title: $and
306 $or:
307 type: array
308 description: >-
309 Join query parameters with an OR condition. Each object's content
310 is the same type as the expected query parameters.
311 items:
312 type: object
313 title: $or
314 $eq:
315 oneOf:
316 - type: string
317 title: $eq
318 description: Filter by an exact match.
319 - type: array
320 description: Filter by an exact match.
321 items:
322 type: string
323 title: $eq
324 description: Filter by an exact match.
325 $ne:
326 type: string
327 title: $ne
328 description: Filter by values not equal to this parameter.
329 $in:
330 type: array
331 description: Filter by values in this array.
332 items:
333 type: string
334 title: $in
335 description: Filter by values in this array.
336 $nin:
337 type: array
338 description: Filter by values not in this array.
339 items:
340 type: string
341 title: $nin
342 description: Filter by values not in this array.
343 $not:
344 oneOf:
345 - type: string
346 title: $not
347 description: >-
348 Filter by values not matching the conditions in this
349 parameter.
350 - type: object
351 description: >-
352 Filter by values not matching the conditions in this
353 parameter.
354 - type: array
355 description: >-
356 Filter by values not matching the conditions in this
357 parameter.
358 items:
359 type: string
360 title: $not
361 description: >-
362 Filter by values not matching the conditions in this
363 parameter.
364 $gt:
365 type: string
366 title: $gt
367 description: >-
368 Filter by values greater than this parameter. Useful for numbers
369 and dates only.
370 $gte:
371 type: string
372 title: $gte
373 description: >-
374 Filter by values greater than or equal to this parameter. Useful
375 for numbers and dates only.
376 $lt:
377 type: string
378 title: $lt
379 description: >-
380 Filter by values less than this parameter. Useful for numbers and
381 dates only.
382 $lte:
383 type: string
384 title: $lte
385 description: >-
386 Filter by values less than or equal to this parameter. Useful for
387 numbers and dates only.
388 $like:
389 type: string
390 title: $like
391 description: Apply a `like` filter. Useful for strings only.
392 $re:
393 type: string
394 title: $re
395 description: Apply a regex filter. Useful for strings only.
396 $ilike:
397 type: string
398 title: $ilike
399 description: Apply a case-insensitive `like` filter. Useful for strings only.
400 $fulltext:
401 type: string
402 title: $fulltext
403 description: Filter to apply on full-text properties.
404 $overlap:
405 type: array
406 description: Filter arrays that have overlapping values with this parameter.
407 items:
408 type: string
409 title: $overlap
410 description: Filter arrays that have overlapping values with this parameter.
411 $contains:
412 type: array
413 description: Filter arrays that contain some of the values of this parameter.
414 items:
415 type: string
416 title: $contains
417 description: Filter arrays that contain some of the values of this parameter.
418 $contained:
419 type: array
420 description: Filter arrays that contain all values of this parameter.
421 items:
422 type: string
423 title: $contained
424 description: Filter arrays that contain all values of this parameter.
425 $exists:
426 type: boolean
427 title: $exists
428 description: Filter by whether a value for this parameter exists (not `null`).
429 title: updated_at
430 - name: deleted_at
431 in: query
432 description: Filter by a tax rate's deletion date.
433 required: false
434 schema:
435 type: object
436 description: Filter by a tax rate's deletion date.
437 properties:
438 $and:
439 type: array
440 description: >-
441 Join query parameters with an AND condition. Each object's content
442 is the same type as the expected query parameters.
443 items:
444 type: object
445 title: $and
446 $or:
447 type: array
448 description: >-
449 Join query parameters with an OR condition. Each object's content
450 is the same type as the expected query parameters.
451 items:
452 type: object
453 title: $or
454 $eq:
455 oneOf:
456 - type: string
457 title: $eq
458 description: Filter by an exact match.
459 - type: array
460 description: Filter by an exact match.
461 items:
462 type: string
463 title: $eq
464 description: Filter by an exact match.
465 $ne:
466 type: string
467 title: $ne
468 description: Filter by values not equal to this parameter.
469 $in:
470 type: array
471 description: Filter by values in this array.
472 items:
473 type: string
474 title: $in
475 description: Filter by values in this array.
476 $nin:
477 type: array
478 description: Filter by values not in this array.
479 items:
480 type: string
481 title: $nin
482 description: Filter by values not in this array.
483 $not:
484 oneOf:
485 - type: string
486 title: $not
487 description: >-
488 Filter by values not matching the conditions in this
489 parameter.
490 - type: object
491 description: >-
492 Filter by values not matching the conditions in this
493 parameter.
494 - type: array
495 description: >-
496 Filter by values not matching the conditions in this
497 parameter.
498 items:
499 type: string
500 title: $not
501 description: >-
502 Filter by values not matching the conditions in this
503 parameter.
504 $gt:
505 type: string
506 title: $gt
507 description: >-
508 Filter by values greater than this parameter. Useful for numbers
509 and dates only.
510 $gte:
511 type: string
512 title: $gte
513 description: >-
514 Filter by values greater than or equal to this parameter. Useful
515 for numbers and dates only.
516 $lt:
517 type: string
518 title: $lt
519 description: >-
520 Filter by values less than this parameter. Useful for numbers and
521 dates only.
522 $lte:
523 type: string
524 title: $lte
525 description: >-
526 Filter by values less than or equal to this parameter. Useful for
527 numbers and dates only.
528 $like:
529 type: string
530 title: $like
531 description: Apply a `like` filter. Useful for strings only.
532 $re:
533 type: string
534 title: $re
535 description: Apply a regex filter. Useful for strings only.
536 $ilike:
537 type: string
538 title: $ilike
539 description: Apply a case-insensitive `like` filter. Useful for strings only.
540 $fulltext:
541 type: string
542 title: $fulltext
543 description: Filter to apply on full-text properties.
544 $overlap:
545 type: array
546 description: Filter arrays that have overlapping values with this parameter.
547 items:
548 type: string
549 title: $overlap
550 description: Filter arrays that have overlapping values with this parameter.
551 $contains:
552 type: array
553 description: Filter arrays that contain some of the values of this parameter.
554 items:
555 type: string
556 title: $contains
557 description: Filter arrays that contain some of the values of this parameter.
558 $contained:
559 type: array
560 description: Filter arrays that contain all values of this parameter.
561 items:
562 type: string
563 title: $contained
564 description: Filter arrays that contain all values of this parameter.
565 $exists:
566 type: boolean
567 title: $exists
568 description: Filter by whether a value for this parameter exists (not `null`).
569 title: deleted_at
570 - name: $and
571 in: query
572 required: false
573 schema:
574 type: array
575 description: >-
576 Join query parameters with an AND condition. Each object's content is
577 the same type as the expected query parameters.
578 items:
579 type: object
580 title: $and
581 - name: $or
582 in: query
583 required: false
584 schema:
585 type: array
586 description: >-
587 Join query parameters with an OR condition. Each object's content is
588 the same type as the expected query parameters.
589 items:
590 type: object
591 title: $or
592 - name: with_deleted
593 in: query
594 description: Whether to include deleted records in the result.
595 required: false
596 schema:
597 type: boolean
598 title: with_deleted
599 description: Whether to include deleted records in the result.
600 security:
601 - api_token: []
602 - cookie_auth: []
603 - jwt_token: []
604 x-codeSamples:
605 - lang: JavaScript
606 label: JS SDK
607 source:
608 $ref: ../code_samples/JavaScript/admin_tax-rates/get.js
609 - lang: Shell
610 label: cURL
611 source:
612 $ref: ../code_samples/Shell/admin_tax-rates/get.sh
613 tags:
614 - Tax Rates
615 responses:
616 '200':
617 description: OK
618 content:
619 application/json:
620 schema:
621 allOf:
622 - type: object
623 description: The paginated list of tax rates.
624 required:
625 - limit
626 - offset
627 - count
628 properties:
629 limit:
630 type: number
631 title: limit
632 description: The maximum number of items returned.
633 offset:
634 type: number
635 title: offset
636 description: >-
637 The number of items skipped before retrieving the returned
638 items.
639 count:
640 type: number
641 title: count
642 description: The total number of items.
643 - type: object
644 description: The paginated list of tax rates.
645 required:
646 - tax_rates
647 properties:
648 tax_rates:
649 type: array
650 description: The tax rate's tax rates.
651 items:
652 $ref: ../components/schemas/AdminTaxRate.yaml
653 '400':
654 $ref: ../components/responses/400_error.yaml
655 '401':
656 $ref: ../components/responses/unauthorized.yaml
657 '404':
658 $ref: ../components/responses/not_found_error.yaml
659 '409':
660 $ref: ../components/responses/invalid_state_error.yaml
661 '422':
662 $ref: ../components/responses/invalid_request_error.yaml
663 '500':
664 $ref: ../components/responses/500_error.yaml
665 post:
666 operationId: PostTaxRates
667 summary: Create Tax Rate
668 description: Create a tax rate.
669 x-authenticated: true
670 parameters:
671 - name: fields
672 in: query
673 description: >-
674 Comma-separated fields that should be included in the returned data. if
675 a field is prefixed with `+` it will be added to the default fields,
676 using `-` will remove it from the default fields. without prefix it will
677 replace the entire default fields.
678 required: false
679 schema:
680 type: string
681 title: fields
682 description: >-
683 Comma-separated fields that should be included in the returned data.
684 if a field is prefixed with `+` it will be added to the default
685 fields, using `-` will remove it from the default fields. without
686 prefix it will replace the entire default fields.
687 externalDocs:
688 url: '#select-fields-and-relations'
689 security:
690 - api_token: []
691 - cookie_auth: []
692 - jwt_token: []
693 requestBody:
694 content:
695 application/json:
696 schema:
697 $ref: ../components/schemas/AdminCreateTaxRate.yaml
698 x-codeSamples:
699 - lang: JavaScript
700 label: JS SDK
701 source:
702 $ref: ../code_samples/JavaScript/admin_tax-rates/post.js
703 - lang: Shell
704 label: cURL
705 source:
706 $ref: ../code_samples/Shell/admin_tax-rates/post.sh
707 tags:
708 - Tax Rates
709 responses:
710 '200':
711 description: OK
712 content:
713 application/json:
714 schema:
715 $ref: ../components/schemas/AdminTaxRateResponse.yaml
716 '400':
717 $ref: ../components/responses/400_error.yaml
718 '401':
719 $ref: ../components/responses/unauthorized.yaml
720 '404':
721 $ref: ../components/responses/not_found_error.yaml
722 '409':
723 $ref: ../components/responses/invalid_state_error.yaml
724 '422':
725 $ref: ../components/responses/invalid_request_error.yaml
726 '500':
727 $ref: ../components/responses/500_error.yaml
728 x-workflow: createTaxRatesWorkflow
729 x-events: []