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