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