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