|
1
|
get: |
|
2
|
operationId: GetDraftOrders |
|
3
|
summary: List Draft Orders |
|
4
|
description: >- |
|
5
|
Retrieve a list of draft orders. The draft orders can be filtered by fields |
|
6
|
such as `id`. The draft 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 a draft order's ID. |
|
68
|
- type: array |
|
69
|
description: Filter by draft order IDs. |
|
70
|
items: |
|
71
|
type: string |
|
72
|
title: id |
|
73
|
description: A draft order's ID. |
|
74
|
- type: object |
|
75
|
description: Filter by conditions on the draft order's ID. |
|
76
|
properties: |
|
77
|
$and: |
|
78
|
type: array |
|
79
|
description: >- |
|
80
|
Join query parameters with an AND condition. Each object's |
|
81
|
content is the same type as the expected query parameters. |
|
82
|
items: |
|
83
|
type: object |
|
84
|
title: $and |
|
85
|
$or: |
|
86
|
type: array |
|
87
|
description: >- |
|
88
|
Join query parameters with an OR condition. Each object's |
|
89
|
content is the same type as the expected query parameters. |
|
90
|
items: |
|
91
|
type: object |
|
92
|
title: $or |
|
93
|
$eq: |
|
94
|
oneOf: |
|
95
|
- type: string |
|
96
|
title: $eq |
|
97
|
description: Filter by an exact match. |
|
98
|
- type: array |
|
99
|
description: Filter by exact matches. |
|
100
|
items: |
|
101
|
type: string |
|
102
|
title: $eq |
|
103
|
description: Filter by an exact match. |
|
104
|
- type: array |
|
105
|
description: Filter by exact matches. |
|
106
|
items: |
|
107
|
oneOf: |
|
108
|
- type: string |
|
109
|
title: $eq |
|
110
|
description: Filter by an exact match. |
|
111
|
- type: array |
|
112
|
description: Filter by exact matches. |
|
113
|
items: |
|
114
|
type: string |
|
115
|
title: $eq |
|
116
|
description: Filter by an exact match. |
|
117
|
$ne: |
|
118
|
oneOf: |
|
119
|
- type: string |
|
120
|
title: $ne |
|
121
|
description: Filter by values not equal to this parameter. |
|
122
|
- type: array |
|
123
|
description: Filter by values not in this array. |
|
124
|
items: |
|
125
|
type: string |
|
126
|
title: $ne |
|
127
|
description: Filter by values not equal to this parameter. |
|
128
|
$in: |
|
129
|
type: array |
|
130
|
description: Filter by values in this array. |
|
131
|
items: |
|
132
|
oneOf: |
|
133
|
- type: string |
|
134
|
title: $in |
|
135
|
description: Filter by matching value. |
|
136
|
- type: array |
|
137
|
description: Filter by values in this array. |
|
138
|
items: |
|
139
|
type: string |
|
140
|
title: $in |
|
141
|
description: Filter matching values. |
|
142
|
$nin: |
|
143
|
type: array |
|
144
|
description: Filter by values not in this array. |
|
145
|
items: |
|
146
|
oneOf: |
|
147
|
- type: string |
|
148
|
title: $nin |
|
149
|
description: Filter by values not matching this parameter. |
|
150
|
- type: array |
|
151
|
description: Filter by values not in this array. |
|
152
|
items: |
|
153
|
type: string |
|
154
|
title: $nin |
|
155
|
description: Filter by values not matching this parameter. |
|
156
|
$not: |
|
157
|
oneOf: |
|
158
|
- type: string |
|
159
|
title: $not |
|
160
|
description: Filter by values not matching this parameter. |
|
161
|
- type: object |
|
162
|
description: >- |
|
163
|
Filter by values not matching the conditions in this |
|
164
|
parameter. |
|
165
|
properties: |
|
166
|
$and: |
|
167
|
type: array |
|
168
|
description: >- |
|
169
|
Join query parameters with an AND condition. Each |
|
170
|
object's content is the same type as the expected |
|
171
|
query parameters. |
|
172
|
items: |
|
173
|
type: object |
|
174
|
title: $and |
|
175
|
$or: |
|
176
|
type: array |
|
177
|
description: >- |
|
178
|
Join query parameters with an OR condition. Each |
|
179
|
object's content is the same type as the expected |
|
180
|
query parameters. |
|
181
|
items: |
|
182
|
type: object |
|
183
|
title: $or |
|
184
|
$eq: |
|
185
|
oneOf: |
|
186
|
- type: string |
|
187
|
title: $eq |
|
188
|
description: Filter by an exact match. |
|
189
|
- type: array |
|
190
|
description: Filter by exact matches. |
|
191
|
items: |
|
192
|
type: string |
|
193
|
title: $eq |
|
194
|
description: Filter by an exact match. |
|
195
|
$ne: |
|
196
|
type: string |
|
197
|
title: $ne |
|
198
|
description: Filter by values not equal to this parameter. |
|
199
|
$in: |
|
200
|
type: array |
|
201
|
description: Filter by values in this array. |
|
202
|
items: |
|
203
|
type: string |
|
204
|
title: $in |
|
205
|
description: Filter by values in this array. |
|
206
|
$nin: |
|
207
|
type: array |
|
208
|
description: Filter by values not in this array. |
|
209
|
items: |
|
210
|
type: string |
|
211
|
title: $nin |
|
212
|
description: Filter by values not in this array. |
|
213
|
$not: |
|
214
|
oneOf: |
|
215
|
- type: string |
|
216
|
title: $not |
|
217
|
description: Filter by values not matching this parameter. |
|
218
|
- type: object |
|
219
|
description: >- |
|
220
|
Filter by values not matching the conditions in |
|
221
|
this parameter. |
|
222
|
- type: array |
|
223
|
description: Filter by values not in this array. |
|
224
|
items: |
|
225
|
type: string |
|
226
|
title: $not |
|
227
|
description: Filter by values not matching this parameter. |
|
228
|
$gt: |
|
229
|
type: string |
|
230
|
title: $gt |
|
231
|
description: >- |
|
232
|
Filter by values greater than this parameter. Useful |
|
233
|
for numbers and dates only. |
|
234
|
$gte: |
|
235
|
type: string |
|
236
|
title: $gte |
|
237
|
description: >- |
|
238
|
Filter by values greater than or equal to this |
|
239
|
parameter. Useful for numbers and dates only. |
|
240
|
$lt: |
|
241
|
type: string |
|
242
|
title: $lt |
|
243
|
description: >- |
|
244
|
Filter by values less than this parameter. Useful for |
|
245
|
numbers and dates only. |
|
246
|
$lte: |
|
247
|
type: string |
|
248
|
title: $lte |
|
249
|
description: >- |
|
250
|
Filter by values less than or equal to this parameter. |
|
251
|
Useful for numbers and dates only. |
|
252
|
$like: |
|
253
|
type: string |
|
254
|
title: $like |
|
255
|
description: Apply a `like` filter. Useful for strings only. |
|
256
|
$re: |
|
257
|
type: string |
|
258
|
title: $re |
|
259
|
description: Apply a regex filter. Useful for strings only. |
|
260
|
$ilike: |
|
261
|
type: string |
|
262
|
title: $ilike |
|
263
|
description: >- |
|
264
|
Apply a case-insensitive `like` filter. Useful for |
|
265
|
strings only. |
|
266
|
$fulltext: |
|
267
|
type: string |
|
268
|
title: $fulltext |
|
269
|
description: Filter to apply on full-text properties. |
|
270
|
$overlap: |
|
271
|
type: array |
|
272
|
description: >- |
|
273
|
Filter arrays that have overlapping values with this |
|
274
|
parameter. |
|
275
|
items: |
|
276
|
type: string |
|
277
|
title: $overlap |
|
278
|
description: >- |
|
279
|
Filter arrays that have overlapping values with this |
|
280
|
parameter. |
|
281
|
$contains: |
|
282
|
type: array |
|
283
|
description: >- |
|
284
|
Filter arrays that contain some of the values of this |
|
285
|
parameter. |
|
286
|
items: |
|
287
|
type: string |
|
288
|
title: $contains |
|
289
|
description: >- |
|
290
|
Filter arrays that contain some of the values of |
|
291
|
this parameter. |
|
292
|
$contained: |
|
293
|
type: array |
|
294
|
description: >- |
|
295
|
Filter arrays that contain all values of this |
|
296
|
parameter. |
|
297
|
items: |
|
298
|
type: string |
|
299
|
title: $contained |
|
300
|
description: >- |
|
301
|
Filter arrays that contain all values of this |
|
302
|
parameter. |
|
303
|
$exists: |
|
304
|
type: boolean |
|
305
|
title: $exists |
|
306
|
description: >- |
|
307
|
Filter by whether a value for this parameter exists |
|
308
|
(not `null`). |
|
309
|
- type: array |
|
310
|
description: Filter by values not in this array. |
|
311
|
items: |
|
312
|
type: string |
|
313
|
title: $not |
|
314
|
description: Filter by values not matching this parameter. |
|
315
|
- type: array |
|
316
|
description: >- |
|
317
|
Filter by values not matching the conditions in this |
|
318
|
parameter. |
|
319
|
items: |
|
320
|
oneOf: |
|
321
|
- type: string |
|
322
|
title: $not |
|
323
|
description: Filter by values not matching this parameter. |
|
324
|
- type: object |
|
325
|
description: >- |
|
326
|
Filter by values not matching the conditions in this |
|
327
|
parameter. |
|
328
|
properties: |
|
329
|
$and: |
|
330
|
type: array |
|
331
|
description: >- |
|
332
|
Join query parameters with an AND condition. |
|
333
|
Each object's content is the same type as the |
|
334
|
expected query parameters. |
|
335
|
items: |
|
336
|
type: object |
|
337
|
title: $and |
|
338
|
$or: |
|
339
|
type: array |
|
340
|
description: >- |
|
341
|
Join query parameters with an OR condition. Each |
|
342
|
object's content is the same type as the |
|
343
|
expected query parameters. |
|
344
|
items: |
|
345
|
type: object |
|
346
|
title: $or |
|
347
|
$eq: |
|
348
|
oneOf: |
|
349
|
- type: string |
|
350
|
title: $eq |
|
351
|
description: Filter by an exact match. |
|
352
|
- type: array |
|
353
|
description: Filter by exact matches. |
|
354
|
items: |
|
355
|
type: string |
|
356
|
title: $eq |
|
357
|
description: Filter by an exact match. |
|
358
|
$ne: |
|
359
|
type: string |
|
360
|
title: $ne |
|
361
|
description: Filter by values not equal to this parameter. |
|
362
|
$in: |
|
363
|
type: array |
|
364
|
description: Filter by values in this array. |
|
365
|
items: |
|
366
|
type: string |
|
367
|
title: $in |
|
368
|
description: Filter by exact matches. |
|
369
|
$nin: |
|
370
|
type: array |
|
371
|
description: Filter by values not in this array. |
|
372
|
items: |
|
373
|
type: string |
|
374
|
title: $nin |
|
375
|
description: Filter by values not matching this parameter. |
|
376
|
$not: |
|
377
|
oneOf: |
|
378
|
- type: string |
|
379
|
title: $not |
|
380
|
description: >- |
|
381
|
Filter by values not matching this |
|
382
|
parameter. |
|
383
|
- type: object |
|
384
|
description: >- |
|
385
|
Filter by values not matching the conditions |
|
386
|
in this parameter. |
|
387
|
- type: array |
|
388
|
description: Filter by values not in this array. |
|
389
|
items: |
|
390
|
type: string |
|
391
|
title: $not |
|
392
|
description: >- |
|
393
|
Filter by values not matching this |
|
394
|
parameter. |
|
395
|
$gt: |
|
396
|
type: string |
|
397
|
title: $gt |
|
398
|
description: >- |
|
399
|
Filter by values greater than this parameter. |
|
400
|
Useful for numbers and dates only. |
|
401
|
$gte: |
|
402
|
type: string |
|
403
|
title: $gte |
|
404
|
description: >- |
|
405
|
Filter by values greater than or equal to this |
|
406
|
parameter. Useful for numbers and dates only. |
|
407
|
$lt: |
|
408
|
type: string |
|
409
|
title: $lt |
|
410
|
description: >- |
|
411
|
Filter by values less than this parameter. |
|
412
|
Useful for numbers and dates only. |
|
413
|
$lte: |
|
414
|
type: string |
|
415
|
title: $lte |
|
416
|
description: >- |
|
417
|
Filter by values less than or equal to this |
|
418
|
parameter. Useful for numbers and dates only. |
|
419
|
$like: |
|
420
|
type: string |
|
421
|
title: $like |
|
422
|
description: Apply a `like` filter. Useful for strings only. |
|
423
|
$re: |
|
424
|
type: string |
|
425
|
title: $re |
|
426
|
description: Apply a regex filter. Useful for strings only. |
|
427
|
$ilike: |
|
428
|
type: string |
|
429
|
title: $ilike |
|
430
|
description: >- |
|
431
|
Apply a case-insensitive `like` filter. Useful |
|
432
|
for strings only. |
|
433
|
$fulltext: |
|
434
|
type: string |
|
435
|
title: $fulltext |
|
436
|
description: Filter to apply on full-text properties. |
|
437
|
$overlap: |
|
438
|
type: array |
|
439
|
description: >- |
|
440
|
Filter arrays that have overlapping values with |
|
441
|
this parameter. |
|
442
|
items: |
|
443
|
type: string |
|
444
|
title: $overlap |
|
445
|
description: >- |
|
446
|
Filter arrays that have overlapping values |
|
447
|
with this parameter. |
|
448
|
$contains: |
|
449
|
type: array |
|
450
|
description: >- |
|
451
|
Filter arrays that contain some of the values of |
|
452
|
this parameter. |
|
453
|
items: |
|
454
|
type: string |
|
455
|
title: $contains |
|
456
|
description: >- |
|
457
|
Filter arrays that contain some of the values |
|
458
|
of this parameter. |
|
459
|
$contained: |
|
460
|
type: array |
|
461
|
description: >- |
|
462
|
Filter arrays that contain all values of this |
|
463
|
parameter. |
|
464
|
items: |
|
465
|
type: string |
|
466
|
title: $contained |
|
467
|
description: >- |
|
468
|
Filter arrays that contain all values of this |
|
469
|
parameter. |
|
470
|
$exists: |
|
471
|
type: boolean |
|
472
|
title: $exists |
|
473
|
description: >- |
|
474
|
Filter by whether a value for this parameter |
|
475
|
exists (not `null`). |
|
476
|
$gt: |
|
477
|
oneOf: |
|
478
|
- type: string |
|
479
|
title: $gt |
|
480
|
description: >- |
|
481
|
Filter by values greater than this parameter. Useful for |
|
482
|
numbers and dates only. |
|
483
|
- type: array |
|
484
|
description: >- |
|
485
|
Filter by values greater than items in this array. Useful |
|
486
|
for numbers and dates only. |
|
487
|
items: |
|
488
|
type: string |
|
489
|
title: $gt |
|
490
|
description: >- |
|
491
|
Filter by values greater than this parameter. Useful for |
|
492
|
numbers and dates only. |
|
493
|
$gte: |
|
494
|
oneOf: |
|
495
|
- type: string |
|
496
|
title: $gte |
|
497
|
description: >- |
|
498
|
Filter by values greater than or equal to this parameter. |
|
499
|
Useful for numbers and dates only. |
|
500
|
- type: array |
|
501
|
description: >- |
|
502
|
Filter by values greater than or equal to items in this |
|
503
|
array. Useful for numbers and dates only. |
|
504
|
items: |
|
505
|
type: string |
|
506
|
title: $gte |
|
507
|
description: >- |
|
508
|
Filter by values greater than or equal to this |
|
509
|
parameter. Useful for numbers and dates only. |
|
510
|
$lt: |
|
511
|
oneOf: |
|
512
|
- type: string |
|
513
|
title: $lt |
|
514
|
description: >- |
|
515
|
Filter by values less than this parameter. Useful for |
|
516
|
numbers and dates only. |
|
517
|
- type: array |
|
518
|
description: >- |
|
519
|
Filter by values less than items in this array. Useful for |
|
520
|
numbers and dates only. |
|
521
|
items: |
|
522
|
type: string |
|
523
|
title: $lt |
|
524
|
description: >- |
|
525
|
Filter by values less than this parameter. Useful for |
|
526
|
numbers and dates only. |
|
527
|
$lte: |
|
528
|
oneOf: |
|
529
|
- type: string |
|
530
|
title: $lte |
|
531
|
description: >- |
|
532
|
Filter by values less than or equal to this parameter. |
|
533
|
Useful for numbers and dates only. |
|
534
|
- type: array |
|
535
|
description: >- |
|
536
|
Filter by values less than or equal to items in this |
|
537
|
array. Useful for numbers and dates only. |
|
538
|
items: |
|
539
|
type: string |
|
540
|
title: $lte |
|
541
|
description: >- |
|
542
|
Filter by values less than or equal to this parameter. |
|
543
|
Useful for numbers and dates only. |
|
544
|
$like: |
|
545
|
type: string |
|
546
|
title: $like |
|
547
|
description: Apply a `like` filter. Useful for strings only. |
|
548
|
$re: |
|
549
|
type: string |
|
550
|
title: $re |
|
551
|
description: Apply a regex filter. Useful for strings only. |
|
552
|
$ilike: |
|
553
|
type: string |
|
554
|
title: $ilike |
|
555
|
description: >- |
|
556
|
Apply a case-insensitive `like` filter. Useful for strings |
|
557
|
only. |
|
558
|
$fulltext: |
|
559
|
type: string |
|
560
|
title: $fulltext |
|
561
|
description: Filter to apply on full-text properties. |
|
562
|
$overlap: |
|
563
|
type: array |
|
564
|
description: >- |
|
565
|
Filter arrays that have overlapping values with this |
|
566
|
parameter. |
|
567
|
items: |
|
568
|
type: string |
|
569
|
title: $overlap |
|
570
|
description: >- |
|
571
|
Filter arrays that have overlapping values with this |
|
572
|
parameter. |
|
573
|
$contains: |
|
574
|
type: array |
|
575
|
description: >- |
|
576
|
Filter arrays that contain some of the values of this |
|
577
|
parameter. |
|
578
|
items: |
|
579
|
type: string |
|
580
|
title: $contains |
|
581
|
description: >- |
|
582
|
Filter arrays that contain some of the values of this |
|
583
|
parameter. |
|
584
|
$contained: |
|
585
|
type: array |
|
586
|
description: Filter arrays that contain all values of this parameter. |
|
587
|
items: |
|
588
|
type: string |
|
589
|
title: $contained |
|
590
|
description: Filter arrays that contain all values of this parameter. |
|
591
|
$exists: |
|
592
|
type: boolean |
|
593
|
title: $exists |
|
594
|
description: >- |
|
595
|
Filter by whether a value for this parameter exists (not |
|
596
|
`null`). |
|
597
|
- name: $and |
|
598
|
in: query |
|
599
|
description: >- |
|
600
|
Join query parameters with an AND condition. Each object's content is |
|
601
|
the same type as the expected query parameters. |
|
602
|
required: false |
|
603
|
schema: |
|
604
|
type: array |
|
605
|
description: >- |
|
606
|
Join query parameters with an AND condition. Each object's content is |
|
607
|
the same type as the expected query parameters. |
|
608
|
items: |
|
609
|
type: object |
|
610
|
title: $and |
|
611
|
- name: $or |
|
612
|
in: query |
|
613
|
description: >- |
|
614
|
Join query parameters with an OR condition. Each object's content is the |
|
615
|
same type as the expected query parameters. |
|
616
|
required: false |
|
617
|
schema: |
|
618
|
type: array |
|
619
|
description: >- |
|
620
|
Join query parameters with an OR condition. Each object's content is |
|
621
|
the same type as the expected query parameters. |
|
622
|
items: |
|
623
|
type: object |
|
624
|
title: $or |
|
625
|
- name: sales_channel_id |
|
626
|
in: query |
|
627
|
description: Filter by the associated sales channels to retrieve its draft orders. |
|
628
|
required: false |
|
629
|
schema: |
|
630
|
type: array |
|
631
|
description: Filter by the associated sales channels to retrieve its draft orders. |
|
632
|
items: |
|
633
|
type: string |
|
634
|
title: sales_channel_id |
|
635
|
description: A sales channel's ID. |
|
636
|
- name: region_id |
|
637
|
in: query |
|
638
|
description: Filter by region IDs to retrieve their associated draft orders. |
|
639
|
required: false |
|
640
|
schema: |
|
641
|
oneOf: |
|
642
|
- type: string |
|
643
|
title: region_id |
|
644
|
description: The draft order's region id. |
|
645
|
- type: array |
|
646
|
description: The draft order's region id. |
|
647
|
items: |
|
648
|
type: string |
|
649
|
title: region_id |
|
650
|
description: The region id's details. |
|
651
|
- name: q |
|
652
|
in: query |
|
653
|
description: Search term to filter the order's searchable properties. |
|
654
|
required: false |
|
655
|
schema: |
|
656
|
type: string |
|
657
|
title: q |
|
658
|
description: Search term to filter the order's searchable properties. |
|
659
|
- name: created_at |
|
660
|
in: query |
|
661
|
description: Filter by the draft order's creation date. |
|
662
|
required: false |
|
663
|
schema: |
|
664
|
type: object |
|
665
|
description: Filter by the draft order's creation date. |
|
666
|
properties: |
|
667
|
$and: |
|
668
|
type: array |
|
669
|
description: >- |
|
670
|
Join query parameters with an AND condition. Each object's content |
|
671
|
is the same type as the expected query parameters. |
|
672
|
items: |
|
673
|
type: object |
|
674
|
title: $and |
|
675
|
$or: |
|
676
|
type: array |
|
677
|
description: >- |
|
678
|
Join query parameters with an OR condition. Each object's content |
|
679
|
is the same type as the expected query parameters. |
|
680
|
items: |
|
681
|
type: object |
|
682
|
title: $or |
|
683
|
$eq: |
|
684
|
oneOf: |
|
685
|
- type: string |
|
686
|
title: $eq |
|
687
|
description: Filter by an exact match. |
|
688
|
- type: array |
|
689
|
description: Filter by multiple exact matches. |
|
690
|
items: |
|
691
|
type: string |
|
692
|
title: $eq |
|
693
|
description: An exact match. |
|
694
|
$ne: |
|
695
|
type: string |
|
696
|
title: $ne |
|
697
|
description: Filter by values not equal to this parameter. |
|
698
|
$in: |
|
699
|
type: array |
|
700
|
description: Filter by values in this array. |
|
701
|
items: |
|
702
|
type: string |
|
703
|
title: $in |
|
704
|
description: The value to match. |
|
705
|
$nin: |
|
706
|
type: array |
|
707
|
description: Filter by values not in this array. |
|
708
|
items: |
|
709
|
type: string |
|
710
|
title: $nin |
|
711
|
description: The value not to match. |
|
712
|
$not: |
|
713
|
oneOf: |
|
714
|
- type: string |
|
715
|
title: $not |
|
716
|
description: Filter by values not matching this parameter. |
|
717
|
- type: object |
|
718
|
description: >- |
|
719
|
Filter by values not matching the conditions in this |
|
720
|
parameter. |
|
721
|
properties: |
|
722
|
$and: |
|
723
|
type: array |
|
724
|
description: >- |
|
725
|
Join query parameters with an AND condition. Each object's |
|
726
|
content is the same type as the expected query parameters. |
|
727
|
items: |
|
728
|
type: object |
|
729
|
title: $and |
|
730
|
$or: |
|
731
|
type: array |
|
732
|
description: >- |
|
733
|
Join query parameters with an OR condition. Each object's |
|
734
|
content is the same type as the expected query parameters. |
|
735
|
items: |
|
736
|
type: object |
|
737
|
title: $or |
|
738
|
$eq: |
|
739
|
oneOf: |
|
740
|
- type: string |
|
741
|
title: $eq |
|
742
|
description: Filter by an exact match. |
|
743
|
- type: array |
|
744
|
description: Filter by multiple exact matches. |
|
745
|
items: |
|
746
|
type: string |
|
747
|
title: $eq |
|
748
|
description: The value to match. |
|
749
|
$ne: |
|
750
|
type: string |
|
751
|
title: $ne |
|
752
|
description: Filter by values not matching this parameter. |
|
753
|
$in: |
|
754
|
type: array |
|
755
|
description: Filter by values in this array. |
|
756
|
items: |
|
757
|
type: string |
|
758
|
title: $in |
|
759
|
description: The value to match. |
|
760
|
$nin: |
|
761
|
type: array |
|
762
|
description: Filter by values not in this array. |
|
763
|
items: |
|
764
|
type: string |
|
765
|
title: $nin |
|
766
|
description: The value to not match |
|
767
|
$not: |
|
768
|
oneOf: |
|
769
|
- type: string |
|
770
|
title: $not |
|
771
|
description: Filter by values not matching this parameter |
|
772
|
- type: object |
|
773
|
description: >- |
|
774
|
Filter by values not matching the conditions in this |
|
775
|
parameter. |
|
776
|
- type: array |
|
777
|
description: >- |
|
778
|
Filter by values not matching the values of this |
|
779
|
parameter. |
|
780
|
items: |
|
781
|
type: string |
|
782
|
title: $not |
|
783
|
description: The values to not match. |
|
784
|
$gt: |
|
785
|
type: string |
|
786
|
title: $gt |
|
787
|
description: >- |
|
788
|
Filter by values greater than this parameter. Useful for |
|
789
|
numbers and dates only. |
|
790
|
$gte: |
|
791
|
type: string |
|
792
|
title: $gte |
|
793
|
description: >- |
|
794
|
Filter by values greater than or equal to this parameter. |
|
795
|
Useful for numbers and dates only. |
|
796
|
$lt: |
|
797
|
type: string |
|
798
|
title: $lt |
|
799
|
description: >- |
|
800
|
Filter by values less than this parameter. Useful for |
|
801
|
numbers and dates only. |
|
802
|
$lte: |
|
803
|
type: string |
|
804
|
title: $lte |
|
805
|
description: >- |
|
806
|
Filter by values less than or equal to this parameter. |
|
807
|
Useful for numbers and dates only. |
|
808
|
$like: |
|
809
|
type: string |
|
810
|
title: $like |
|
811
|
description: Apply a `like` filter. Useful for strings only. |
|
812
|
$re: |
|
813
|
type: string |
|
814
|
title: $re |
|
815
|
description: Apply a regex filter. Useful for strings only. |
|
816
|
$ilike: |
|
817
|
type: string |
|
818
|
title: $ilike |
|
819
|
description: >- |
|
820
|
Apply a case-insensitive `like` filter. Useful for strings |
|
821
|
only. |
|
822
|
$fulltext: |
|
823
|
type: string |
|
824
|
title: $fulltext |
|
825
|
description: Filter to apply on full-text properties. |
|
826
|
$overlap: |
|
827
|
type: array |
|
828
|
description: >- |
|
829
|
Filter arrays that have overlapping values with this |
|
830
|
parameter. |
|
831
|
items: |
|
832
|
type: string |
|
833
|
title: $overlap |
|
834
|
description: The value to match. |
|
835
|
$contains: |
|
836
|
type: array |
|
837
|
description: >- |
|
838
|
Filter arrays that contain some of the values of this |
|
839
|
parameter. |
|
840
|
items: |
|
841
|
type: string |
|
842
|
title: $contains |
|
843
|
description: The values to match. |
|
844
|
$contained: |
|
845
|
type: array |
|
846
|
description: Filter arrays that contain all values of this parameter. |
|
847
|
items: |
|
848
|
type: string |
|
849
|
title: $contained |
|
850
|
description: The values to match. |
|
851
|
$exists: |
|
852
|
type: boolean |
|
853
|
title: $exists |
|
854
|
description: >- |
|
855
|
Filter by whether a value for this parameter exists (not |
|
856
|
`null`). |
|
857
|
- type: array |
|
858
|
description: Filter by values not matching those in this parameter. |
|
859
|
items: |
|
860
|
type: string |
|
861
|
title: $not |
|
862
|
description: The values to not match. |
|
863
|
$gt: |
|
864
|
type: string |
|
865
|
title: $gt |
|
866
|
description: >- |
|
867
|
Filter by values greater than this parameter. Useful for numbers |
|
868
|
and dates only. |
|
869
|
$gte: |
|
870
|
type: string |
|
871
|
title: $gte |
|
872
|
description: >- |
|
873
|
Filter by values greater than or equal to this parameter. Useful |
|
874
|
for numbers and dates only. |
|
875
|
$lt: |
|
876
|
type: string |
|
877
|
title: $lt |
|
878
|
description: >- |
|
879
|
Filter by values less than this parameter. Useful for numbers and |
|
880
|
dates only. |
|
881
|
$lte: |
|
882
|
type: string |
|
883
|
title: $lte |
|
884
|
description: >- |
|
885
|
Filter by values less than or equal to this parameter. Useful for |
|
886
|
numbers and dates only. |
|
887
|
$like: |
|
888
|
type: string |
|
889
|
title: $like |
|
890
|
description: Apply a `like` filter. Useful for strings only. |
|
891
|
$re: |
|
892
|
type: string |
|
893
|
title: $re |
|
894
|
description: Apply a regex filter. Useful for strings only. |
|
895
|
$ilike: |
|
896
|
type: string |
|
897
|
title: $ilike |
|
898
|
description: Apply a case-insensitive `like` filter. Useful for strings only. |
|
899
|
$fulltext: |
|
900
|
type: string |
|
901
|
title: $fulltext |
|
902
|
description: Filter to apply on full-text properties. |
|
903
|
$overlap: |
|
904
|
type: array |
|
905
|
description: Filter arrays that have overlapping values with this parameter. |
|
906
|
items: |
|
907
|
type: string |
|
908
|
title: $overlap |
|
909
|
description: The values to match. |
|
910
|
$contains: |
|
911
|
type: array |
|
912
|
description: Filter arrays that contain some of the values of this parameter. |
|
913
|
items: |
|
914
|
type: string |
|
915
|
title: $contains |
|
916
|
description: The values to match. |
|
917
|
$contained: |
|
918
|
type: array |
|
919
|
description: Filter arrays that contain all values of this parameter. |
|
920
|
items: |
|
921
|
type: string |
|
922
|
title: $contained |
|
923
|
description: The values to match. |
|
924
|
$exists: |
|
925
|
type: boolean |
|
926
|
title: $exists |
|
927
|
description: Filter by whether a value for this parameter exists (not `null`). |
|
928
|
title: created_at |
|
929
|
- name: updated_at |
|
930
|
in: query |
|
931
|
description: Filter by the draft order's update date. |
|
932
|
required: false |
|
933
|
schema: |
|
934
|
type: object |
|
935
|
description: Filter by the draft order's update date. |
|
936
|
properties: |
|
937
|
$and: |
|
938
|
type: array |
|
939
|
description: >- |
|
940
|
Join query parameters with an AND condition. Each object's content |
|
941
|
is the same type as the expected query parameters. |
|
942
|
items: |
|
943
|
type: object |
|
944
|
title: $and |
|
945
|
$or: |
|
946
|
type: array |
|
947
|
description: >- |
|
948
|
Join query parameters with an OR condition. Each object's content |
|
949
|
is the same type as the expected query parameters. |
|
950
|
items: |
|
951
|
type: object |
|
952
|
title: $or |
|
953
|
$eq: |
|
954
|
oneOf: |
|
955
|
- type: string |
|
956
|
title: $eq |
|
957
|
description: Filter by an exact match. |
|
958
|
- type: array |
|
959
|
description: Filter by multiple exact matches. |
|
960
|
items: |
|
961
|
type: string |
|
962
|
title: $eq |
|
963
|
description: An exact match. |
|
964
|
$ne: |
|
965
|
type: string |
|
966
|
title: $ne |
|
967
|
description: Filter by values not equal to this parameter. |
|
968
|
$in: |
|
969
|
type: array |
|
970
|
description: Filter by values in this array. |
|
971
|
items: |
|
972
|
type: string |
|
973
|
title: $in |
|
974
|
description: The value to match. |
|
975
|
$nin: |
|
976
|
type: array |
|
977
|
description: Filter by values not in this array. |
|
978
|
items: |
|
979
|
type: string |
|
980
|
title: $nin |
|
981
|
description: The value not to match. |
|
982
|
$not: |
|
983
|
oneOf: |
|
984
|
- type: string |
|
985
|
title: $not |
|
986
|
description: Filter by values not matching this parameter. |
|
987
|
- type: object |
|
988
|
description: >- |
|
989
|
Filter by values not matching the conditions in this |
|
990
|
parameter. |
|
991
|
properties: |
|
992
|
$and: |
|
993
|
type: array |
|
994
|
description: >- |
|
995
|
Join query parameters with an AND condition. Each object's |
|
996
|
content is the same type as the expected query parameters. |
|
997
|
items: |
|
998
|
type: object |
|
999
|
title: $and |
|
1000
|
$or: |
|
1001
|
type: array |
|
1002
|
description: >- |
|
1003
|
Join query parameters with an OR condition. Each object's |
|
1004
|
content is the same type as the expected query parameters. |
|
1005
|
items: |
|
1006
|
type: object |
|
1007
|
title: $or |
|
1008
|
$eq: |
|
1009
|
oneOf: |
|
1010
|
- type: string |
|
1011
|
title: $eq |
|
1012
|
description: Filter by an exact match. |
|
1013
|
- type: array |
|
1014
|
description: Filter by multiple exact matches. |
|
1015
|
items: |
|
1016
|
type: string |
|
1017
|
title: $eq |
|
1018
|
description: The value to match. |
|
1019
|
$ne: |
|
1020
|
type: string |
|
1021
|
title: $ne |
|
1022
|
description: Filter by values not matching this parameter. |
|
1023
|
$in: |
|
1024
|
type: array |
|
1025
|
description: Filter by values in this array. |
|
1026
|
items: |
|
1027
|
type: string |
|
1028
|
title: $in |
|
1029
|
description: The value to match. |
|
1030
|
$nin: |
|
1031
|
type: array |
|
1032
|
description: Filter by values not in this array. |
|
1033
|
items: |
|
1034
|
type: string |
|
1035
|
title: $nin |
|
1036
|
description: The value to not match |
|
1037
|
$not: |
|
1038
|
oneOf: |
|
1039
|
- type: string |
|
1040
|
title: $not |
|
1041
|
description: Filter by values not matching this parameter |
|
1042
|
- type: object |
|
1043
|
description: >- |
|
1044
|
Filter by values not matching the conditions in this |
|
1045
|
parameter. |
|
1046
|
- type: array |
|
1047
|
description: >- |
|
1048
|
Filter by values not matching the values of this |
|
1049
|
parameter. |
|
1050
|
items: |
|
1051
|
type: string |
|
1052
|
title: $not |
|
1053
|
description: The values to not match. |
|
1054
|
$gt: |
|
1055
|
type: string |
|
1056
|
title: $gt |
|
1057
|
description: >- |
|
1058
|
Filter by values greater than this parameter. Useful for |
|
1059
|
numbers and dates only. |
|
1060
|
$gte: |
|
1061
|
type: string |
|
1062
|
title: $gte |
|
1063
|
description: >- |
|
1064
|
Filter by values greater than or equal to this parameter. |
|
1065
|
Useful for numbers and dates only. |
|
1066
|
$lt: |
|
1067
|
type: string |
|
1068
|
title: $lt |
|
1069
|
description: >- |
|
1070
|
Filter by values less than this parameter. Useful for |
|
1071
|
numbers and dates only. |
|
1072
|
$lte: |
|
1073
|
type: string |
|
1074
|
title: $lte |
|
1075
|
description: >- |
|
1076
|
Filter by values less than or equal to this parameter. |
|
1077
|
Useful for numbers and dates only. |
|
1078
|
$like: |
|
1079
|
type: string |
|
1080
|
title: $like |
|
1081
|
description: Apply a `like` filter. Useful for strings only. |
|
1082
|
$re: |
|
1083
|
type: string |
|
1084
|
title: $re |
|
1085
|
description: Apply a regex filter. Useful for strings only. |
|
1086
|
$ilike: |
|
1087
|
type: string |
|
1088
|
title: $ilike |
|
1089
|
description: >- |
|
1090
|
Apply a case-insensitive `like` filter. Useful for strings |
|
1091
|
only. |
|
1092
|
$fulltext: |
|
1093
|
type: string |
|
1094
|
title: $fulltext |
|
1095
|
description: Filter to apply on full-text properties. |
|
1096
|
$overlap: |
|
1097
|
type: array |
|
1098
|
description: >- |
|
1099
|
Filter arrays that have overlapping values with this |
|
1100
|
parameter. |
|
1101
|
items: |
|
1102
|
type: string |
|
1103
|
title: $overlap |
|
1104
|
description: The value to match. |
|
1105
|
$contains: |
|
1106
|
type: array |
|
1107
|
description: >- |
|
1108
|
Filter arrays that contain some of the values of this |
|
1109
|
parameter. |
|
1110
|
items: |
|
1111
|
type: string |
|
1112
|
title: $contains |
|
1113
|
description: The values to match. |
|
1114
|
$contained: |
|
1115
|
type: array |
|
1116
|
description: Filter arrays that contain all values of this parameter. |
|
1117
|
items: |
|
1118
|
type: string |
|
1119
|
title: $contained |
|
1120
|
description: The values to match. |
|
1121
|
$exists: |
|
1122
|
type: boolean |
|
1123
|
title: $exists |
|
1124
|
description: >- |
|
1125
|
Filter by whether a value for this parameter exists (not |
|
1126
|
`null`). |
|
1127
|
- type: array |
|
1128
|
description: Filter by values not matching those in this parameter. |
|
1129
|
items: |
|
1130
|
type: string |
|
1131
|
title: $not |
|
1132
|
description: The values to not match. |
|
1133
|
$gt: |
|
1134
|
type: string |
|
1135
|
title: $gt |
|
1136
|
description: >- |
|
1137
|
Filter by values greater than this parameter. Useful for numbers |
|
1138
|
and dates only. |
|
1139
|
$gte: |
|
1140
|
type: string |
|
1141
|
title: $gte |
|
1142
|
description: >- |
|
1143
|
Filter by values greater than or equal to this parameter. Useful |
|
1144
|
for numbers and dates only. |
|
1145
|
$lt: |
|
1146
|
type: string |
|
1147
|
title: $lt |
|
1148
|
description: >- |
|
1149
|
Filter by values less than this parameter. Useful for numbers and |
|
1150
|
dates only. |
|
1151
|
$lte: |
|
1152
|
type: string |
|
1153
|
title: $lte |
|
1154
|
description: >- |
|
1155
|
Filter by values less than or equal to this parameter. Useful for |
|
1156
|
numbers and dates only. |
|
1157
|
$like: |
|
1158
|
type: string |
|
1159
|
title: $like |
|
1160
|
description: Apply a `like` filter. Useful for strings only. |
|
1161
|
$re: |
|
1162
|
type: string |
|
1163
|
title: $re |
|
1164
|
description: Apply a regex filter. Useful for strings only. |
|
1165
|
$ilike: |
|
1166
|
type: string |
|
1167
|
title: $ilike |
|
1168
|
description: Apply a case-insensitive `like` filter. Useful for strings only. |
|
1169
|
$fulltext: |
|
1170
|
type: string |
|
1171
|
title: $fulltext |
|
1172
|
description: Filter to apply on full-text properties. |
|
1173
|
$overlap: |
|
1174
|
type: array |
|
1175
|
description: Filter arrays that have overlapping values with this parameter. |
|
1176
|
items: |
|
1177
|
type: string |
|
1178
|
title: $overlap |
|
1179
|
description: The values to match. |
|
1180
|
$contains: |
|
1181
|
type: array |
|
1182
|
description: Filter arrays that contain some of the values of this parameter. |
|
1183
|
items: |
|
1184
|
type: string |
|
1185
|
title: $contains |
|
1186
|
description: The values to match. |
|
1187
|
$contained: |
|
1188
|
type: array |
|
1189
|
description: Filter arrays that contain all values of this parameter. |
|
1190
|
items: |
|
1191
|
type: string |
|
1192
|
title: $contained |
|
1193
|
description: The values to match. |
|
1194
|
$exists: |
|
1195
|
type: boolean |
|
1196
|
title: $exists |
|
1197
|
description: Filter by whether a value for this parameter exists (not `null`). |
|
1198
|
title: updated_at |
|
1199
|
- name: customer_id |
|
1200
|
in: query |
|
1201
|
required: false |
|
1202
|
schema: |
|
1203
|
oneOf: |
|
1204
|
- type: string |
|
1205
|
title: customer_id |
|
1206
|
description: The draft order's customer id. |
|
1207
|
- type: array |
|
1208
|
description: The draft order's customer id. |
|
1209
|
items: |
|
1210
|
type: string |
|
1211
|
title: customer_id |
|
1212
|
description: The customer id's details. |
|
1213
|
- name: with_deleted |
|
1214
|
in: query |
|
1215
|
description: Whether to include deleted records in the result. |
|
1216
|
required: false |
|
1217
|
schema: |
|
1218
|
type: boolean |
|
1219
|
title: with_deleted |
|
1220
|
description: Whether to include deleted records in the result. |
|
1221
|
security: |
|
1222
|
- api_token: [] |
|
1223
|
- cookie_auth: [] |
|
1224
|
- jwt_token: [] |
|
1225
|
x-codeSamples: |
|
1226
|
- lang: JavaScript |
|
1227
|
label: JS SDK |
|
1228
|
source: |
|
1229
|
$ref: ../code_samples/JavaScript/admin_draft-orders/get.js |
|
1230
|
- lang: Shell |
|
1231
|
label: cURL |
|
1232
|
source: |
|
1233
|
$ref: ../code_samples/Shell/admin_draft-orders/get.sh |
|
1234
|
tags: |
|
1235
|
- Draft Orders |
|
1236
|
responses: |
|
1237
|
'200': |
|
1238
|
description: OK |
|
1239
|
content: |
|
1240
|
application/json: |
|
1241
|
schema: |
|
1242
|
$ref: ../components/schemas/AdminDraftOrderListResponse.yaml |
|
1243
|
'400': |
|
1244
|
$ref: ../components/responses/400_error.yaml |
|
1245
|
'401': |
|
1246
|
$ref: ../components/responses/unauthorized.yaml |
|
1247
|
'404': |
|
1248
|
$ref: ../components/responses/not_found_error.yaml |
|
1249
|
'409': |
|
1250
|
$ref: ../components/responses/invalid_state_error.yaml |
|
1251
|
'422': |
|
1252
|
$ref: ../components/responses/invalid_request_error.yaml |
|
1253
|
'500': |
|
1254
|
$ref: ../components/responses/500_error.yaml |
|
1255
|
x-workflow: getOrdersListWorkflow |
|
1256
|
x-events: [] |
|
1257
|
post: |
|
1258
|
operationId: PostDraftOrders |
|
1259
|
summary: Create Draft Order |
|
1260
|
description: >- |
|
1261
|
Create a draft order. This creates an order with the `is_draft_order` |
|
1262
|
property enabled. You can later convert the draft order to an order. |
|
1263
|
x-authenticated: true |
|
1264
|
parameters: |
|
1265
|
- name: fields |
|
1266
|
in: query |
|
1267
|
description: >- |
|
1268
|
Comma-separated fields that should be included in the returned data. if |
|
1269
|
a field is prefixed with `+` it will be added to the default fields, |
|
1270
|
using `-` will remove it from the default fields. without prefix it will |
|
1271
|
replace the entire default fields. |
|
1272
|
required: false |
|
1273
|
schema: |
|
1274
|
type: string |
|
1275
|
title: fields |
|
1276
|
description: >- |
|
1277
|
Comma-separated fields that should be included in the returned data. |
|
1278
|
if a field is prefixed with `+` it will be added to the default |
|
1279
|
fields, using `-` will remove it from the default fields. without |
|
1280
|
prefix it will replace the entire default fields. |
|
1281
|
externalDocs: |
|
1282
|
url: '#select-fields-and-relations' |
|
1283
|
security: |
|
1284
|
- api_token: [] |
|
1285
|
- cookie_auth: [] |
|
1286
|
- jwt_token: [] |
|
1287
|
requestBody: |
|
1288
|
content: |
|
1289
|
application/json: |
|
1290
|
schema: |
|
1291
|
allOf: |
|
1292
|
- type: object |
|
1293
|
description: The draft order's details. |
|
1294
|
required: |
|
1295
|
- sales_channel_id |
|
1296
|
- email |
|
1297
|
- customer_id |
|
1298
|
- region_id |
|
1299
|
- currency_code |
|
1300
|
- shipping_methods |
|
1301
|
- metadata |
|
1302
|
properties: |
|
1303
|
status: |
|
1304
|
type: string |
|
1305
|
title: status |
|
1306
|
description: The draft order's status. |
|
1307
|
enum: |
|
1308
|
- completed |
|
1309
|
sales_channel_id: |
|
1310
|
type: string |
|
1311
|
title: sales_channel_id |
|
1312
|
description: The ID of the associated sales channel. |
|
1313
|
email: |
|
1314
|
type: string |
|
1315
|
title: email |
|
1316
|
description: The email of the draft order's customer. |
|
1317
|
format: email |
|
1318
|
customer_id: |
|
1319
|
type: string |
|
1320
|
title: customer_id |
|
1321
|
description: The ID of the draft order's customer. |
|
1322
|
billing_address: |
|
1323
|
type: object |
|
1324
|
description: The billing address's details. |
|
1325
|
required: |
|
1326
|
- first_name |
|
1327
|
- last_name |
|
1328
|
- phone |
|
1329
|
- company |
|
1330
|
- address_1 |
|
1331
|
- address_2 |
|
1332
|
- city |
|
1333
|
- country_code |
|
1334
|
- province |
|
1335
|
- postal_code |
|
1336
|
- metadata |
|
1337
|
properties: |
|
1338
|
first_name: |
|
1339
|
type: string |
|
1340
|
title: first_name |
|
1341
|
description: The billing address's first name. |
|
1342
|
last_name: |
|
1343
|
type: string |
|
1344
|
title: last_name |
|
1345
|
description: The billing address's last name. |
|
1346
|
phone: |
|
1347
|
type: string |
|
1348
|
title: phone |
|
1349
|
description: The billing address's phone. |
|
1350
|
company: |
|
1351
|
type: string |
|
1352
|
title: company |
|
1353
|
description: The billing address's company. |
|
1354
|
address_1: |
|
1355
|
type: string |
|
1356
|
title: address_1 |
|
1357
|
description: The billing address's first line. |
|
1358
|
address_2: |
|
1359
|
type: string |
|
1360
|
title: address_2 |
|
1361
|
description: The billing address's second line. |
|
1362
|
city: |
|
1363
|
type: string |
|
1364
|
title: city |
|
1365
|
description: The billing address's city. |
|
1366
|
country_code: |
|
1367
|
type: string |
|
1368
|
title: country_code |
|
1369
|
description: The billing address's country code. |
|
1370
|
province: |
|
1371
|
type: string |
|
1372
|
title: province |
|
1373
|
description: >- |
|
1374
|
The billing address's ISO 3166-2 province code. Must be |
|
1375
|
lower-case. |
|
1376
|
example: us-ca |
|
1377
|
externalDocs: |
|
1378
|
url: https://en.wikipedia.org/wiki/ISO_3166-2 |
|
1379
|
description: Learn more about ISO 3166-2 |
|
1380
|
postal_code: |
|
1381
|
type: string |
|
1382
|
title: postal_code |
|
1383
|
description: The billing address's postal code. |
|
1384
|
metadata: |
|
1385
|
type: object |
|
1386
|
description: The billing address's metadata. |
|
1387
|
shipping_address: |
|
1388
|
type: object |
|
1389
|
description: The draft order's shipping address. |
|
1390
|
required: |
|
1391
|
- first_name |
|
1392
|
- last_name |
|
1393
|
- phone |
|
1394
|
- company |
|
1395
|
- address_1 |
|
1396
|
- address_2 |
|
1397
|
- city |
|
1398
|
- country_code |
|
1399
|
- province |
|
1400
|
- postal_code |
|
1401
|
- metadata |
|
1402
|
properties: |
|
1403
|
first_name: |
|
1404
|
type: string |
|
1405
|
title: first_name |
|
1406
|
description: The shipping address's first name. |
|
1407
|
last_name: |
|
1408
|
type: string |
|
1409
|
title: last_name |
|
1410
|
description: The shipping address's last name. |
|
1411
|
phone: |
|
1412
|
type: string |
|
1413
|
title: phone |
|
1414
|
description: The shipping address's phone. |
|
1415
|
company: |
|
1416
|
type: string |
|
1417
|
title: company |
|
1418
|
description: The shipping address's company. |
|
1419
|
address_1: |
|
1420
|
type: string |
|
1421
|
title: address_1 |
|
1422
|
description: The shipping address's first line. |
|
1423
|
address_2: |
|
1424
|
type: string |
|
1425
|
title: address_2 |
|
1426
|
description: The shipping address's second line. |
|
1427
|
city: |
|
1428
|
type: string |
|
1429
|
title: city |
|
1430
|
description: The shipping address's city. |
|
1431
|
country_code: |
|
1432
|
type: string |
|
1433
|
title: country_code |
|
1434
|
description: The shipping address's country code. |
|
1435
|
province: |
|
1436
|
type: string |
|
1437
|
title: province |
|
1438
|
description: >- |
|
1439
|
The shipping address's ISO 3166-2 province code. Must be |
|
1440
|
lower-case. |
|
1441
|
example: us-ca |
|
1442
|
externalDocs: |
|
1443
|
url: https://en.wikipedia.org/wiki/ISO_3166-2 |
|
1444
|
description: Learn more about ISO 3166-2 |
|
1445
|
postal_code: |
|
1446
|
type: string |
|
1447
|
title: postal_code |
|
1448
|
description: The shipping address's postal code. |
|
1449
|
metadata: |
|
1450
|
type: object |
|
1451
|
description: The shipping address's metadata. |
|
1452
|
items: |
|
1453
|
type: array |
|
1454
|
description: The draft order's items. |
|
1455
|
items: |
|
1456
|
type: object |
|
1457
|
description: The item's details. |
|
1458
|
required: |
|
1459
|
- title |
|
1460
|
- sku |
|
1461
|
- barcode |
|
1462
|
- variant_id |
|
1463
|
- unit_price |
|
1464
|
- quantity |
|
1465
|
- metadata |
|
1466
|
properties: |
|
1467
|
title: |
|
1468
|
type: string |
|
1469
|
title: title |
|
1470
|
description: The item's title. |
|
1471
|
sku: |
|
1472
|
type: string |
|
1473
|
title: sku |
|
1474
|
description: The item's SKU. |
|
1475
|
barcode: |
|
1476
|
type: string |
|
1477
|
title: barcode |
|
1478
|
description: The item's barcode. |
|
1479
|
variant_id: |
|
1480
|
type: string |
|
1481
|
title: variant_id |
|
1482
|
description: The ID of the associated product variant. |
|
1483
|
unit_price: |
|
1484
|
oneOf: |
|
1485
|
- type: string |
|
1486
|
title: unit_price |
|
1487
|
description: The item's unit price. |
|
1488
|
- type: number |
|
1489
|
title: unit_price |
|
1490
|
description: The item's unit price. |
|
1491
|
- type: object |
|
1492
|
description: The item's unit price. |
|
1493
|
required: |
|
1494
|
- value |
|
1495
|
- precision |
|
1496
|
properties: |
|
1497
|
value: |
|
1498
|
type: string |
|
1499
|
title: value |
|
1500
|
description: The unit price's value. |
|
1501
|
precision: |
|
1502
|
type: number |
|
1503
|
title: precision |
|
1504
|
description: The unit price's rounding precision. |
|
1505
|
quantity: |
|
1506
|
type: number |
|
1507
|
title: quantity |
|
1508
|
description: The item's ordered quantity. |
|
1509
|
metadata: |
|
1510
|
type: object |
|
1511
|
description: The item's metadata. |
|
1512
|
region_id: |
|
1513
|
type: string |
|
1514
|
title: region_id |
|
1515
|
description: The ID of the associated region. |
|
1516
|
promo_codes: |
|
1517
|
type: array |
|
1518
|
description: The promotion codes applied on the draft order. |
|
1519
|
items: |
|
1520
|
type: string |
|
1521
|
title: promo_codes |
|
1522
|
description: A promotion code. |
|
1523
|
currency_code: |
|
1524
|
type: string |
|
1525
|
title: currency_code |
|
1526
|
description: The draft order's currency code. |
|
1527
|
no_notification_order: |
|
1528
|
type: boolean |
|
1529
|
title: no_notification_order |
|
1530
|
description: Whether to send the customer notifications on order changes. |
|
1531
|
shipping_methods: |
|
1532
|
type: array |
|
1533
|
description: The draft order's shipping methods. |
|
1534
|
items: |
|
1535
|
type: object |
|
1536
|
description: The shipping method's details. |
|
1537
|
required: |
|
1538
|
- name |
|
1539
|
- option_id |
|
1540
|
- amount |
|
1541
|
properties: |
|
1542
|
shipping_method_id: |
|
1543
|
type: string |
|
1544
|
title: shipping_method_id |
|
1545
|
description: The ID of an existing shipping method. |
|
1546
|
name: |
|
1547
|
type: string |
|
1548
|
title: name |
|
1549
|
description: The shipping method's name. |
|
1550
|
option_id: |
|
1551
|
type: string |
|
1552
|
title: option_id |
|
1553
|
description: >- |
|
1554
|
The ID of the shipping option this method is created |
|
1555
|
from. |
|
1556
|
data: |
|
1557
|
type: object |
|
1558
|
description: >- |
|
1559
|
The shipping method's data, useful for fulfillment |
|
1560
|
providers. |
|
1561
|
externalDocs: |
|
1562
|
url: >- |
|
1563
|
https://docs.medusajs.com/resources/commerce-modules/order/concepts#data-property |
|
1564
|
amount: |
|
1565
|
oneOf: |
|
1566
|
- type: string |
|
1567
|
title: amount |
|
1568
|
description: The shipping method's amount. |
|
1569
|
- type: number |
|
1570
|
title: amount |
|
1571
|
description: The shipping method's amount. |
|
1572
|
- type: object |
|
1573
|
description: The shipping method's amount. |
|
1574
|
required: |
|
1575
|
- value |
|
1576
|
- precision |
|
1577
|
properties: |
|
1578
|
value: |
|
1579
|
type: string |
|
1580
|
title: value |
|
1581
|
description: The amount's value. |
|
1582
|
precision: |
|
1583
|
type: number |
|
1584
|
title: precision |
|
1585
|
description: The amount's rounding precision. |
|
1586
|
metadata: |
|
1587
|
type: object |
|
1588
|
description: The draft order's metadata. |
|
1589
|
- type: object |
|
1590
|
description: The draft order's details. |
|
1591
|
properties: |
|
1592
|
additional_data: |
|
1593
|
type: object |
|
1594
|
description: >- |
|
1595
|
Pass additional custom data to the API route. This data is |
|
1596
|
passed to the underlying workflow under the |
|
1597
|
`additional_data` parameter. |
|
1598
|
description: The draft order's details. |
|
1599
|
x-codeSamples: |
|
1600
|
- lang: JavaScript |
|
1601
|
label: JS SDK |
|
1602
|
source: |
|
1603
|
$ref: ../code_samples/JavaScript/admin_draft-orders/post.js |
|
1604
|
- lang: Shell |
|
1605
|
label: cURL |
|
1606
|
source: |
|
1607
|
$ref: ../code_samples/Shell/admin_draft-orders/post.sh |
|
1608
|
tags: |
|
1609
|
- Draft Orders |
|
1610
|
responses: |
|
1611
|
'200': |
|
1612
|
description: OK |
|
1613
|
content: |
|
1614
|
application/json: |
|
1615
|
schema: |
|
1616
|
$ref: ../components/schemas/AdminDraftOrderResponse.yaml |
|
1617
|
'400': |
|
1618
|
$ref: ../components/responses/400_error.yaml |
|
1619
|
'401': |
|
1620
|
$ref: ../components/responses/unauthorized.yaml |
|
1621
|
'404': |
|
1622
|
$ref: ../components/responses/not_found_error.yaml |
|
1623
|
'409': |
|
1624
|
$ref: ../components/responses/invalid_state_error.yaml |
|
1625
|
'422': |
|
1626
|
$ref: ../components/responses/invalid_request_error.yaml |
|
1627
|
'500': |
|
1628
|
$ref: ../components/responses/500_error.yaml |
|
1629
|
x-workflow: createOrderWorkflow |
|
1630
|
x-events: [] |