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