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