|
1
|
type: object |
|
2
|
description: The order's details. |
|
3
|
x-schemaName: StoreOrder |
|
4
|
required: |
|
5
|
- items |
|
6
|
- shipping_methods |
|
7
|
- id |
|
8
|
- region_id |
|
9
|
- customer_id |
|
10
|
- sales_channel_id |
|
11
|
- email |
|
12
|
- currency_code |
|
13
|
- status |
|
14
|
- payment_status |
|
15
|
- fulfillment_status |
|
16
|
- summary |
|
17
|
- created_at |
|
18
|
- updated_at |
|
19
|
- original_item_total |
|
20
|
- original_item_subtotal |
|
21
|
- original_item_tax_total |
|
22
|
- item_total |
|
23
|
- item_subtotal |
|
24
|
- item_tax_total |
|
25
|
- item_discount_total |
|
26
|
- original_total |
|
27
|
- original_subtotal |
|
28
|
- original_tax_total |
|
29
|
- total |
|
30
|
- subtotal |
|
31
|
- tax_total |
|
32
|
- discount_total |
|
33
|
- discount_tax_total |
|
34
|
- gift_card_total |
|
35
|
- gift_card_tax_total |
|
36
|
- shipping_total |
|
37
|
- shipping_subtotal |
|
38
|
- shipping_tax_total |
|
39
|
- shipping_discount_total |
|
40
|
- original_shipping_total |
|
41
|
- original_shipping_subtotal |
|
42
|
- original_shipping_tax_total |
|
43
|
- credit_line_total |
|
44
|
properties: |
|
45
|
id: |
|
46
|
type: string |
|
47
|
title: id |
|
48
|
description: The order's ID. |
|
49
|
region_id: |
|
50
|
type: string |
|
51
|
title: region_id |
|
52
|
description: The ID of the associated region. |
|
53
|
customer_id: |
|
54
|
type: string |
|
55
|
title: customer_id |
|
56
|
description: The ID of the customer that placed the order. |
|
57
|
sales_channel_id: |
|
58
|
type: string |
|
59
|
title: sales_channel_id |
|
60
|
description: The ID of the sales channel the order was placed in. |
|
61
|
email: |
|
62
|
type: string |
|
63
|
title: email |
|
64
|
description: The email of the customer that placed the order. |
|
65
|
format: email |
|
66
|
currency_code: |
|
67
|
type: string |
|
68
|
title: currency_code |
|
69
|
description: The order's currency code. |
|
70
|
example: usd |
|
71
|
display_id: |
|
72
|
type: number |
|
73
|
title: display_id |
|
74
|
description: The order's display ID. |
|
75
|
shipping_address: |
|
76
|
$ref: ./StoreOrderAddress.yaml |
|
77
|
billing_address: |
|
78
|
$ref: ./StoreOrderAddress.yaml |
|
79
|
items: |
|
80
|
type: array |
|
81
|
description: The order's items. |
|
82
|
items: |
|
83
|
$ref: ./StoreOrderLineItem.yaml |
|
84
|
shipping_methods: |
|
85
|
type: array |
|
86
|
description: The order's shipping methods. |
|
87
|
items: |
|
88
|
$ref: ./StoreOrderShippingMethod.yaml |
|
89
|
payment_collections: |
|
90
|
type: array |
|
91
|
description: The order's payment collections. |
|
92
|
items: |
|
93
|
$ref: ./StorePaymentCollection.yaml |
|
94
|
payment_status: |
|
95
|
type: string |
|
96
|
description: The order's payment status. |
|
97
|
enum: |
|
98
|
- canceled |
|
99
|
- not_paid |
|
100
|
- awaiting |
|
101
|
- authorized |
|
102
|
- partially_authorized |
|
103
|
- captured |
|
104
|
- partially_captured |
|
105
|
- partially_refunded |
|
106
|
- refunded |
|
107
|
- requires_action |
|
108
|
fulfillments: |
|
109
|
type: array |
|
110
|
description: The order's fulfillments. |
|
111
|
items: |
|
112
|
$ref: ./StoreOrderFulfillment.yaml |
|
113
|
fulfillment_status: |
|
114
|
type: string |
|
115
|
description: The order's fulfillment status. |
|
116
|
enum: |
|
117
|
- canceled |
|
118
|
- not_fulfilled |
|
119
|
- partially_fulfilled |
|
120
|
- fulfilled |
|
121
|
- partially_shipped |
|
122
|
- shipped |
|
123
|
- partially_delivered |
|
124
|
- delivered |
|
125
|
summary: |
|
126
|
$ref: ./BaseOrderSummary.yaml |
|
127
|
metadata: |
|
128
|
type: object |
|
129
|
description: The order's metadata, can hold custom key-value pairs. |
|
130
|
externalDocs: |
|
131
|
url: https://docs.medusajs.com/api/store#manage-metadata |
|
132
|
description: Learn how to manage metadata |
|
133
|
created_at: |
|
134
|
type: string |
|
135
|
format: date-time |
|
136
|
title: created_at |
|
137
|
description: The date the order was created. |
|
138
|
updated_at: |
|
139
|
type: string |
|
140
|
format: date-time |
|
141
|
title: updated_at |
|
142
|
description: The date the order was updated. |
|
143
|
original_item_total: |
|
144
|
type: number |
|
145
|
title: original_item_total |
|
146
|
description: >- |
|
147
|
The sum of all line items' original totals before discounts, including |
|
148
|
taxes. |
|
149
|
original_item_subtotal: |
|
150
|
type: number |
|
151
|
title: original_item_subtotal |
|
152
|
description: >- |
|
153
|
The sum of all line items' original subtotals before discounts, excluding |
|
154
|
taxes. |
|
155
|
original_item_tax_total: |
|
156
|
type: number |
|
157
|
title: original_item_tax_total |
|
158
|
description: The sum of all line items' original tax totals before discounts. |
|
159
|
item_total: |
|
160
|
type: number |
|
161
|
title: item_total |
|
162
|
description: The sum of all line items' totals after discounts, including taxes. |
|
163
|
item_subtotal: |
|
164
|
type: number |
|
165
|
title: item_subtotal |
|
166
|
description: The sum of all line items' subtotals before discounts, excluding taxes. |
|
167
|
item_tax_total: |
|
168
|
type: number |
|
169
|
title: item_tax_total |
|
170
|
description: The sum of all line items' tax totals after discounts. |
|
171
|
original_total: |
|
172
|
type: number |
|
173
|
title: original_total |
|
174
|
description: >- |
|
175
|
The order's total before discounts, including taxes. Calculated as the sum |
|
176
|
of `original_item_total` and `original_shipping_total`. |
|
177
|
original_subtotal: |
|
178
|
type: number |
|
179
|
title: original_subtotal |
|
180
|
description: >- |
|
181
|
The order's subtotal before discounts, excluding taxes. Calculated as the |
|
182
|
sum of `original_item_subtotal` and `original_shipping_subtotal`. |
|
183
|
original_tax_total: |
|
184
|
type: number |
|
185
|
title: original_tax_total |
|
186
|
description: >- |
|
187
|
The order's tax total before discounts. Calculated as the sum of |
|
188
|
`original_item_tax_total` and `original_shipping_tax_total`. |
|
189
|
total: |
|
190
|
type: number |
|
191
|
title: total |
|
192
|
description: The order's final total after discounts and credit lines, including taxes. |
|
193
|
subtotal: |
|
194
|
type: number |
|
195
|
title: subtotal |
|
196
|
description: >- |
|
197
|
The order's subtotal before discounts, excluding taxes. Calculated as the |
|
198
|
sum of `item_subtotal` and `shipping_subtotal`. |
|
199
|
tax_total: |
|
200
|
type: number |
|
201
|
title: tax_total |
|
202
|
description: >- |
|
203
|
The order's tax total after discounts. Calculated as the sum of |
|
204
|
`item_tax_total` and `shipping_tax_total`. |
|
205
|
discount_total: |
|
206
|
type: number |
|
207
|
title: discount_total |
|
208
|
description: >- |
|
209
|
The total amount of discounts applied to the order, including the tax |
|
210
|
portion of discounts. |
|
211
|
discount_tax_total: |
|
212
|
type: number |
|
213
|
title: discount_tax_total |
|
214
|
description: >- |
|
215
|
The total amount of discounts applied to the order's tax. Represents the |
|
216
|
tax portion of discounts. |
|
217
|
gift_card_total: |
|
218
|
type: number |
|
219
|
title: gift_card_total |
|
220
|
description: The order's gift card total. |
|
221
|
gift_card_tax_total: |
|
222
|
type: number |
|
223
|
title: gift_card_tax_total |
|
224
|
description: The total taxes applied on the gift card's amount. |
|
225
|
shipping_total: |
|
226
|
type: number |
|
227
|
title: shipping_total |
|
228
|
description: The sum of all shipping methods' totals after discounts, including taxes. |
|
229
|
shipping_subtotal: |
|
230
|
type: number |
|
231
|
title: shipping_subtotal |
|
232
|
description: >- |
|
233
|
The sum of all shipping methods' subtotals before discounts, excluding |
|
234
|
taxes. |
|
235
|
shipping_tax_total: |
|
236
|
type: number |
|
237
|
title: shipping_tax_total |
|
238
|
description: The sum of all shipping methods' tax totals after discounts. |
|
239
|
original_shipping_total: |
|
240
|
type: number |
|
241
|
title: original_shipping_total |
|
242
|
description: >- |
|
243
|
The sum of all shipping methods' original totals before discounts, |
|
244
|
including taxes. |
|
245
|
original_shipping_subtotal: |
|
246
|
type: number |
|
247
|
title: original_shipping_subtotal |
|
248
|
description: >- |
|
249
|
The sum of all shipping methods' original subtotals before discounts, |
|
250
|
excluding taxes. |
|
251
|
original_shipping_tax_total: |
|
252
|
type: number |
|
253
|
title: original_shipping_tax_total |
|
254
|
description: The sum of all shipping methods' original tax totals before discounts. |
|
255
|
customer: |
|
256
|
$ref: ./StoreCustomer.yaml |
|
257
|
transactions: |
|
258
|
type: array |
|
259
|
description: The order's transactions. |
|
260
|
items: |
|
261
|
$ref: ./BaseOrderTransaction.yaml |
|
262
|
status: |
|
263
|
type: string |
|
264
|
title: status |
|
265
|
description: The order's status. |
|
266
|
credit_line_total: |
|
267
|
type: number |
|
268
|
title: credit_line_total |
|
269
|
description: >- |
|
270
|
The total amount of credit lines applied to the order, including taxes. |
|
271
|
Subtracted from the final total. |
|
272
|
item_discount_total: |
|
273
|
type: number |
|
274
|
title: item_discount_total |
|
275
|
description: >- |
|
276
|
The sum of all discounts applied to line items, including the tax portion |
|
277
|
of discounts. |
|
278
|
shipping_discount_total: |
|
279
|
type: number |
|
280
|
title: shipping_discount_total |
|
281
|
description: >- |
|
282
|
The sum of all discounts applied to shipping methods, including the tax |
|
283
|
portion of discounts. |
|
284
|
custom_display_id: |
|
285
|
type: string |
|
286
|
title: custom_display_id |
|
287
|
description: The custom display ID of the order. |
|
288
|
externalDocs: |
|
289
|
url: >- |
|
290
|
https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id |