curl --location --request GET 'https://demo.myshopify.com//admin/api//draft_orders/.json'
customer
resource, seeshipping_address
is optional and will not be available on orders that don't require shipping. The shipping_address
resource has the following properties:billing_address
resource has the following properties:name
and value
keys.line_item
.line_item
resource has the following properties:true
indicates a custom line item.false
indicates a product variant line item.null
for a custom line item.Custom
for custom line items created via the API.true
or false
.manual
or the name of the provider, for example amazon, shipwire. Defaults to manual
for custom line items.applied_discount
property.true
or false.
issued_at
and due_in_days
or a customized fixed date if the type is fixed.shipping_line
resource has the following properties:source_name
value in your request.tags: "tag1","tag2","tag3"
.false
,taxable
field for each line_item
.tax_exempt
field instead.tax_lines
resource has the following properties:applied_discount
resource and each draft order line item can have its own applied_discount
.applied_discount
resource has the following properties:fixed_amount
, then it corresponds to a fixed dollar amount. If the type is percentage
, then it corresponds to percentage.percentage
, fixed_amount
.value_type
. For more information, see Applying discounts.true
or false
.The status of a draft order as it transitions into an order. When a draft order is created it is set to open
status.
The invoice can then be sent to the customer, and status
changes to invoice_sent
.
The draft order can then be paid, set to pending, or paid by credit card. In each case, the draft order is set to completed
and an order is created.
After a draft order is set to completed
the only further modifications that can be made are adding tags or metafields.
Valid values:
{
"draft_order": {
"id": 994118539,
"note": "rush order",
"email": "bob.norman@mail.example.com",
"taxes_included": false,
"currency": "USD",
"invoice_sent_at": null,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D2",
"status": "open",
"line_items": [
{
"id": 994118539,
"variant_id": 39072856,
"product_id": 632910392,
"title": "IPod Nano - 8gb",
"variant_title": "green",
"sku": "IPOD2008GREEN",
"vendor": null,
"quantity": 1,
"requires_shipping": false,
"taxable": true,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 567,
"tax_lines": [],
"applied_discount": null,
"name": "IPod Nano - 8gb - green",
"properties": [],
"custom": false,
"price": "199.00",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/994118539"
}
],
"shipping_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"billing_address": {
"first_name": "Bob",
"address1": "Chestnut Street 92",
"phone": "+1(502)-459-2181",
"city": "Louisville",
"zip": "40202",
"province": "Kentucky",
"country": "United States",
"last_name": "Norman",
"address2": "",
"company": null,
"latitude": 45.41634,
"longitude": -75.6868,
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"invoice_url": "https://jsmith.myshopify.com/548380009/invoices/ba8dcf6c022ccad3d47e3909e378e33f",
"applied_discount": {
"description": "$5promo",
"value": "5.0",
"title": null,
"amount": "5.00",
"value_type": "fixed_amount"
},
"order_id": null,
"shipping_line": {
"title": "UPS Ground",
"custom": false,
"handle": "ups-3-12.25",
"price": "12.25"
},
"tax_lines": [],
"tags": "Wholesale",
"note_attributes": [],
"total_price": "206.25",
"subtotal_price": "194.00",
"total_tax": "0.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/994118539",
"customer": {
"id": 207119551,
"email": "bob.norman@mail.example.com",
"accepts_marketing": false,
"created_at": "2023-01-03T12:56:35-05:00",
"updated_at": "2023-01-03T12:56:35-05:00",
"first_name": "Bob",
"last_name": "Norman",
"orders_count": 1,
"state": "disabled",
"total_spent": "199.65",
"last_order_id": 450789469,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "",
"last_order_name": "#1001",
"currency": "USD",
"phone": "+16136120707",
"accepts_marketing_updated_at": "2005-06-12T11:57:11-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"email_marketing_consent": {
"state": "not_subscribed",
"opt_in_level": null,
"consent_updated_at": "2004-06-13T11:57:11-04:00"
},
"sms_marketing_consent": {
"state": "not_subscribed",
"opt_in_level": "single_opt_in",
"consent_updated_at": "2023-01-03T12:56:35-05:00",
"consent_collected_from": "OTHER"
},
"admin_graphql_api_id": "gid://shopify/Customer/207119551",
"default_address": {
"id": 207119551,
"customer_id": 207119551,
"first_name": null,
"last_name": null,
"company": null,
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"province": "Kentucky",
"country": "United States",
"zip": "40202",
"phone": "555-625-1199",
"name": "",
"province_code": "KY",
"country_code": "US",
"country_name": "United States",
"default": true
}
}
}
}