1 get:
2 operationId: GetPriceLists
3 summary: List Price Lists
4 description: >-
5 Retrieve a list of price lists. The price lists can be filtered by fields
6 such as `id`. The price lists 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 term to filter the price list's searchable properties.
63 required: false
64 schema:
65 type: string
66 title: q
67 description: Search term to filter the price list's searchable properties.
68 - name: id
69 in: query
70 required: false
71 schema:
72 oneOf:
73 - type: string
74 title: id
75 description: Filter by a price list ID.
76 - type: array
77 description: Filter by price list IDs.
78 items:
79 type: string
80 title: id
81 description: A price list ID.
82 - name: starts_at
83 in: query
84 description: Filter by a price list's start date.
85 required: false
86 schema:
87 type: object
88 description: Filter by a price list's start date.
89 properties:
90 $and:
91 type: array
92 description: >-
93 Join query parameters with an AND condition. Each object's content
94 is the same type as the expected query parameters.
95 items:
96 type: object
97 title: $and
98 $or:
99 type: array
100 description: >-
101 Join query parameters with an OR condition. Each object's content
102 is the same type as the expected query parameters.
103 items:
104 type: object
105 title: $or
106 $eq:
107 oneOf:
108 - type: string
109 title: $eq
110 description: Filter by an exact match.
111 - type: array
112 description: Filter by an exact match.
113 items:
114 type: string
115 title: $eq
116 description: Filter by an exact match.
117 $ne:
118 type: string
119 title: $ne
120 description: Filter by values not equal to this parameter.
121 $in:
122 type: array
123 description: Filter by values in this array.
124 items:
125 type: string
126 title: $in
127 description: Filter by values in this array.
128 $nin:
129 type: array
130 description: Filter by values not in this array.
131 items:
132 type: string
133 title: $nin
134 description: Filter by values not in this array.
135 $not:
136 oneOf:
137 - type: string
138 title: $not
139 description: >-
140 Filter by values not matching the conditions in this
141 parameter.
142 - type: object
143 description: >-
144 Filter by values not matching the conditions in this
145 parameter.
146 - type: array
147 description: >-
148 Filter by values not matching the conditions in this
149 parameter.
150 items:
151 type: string
152 title: $not
153 description: >-
154 Filter by values not matching the conditions in this
155 parameter.
156 $gt:
157 type: string
158 title: $gt
159 description: >-
160 Filter by values greater than this parameter. Useful for numbers
161 and dates only.
162 $gte:
163 type: string
164 title: $gte
165 description: >-
166 Filter by values greater than or equal to this parameter. Useful
167 for numbers and dates only.
168 $lt:
169 type: string
170 title: $lt
171 description: >-
172 Filter by values less than this parameter. Useful for numbers and
173 dates only.
174 $lte:
175 type: string
176 title: $lte
177 description: >-
178 Filter by values less than or equal to this parameter. Useful for
179 numbers and dates only.
180 $like:
181 type: string
182 title: $like
183 description: Apply a `like` filter. Useful for strings only.
184 $re:
185 type: string
186 title: $re
187 description: Apply a regex filter. Useful for strings only.
188 $ilike:
189 type: string
190 title: $ilike
191 description: Apply a case-insensitive `like` filter. Useful for strings only.
192 $fulltext:
193 type: string
194 title: $fulltext
195 description: Filter to apply on full-text properties.
196 $overlap:
197 type: array
198 description: Filter arrays that have overlapping values with this parameter.
199 items:
200 type: string
201 title: $overlap
202 description: Filter arrays that have overlapping values with this parameter.
203 $contains:
204 type: array
205 description: Filter arrays that contain some of the values of this parameter.
206 items:
207 type: string
208 title: $contains
209 description: Filter arrays that contain some of the values of this parameter.
210 $contained:
211 type: array
212 description: Filter arrays that contain all values of this parameter.
213 items:
214 type: string
215 title: $contained
216 description: Filter arrays that contain all values of this parameter.
217 $exists:
218 type: boolean
219 title: $exists
220 description: Filter by whether a value for this parameter exists (not `null`).
221 title: starts_at
222 - name: ends_at
223 in: query
224 description: Filter by the price list's end date.
225 required: false
226 schema:
227 type: object
228 description: Filter by the price list's end date.
229 properties:
230 $and:
231 type: array
232 description: >-
233 Join query parameters with an AND condition. Each object's content
234 is the same type as the expected query parameters.
235 items:
236 type: object
237 title: $and
238 $or:
239 type: array
240 description: >-
241 Join query parameters with an OR condition. Each object's content
242 is the same type as the expected query parameters.
243 items:
244 type: object
245 title: $or
246 $eq:
247 oneOf:
248 - type: string
249 title: $eq
250 description: Filter by an exact match.
251 - type: array
252 description: Filter by an exact match.
253 items:
254 type: string
255 title: $eq
256 description: Filter by an exact match.
257 $ne:
258 type: string
259 title: $ne
260 description: Filter by values not equal to this parameter.
261 $in:
262 type: array
263 description: Filter by values in this array.
264 items:
265 type: string
266 title: $in
267 description: Filter by values in this array.
268 $nin:
269 type: array
270 description: Filter by values not in this array.
271 items:
272 type: string
273 title: $nin
274 description: Filter by values not in this array.
275 $not:
276 oneOf:
277 - type: string
278 title: $not
279 description: >-
280 Filter by values not matching the conditions in this
281 parameter.
282 - type: object
283 description: >-
284 Filter by values not matching the conditions in this
285 parameter.
286 - type: array
287 description: >-
288 Filter by values not matching the conditions in this
289 parameter.
290 items:
291 type: string
292 title: $not
293 description: >-
294 Filter by values not matching the conditions in this
295 parameter.
296 $gt:
297 type: string
298 title: $gt
299 description: >-
300 Filter by values greater than this parameter. Useful for numbers
301 and dates only.
302 $gte:
303 type: string
304 title: $gte
305 description: >-
306 Filter by values greater than or equal to this parameter. Useful
307 for numbers and dates only.
308 $lt:
309 type: string
310 title: $lt
311 description: >-
312 Filter by values less than this parameter. Useful for numbers and
313 dates only.
314 $lte:
315 type: string
316 title: $lte
317 description: >-
318 Filter by values less than or equal to this parameter. Useful for
319 numbers and dates only.
320 $like:
321 type: string
322 title: $like
323 description: Apply a `like` filter. Useful for strings only.
324 $re:
325 type: string
326 title: $re
327 description: Apply a regex filter. Useful for strings only.
328 $ilike:
329 type: string
330 title: $ilike
331 description: Apply a case-insensitive `like` filter. Useful for strings only.
332 $fulltext:
333 type: string
334 title: $fulltext
335 description: Filter to apply on full-text properties.
336 $overlap:
337 type: array
338 description: Filter arrays that have overlapping values with this parameter.
339 items:
340 type: string
341 title: $overlap
342 description: Filter arrays that have overlapping values with this parameter.
343 $contains:
344 type: array
345 description: Filter arrays that contain some of the values of this parameter.
346 items:
347 type: string
348 title: $contains
349 description: Filter arrays that contain some of the values of this parameter.
350 $contained:
351 type: array
352 description: Filter arrays that contain all values of this parameter.
353 items:
354 type: string
355 title: $contained
356 description: Filter arrays that contain all values of this parameter.
357 $exists:
358 type: boolean
359 title: $exists
360 description: Filter by whether a value for this parameter exists (not `null`).
361 title: ends_at
362 - name: status
363 in: query
364 description: Filter by the price list's status.
365 required: false
366 schema:
367 type: array
368 description: Filter by the price list's status.
369 items:
370 type: string
371 description: A price list's status.
372 enum:
373 - active
374 - draft
375 - name: rules_count
376 in: query
377 description: Filter by the price list's rules count.
378 required: false
379 schema:
380 type: array
381 description: Filter by the price list's rules count.
382 items:
383 type: number
384 title: rules_count
385 description: The price list's rule count.
386 - name: $and
387 in: query
388 description: >-
389 Join query parameters with an AND condition. Each object's content is
390 the same type as the expected query parameters.
391 required: false
392 schema:
393 type: array
394 description: >-
395 Join query parameters with an AND condition. Each object's content is
396 the same type as the expected query parameters.
397 items:
398 type: object
399 title: $and
400 - name: $or
401 in: query
402 description: >-
403 Join query parameters with an OR condition. Each object's content is the
404 same type as the expected query parameters.
405 required: false
406 schema:
407 type: array
408 description: >-
409 Join query parameters with an OR condition. Each object's content is
410 the same type as the expected query parameters.
411 items:
412 type: object
413 title: $or
414 - name: with_deleted
415 in: query
416 description: Whether to include deleted records in the result.
417 required: false
418 schema:
419 type: boolean
420 title: with_deleted
421 description: Whether to include deleted records in the result.
422 security:
423 - api_token: []
424 - cookie_auth: []
425 - jwt_token: []
426 x-codeSamples:
427 - lang: JavaScript
428 label: JS SDK
429 source:
430 $ref: ../code_samples/JavaScript/admin_price-lists/get.js
431 - lang: Shell
432 label: cURL
433 source:
434 $ref: ../code_samples/Shell/admin_price-lists/get.sh
435 tags:
436 - Price Lists
437 responses:
438 '200':
439 description: OK
440 content:
441 application/json:
442 schema:
443 $ref: ../components/schemas/AdminPriceListListResponse.yaml
444 '400':
445 $ref: ../components/responses/400_error.yaml
446 '401':
447 $ref: ../components/responses/unauthorized.yaml
448 '404':
449 $ref: ../components/responses/not_found_error.yaml
450 '409':
451 $ref: ../components/responses/invalid_state_error.yaml
452 '422':
453 $ref: ../components/responses/invalid_request_error.yaml
454 '500':
455 $ref: ../components/responses/500_error.yaml
456 post:
457 operationId: PostPriceLists
458 summary: Create Price List
459 description: Create a price list.
460 x-authenticated: true
461 parameters:
462 - name: fields
463 in: query
464 description: >-
465 Comma-separated fields that should be included in the returned data. if
466 a field is prefixed with `+` it will be added to the default fields,
467 using `-` will remove it from the default fields. without prefix it will
468 replace the entire default fields.
469 required: false
470 schema:
471 type: string
472 title: fields
473 description: >-
474 Comma-separated fields that should be included in the returned data.
475 if a field is prefixed with `+` it will be added to the default
476 fields, using `-` will remove it from the default fields. without
477 prefix it will replace the entire default fields.
478 externalDocs:
479 url: '#select-fields-and-relations'
480 - name: q
481 in: query
482 description: Apply a search query to the price list's searchable properties.
483 required: false
484 schema:
485 type: string
486 title: q
487 description: Apply a search query to the price list's searchable properties.
488 - name: id
489 in: query
490 required: false
491 schema:
492 oneOf:
493 - type: string
494 title: id
495 description: Filter by a specific price list ID.
496 - type: array
497 description: Filter by multiple price list IDs.
498 items:
499 type: string
500 title: id
501 description: A price list ID.
502 - name: starts_at
503 in: query
504 description: Filter by a price list's start date.
505 required: false
506 schema:
507 type: object
508 description: Filter by a price list's start date.
509 properties:
510 $and:
511 type: array
512 description: >-
513 Join query parameters with an AND condition. Each object's content
514 is the same type as the expected query parameters.
515 items:
516 type: object
517 title: $and
518 $or:
519 type: array
520 description: >-
521 Join query parameters with an OR condition. Each object's content
522 is the same type as the expected query parameters.
523 items:
524 type: object
525 title: $or
526 $eq:
527 oneOf:
528 - type: string
529 title: $eq
530 description: Filter by an exact match.
531 - type: array
532 description: Filter by an exact match.
533 items:
534 type: string
535 title: $eq
536 description: Filter by an exact match.
537 $ne:
538 type: string
539 title: $ne
540 description: Filter by values not equal to this parameter.
541 $in:
542 type: array
543 description: Filter by values in this array.
544 items:
545 type: string
546 title: $in
547 description: Filter by values in this array.
548 $nin:
549 type: array
550 description: Filter by values not in this array.
551 items:
552 type: string
553 title: $nin
554 description: Filter by values not in this array.
555 $not:
556 oneOf:
557 - type: string
558 title: $not
559 description: >-
560 Filter by values not matching the conditions in this
561 parameter.
562 - type: object
563 description: >-
564 Filter by values not matching the conditions in this
565 parameter.
566 - type: array
567 description: >-
568 Filter by values not matching the conditions in this
569 parameter.
570 items:
571 type: string
572 title: $not
573 description: >-
574 Filter by values not matching the conditions in this
575 parameter.
576 $gt:
577 type: string
578 title: $gt
579 description: >-
580 Filter by values greater than this parameter. Useful for numbers
581 and dates only.
582 $gte:
583 type: string
584 title: $gte
585 description: >-
586 Filter by values greater than or equal to this parameter. Useful
587 for numbers and dates only.
588 $lt:
589 type: string
590 title: $lt
591 description: >-
592 Filter by values less than this parameter. Useful for numbers and
593 dates only.
594 $lte:
595 type: string
596 title: $lte
597 description: >-
598 Filter by values less than or equal to this parameter. Useful for
599 numbers and dates only.
600 $like:
601 type: string
602 title: $like
603 description: Apply a `like` filter. Useful for strings only.
604 $re:
605 type: string
606 title: $re
607 description: Apply a regex filter. Useful for strings only.
608 $ilike:
609 type: string
610 title: $ilike
611 description: Apply a case-insensitive `like` filter. Useful for strings only.
612 $fulltext:
613 type: string
614 title: $fulltext
615 description: Filter to apply on full-text properties.
616 $overlap:
617 type: array
618 description: Filter arrays that have overlapping values with this parameter.
619 items:
620 type: string
621 title: $overlap
622 description: Filter arrays that have overlapping values with this parameter.
623 $contains:
624 type: array
625 description: Filter arrays that contain some of the values of this parameter.
626 items:
627 type: string
628 title: $contains
629 description: Filter arrays that contain some of the values of this parameter.
630 $contained:
631 type: array
632 description: Filter arrays that contain all values of this parameter.
633 items:
634 type: string
635 title: $contained
636 description: Filter arrays that contain all values of this parameter.
637 $exists:
638 type: boolean
639 title: $exists
640 description: Filter by whether a value for this parameter exists (not `null`).
641 title: starts_at
642 - name: ends_at
643 in: query
644 description: Filter by a price list's end date.
645 required: false
646 schema:
647 type: object
648 description: Filter by a price list's end date.
649 properties:
650 $and:
651 type: array
652 description: >-
653 Join query parameters with an AND condition. Each object's content
654 is the same type as the expected query parameters.
655 items:
656 type: object
657 title: $and
658 $or:
659 type: array
660 description: >-
661 Join query parameters with an OR condition. Each object's content
662 is the same type as the expected query parameters.
663 items:
664 type: object
665 title: $or
666 $eq:
667 oneOf:
668 - type: string
669 title: $eq
670 description: Filter by an exact match.
671 - type: array
672 description: Filter by an exact match.
673 items:
674 type: string
675 title: $eq
676 description: Filter by an exact match.
677 $ne:
678 type: string
679 title: $ne
680 description: Filter by values not equal to this parameter.
681 $in:
682 type: array
683 description: Filter by values in this array.
684 items:
685 type: string
686 title: $in
687 description: Filter by values in this array.
688 $nin:
689 type: array
690 description: Filter by values not in this array.
691 items:
692 type: string
693 title: $nin
694 description: Filter by values not in this array.
695 $not:
696 oneOf:
697 - type: string
698 title: $not
699 description: >-
700 Filter by values not matching the conditions in this
701 parameter.
702 - type: object
703 description: >-
704 Filter by values not matching the conditions in this
705 parameter.
706 - type: array
707 description: >-
708 Filter by values not matching the conditions in this
709 parameter.
710 items:
711 type: string
712 title: $not
713 description: >-
714 Filter by values not matching the conditions in this
715 parameter.
716 $gt:
717 type: string
718 title: $gt
719 description: >-
720 Filter by values greater than this parameter. Useful for numbers
721 and dates only.
722 $gte:
723 type: string
724 title: $gte
725 description: >-
726 Filter by values greater than or equal to this parameter. Useful
727 for numbers and dates only.
728 $lt:
729 type: string
730 title: $lt
731 description: >-
732 Filter by values less than this parameter. Useful for numbers and
733 dates only.
734 $lte:
735 type: string
736 title: $lte
737 description: >-
738 Filter by values less than or equal to this parameter. Useful for
739 numbers and dates only.
740 $like:
741 type: string
742 title: $like
743 description: Apply a `like` filter. Useful for strings only.
744 $re:
745 type: string
746 title: $re
747 description: Apply a regex filter. Useful for strings only.
748 $ilike:
749 type: string
750 title: $ilike
751 description: Apply a case-insensitive `like` filter. Useful for strings only.
752 $fulltext:
753 type: string
754 title: $fulltext
755 description: Filter to apply on full-text properties.
756 $overlap:
757 type: array
758 description: Filter arrays that have overlapping values with this parameter.
759 items:
760 type: string
761 title: $overlap
762 description: Filter arrays that have overlapping values with this parameter.
763 $contains:
764 type: array
765 description: Filter arrays that contain some of the values of this parameter.
766 items:
767 type: string
768 title: $contains
769 description: Filter arrays that contain some of the values of this parameter.
770 $contained:
771 type: array
772 description: Filter arrays that contain all values of this parameter.
773 items:
774 type: string
775 title: $contained
776 description: Filter arrays that contain all values of this parameter.
777 $exists:
778 type: boolean
779 title: $exists
780 description: Filter by whether a value for this parameter exists (not `null`).
781 title: ends_at
782 - name: status
783 in: query
784 description: Filter by price list statuses.
785 required: false
786 schema:
787 type: array
788 description: Filter by price list statuses.
789 items:
790 type: string
791 description: A price list status.
792 enum:
793 - draft
794 - active
795 - name: rules_count
796 in: query
797 description: Filter by multiple price list rules count.
798 required: false
799 schema:
800 type: array
801 description: Filter by price list rules count.
802 items:
803 type: number
804 title: rules_count
805 description: A price list's rules count.
806 - name: limit
807 in: query
808 description: Limit the number of items returned in the list.
809 required: false
810 schema:
811 type: number
812 title: limit
813 description: Limit the number of items returned in the list.
814 externalDocs:
815 url: '#pagination'
816 - name: offset
817 in: query
818 description: The number of items to skip when retrieving a list.
819 required: false
820 schema:
821 type: number
822 title: offset
823 description: The number of items to skip when retrieving a list.
824 externalDocs:
825 url: '#pagination'
826 - name: order
827 in: query
828 description: >-
829 The field to sort the data by. By default, the sort order is ascending.
830 To change the order to descending, prefix the field name with `-`.
831 required: false
832 schema:
833 type: string
834 title: order
835 description: >-
836 The field to sort the data by. By default, the sort order is
837 ascending. To change the order to descending, prefix the field name
838 with `-`.
839 externalDocs:
840 url: '#pagination'
841 - name: with_deleted
842 in: query
843 description: The price list's with deleted.
844 required: false
845 schema:
846 type: boolean
847 title: with_deleted
848 description: The price list's with deleted.
849 - name: $and
850 in: query
851 description: >-
852 Join query parameters with an AND condition. Each object's content is
853 the same type as the expected query parameters.
854 required: false
855 schema:
856 type: array
857 description: >-
858 Join query parameters with an AND condition. Each object's content is
859 the same type as the expected query parameters.
860 items:
861 type: object
862 title: $and
863 - name: $or
864 in: query
865 description: >-
866 Join query parameters with an OR condition. Each object's content is the
867 same type as the expected query parameters.
868 required: false
869 schema:
870 type: array
871 description: >-
872 Join query parameters with an OR condition. Each object's content is
873 the same type as the expected query parameters.
874 items:
875 type: object
876 title: $or
877 security:
878 - api_token: []
879 - cookie_auth: []
880 - jwt_token: []
881 requestBody:
882 content:
883 application/json:
884 schema:
885 $ref: ../components/schemas/AdminCreatePriceList.yaml
886 x-codeSamples:
887 - lang: JavaScript
888 label: JS SDK
889 source:
890 $ref: ../code_samples/JavaScript/admin_price-lists/post.js
891 - lang: Shell
892 label: cURL
893 source:
894 $ref: ../code_samples/Shell/admin_price-lists/post.sh
895 tags:
896 - Price Lists
897 responses:
898 '200':
899 description: OK
900 content:
901 application/json:
902 schema:
903 $ref: ../components/schemas/AdminPriceListResponse.yaml
904 '400':
905 $ref: ../components/responses/400_error.yaml
906 '401':
907 $ref: ../components/responses/unauthorized.yaml
908 '404':
909 $ref: ../components/responses/not_found_error.yaml
910 '409':
911 $ref: ../components/responses/invalid_state_error.yaml
912 '422':
913 $ref: ../components/responses/invalid_request_error.yaml
914 '500':
915 $ref: ../components/responses/500_error.yaml
916 x-workflow: createPriceListsWorkflow
917 x-events: []