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