The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Requires draft_orders access scope.

Requires access to protected customer data.

Merchants can use draft orders to create orders on behalf of their customers. Draft orders are useful for merchants that need to do the following tasks:

  • Create new orders for sales made by phone, in person, by chat, or elsewhere. When a merchant accepts payment for a draft order, an order is created.
  • Send invoices to customers to pay with a secure checkout link.
  • Use custom items to represent additional costs or products that aren't displayed in a shop's inventory.
  • Re-create orders manually from active sales channels.
  • Sell products at discount or wholesale rates.
  • Take pre-orders.
  • Save an order as a draft and resume working on it later.

Note

The Draft Order resource doesn't expose reserve inventory information.

Caution: Only use this data if it is necessary for the intended app functionality. Shopify retains the ability to restrict access to API Access scopes for apps not requiring legitimate use of the associated data.

Was this section helpful?

Properties

id
read-only
->id
The ID of the draft order.

order_id
read-only
->id
The ID of the order that's created and associated with the draft order after the draft order is completed.

name
read-only
Name of the draft order.

customer

The customer resource, which contains information about the customer. Learn more about loading and removing customers. For more information about the customer resource, see the Customer documentation.


shipping_address
The address to ship the order to. The shipping_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
The mailing address associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method. The billing_address resource has the following properties:

note
The text of an optional note that a merchant can attach to the draft order.

note_attributes
The extra information that's added to the order. The information appears in theAdditional details section of an order details page. Each array entry must contain a hash with name and value keys.

email
The customer's email address.

currency
read-only
The three letter code (ISO 4217 format) for the currency used for the payment.

invoice_sent_at
read-only
The date and time (ISO 8601 format) when the invoice was emailed to the customer.

invoice_url
read-only
The URL for the invoice.

Was this section helpful?
{}The DraftOrder resource
{
  "id": 450789469,
  "order_id": {
    "id": 456789101
  },
  "name": "#1001",
  "customer": {
    "id": 207119551,
    "email": "bob.norman@mail.example.com",
    "accepts_marketing": false,
    "created_at": "2012-03-13T16:09:55-04:00",
    "updated_at": "2012-03-13T16:09:55-04:00",
    "first_name": "Bob",
    "last_name": "Norman",
    "orders_count": "1",
    "state": "disabled",
    "total_spent": "0.00",
    "last_order_id": 450789469,
    "note": null,
    "verified_email": true,
    "multipass_identifier": null,
    "tax_exempt": false,
    "tax_exemptions": {},
    "phone": "+13125551212",
    "tags": "loyal",
    "last_order_name": "#1001",
    "currency": "USD",
    "addresses": {},
    "admin_graphql_api_id": "gid://shopify/Customer/207119551",
    "default_address": {}
  },
  "shipping_address": {
    "address1": "123 Amoebobacterieae St",
    "address2": "",
    "city": "Ottawa",
    "company": null,
    "country": "Canada",
    "first_name": "Bob",
    "last_name": "Bobsen",
    "latitude": "45.41634",
    "longitude": "-75.6868",
    "phone": "555-625-1199",
    "province": "Ontario",
    "zip": "K2P0V6",
    "name": "Bob Bobsen",
    "country_code": "CA",
    "province_code": "ON"
  },
  "billing_address": {
    "address1": "123 Amoebobacterieae St",
    "address2": "",
    "city": "Ottawa",
    "company": null,
    "country": "US",
    "first_name": null,
    "id": 207119551,
    "last_name": null,
    "phone": "(555)555-5555",
    "province": "KY",
    "zip": "40202",
    "name": null,
    "province_code": null,
    "country_code": null,
    "default": true
  },
  "note": null,
  "note_attributes": [
    {
      "name": "custom name",
      "value": "custom value"
    }
  ],
  "email": "bob.norman@example.com",
  "currency": "USD",
  "invoice_sent_at": "2008-01-10T11:00:00-05:00",
  "invoice_url": "https://www.example.com/14376108/checkouts/91a9b3f92d7d42e57268eff5ebd570df",
  "line_items": {
    "custom": false,
    "fulfillable_quantity": 1,
    "fulfillment_service": "amazon",
    "grams": 500,
    "id": 669751112,
    "price": "199.99",
    "product_id": 7513594,
    "quantity": 1,
    "requires_shipping": true,
    "sku": "IPOD-342-N",
    "title": "IPod Nano",
    "variant_id": 4264112,
    "variant_title": "Pink",
    "vendor": "Apple",
    "name": "IPod Nano - Pink",
    "gift_card": false,
    "properties": [
      {
        "name": "custom engraving",
        "value": "Happy Birthday Mom!"
      }
    ],
    "taxable": true,
    "tax_lines": [
      {
        "title": "title of tax line",
        "rate": "10",
        "price": "18"
      }
    ],
    "applied_discount": {
      "title": "title of the discount",
      "description": "Description of discount!",
      "value": "10",
      "value_type": "percentage",
      "amount": "19.99"
    }
  },
  "payment_terms": {
    "amount": 70,
    "currency": "CAD",
    "payment_terms_name": "NET_30",
    "payment_terms_type": "NET",
    "due_in_days": 30,
    "payment_schedules": [
      {
        "amount": 70,
        "currency": "CAD",
        "issued_at": "2020-07-29T13:02:43-04:00",
        "due_at": "2020-08-29T13:02:43-04:00",
        "completed_at": "null",
        "expected_payment_method": "shopify_payments"
      }
    ]
  },
  "shipping_line": {
    "handle": "shopify-Standard%20Shipping-8.00",
    "price": 0,
    "title": "Free Shipping"
  },
  "source_name": "instagram",
  "tags": "tagsational",
  "tax_exempt": false,
  "tax_exemptions": [
    "CA_STATUS_CARD_EXEMPTION",
    "CA_BC_RESELLER_EXEMPTION"
  ],
  "tax_lines": [
    {
      "price": 11.94,
      "rate": 0.06,
      "title": "State Tax"
    }
  ],
  "applied_discount": {
    "title": "Title of the discount",
    "description": "Description",
    "value": "10",
    "value_type": "fixed_amount",
    "amount": "10"
  },
  "taxes_included": false,
  "total_tax": "11.94",
  "subtotal_price": "398.00",
  "total_price": "409.94",
  "completed_at": "2012-08-24T14:02:15-04:00",
  "created_at": "2008-01-10T11:00:00-05:00",
  "updated_at": "2012-08-24T14:02:15-04:00",
  "status": "authorized"
}

Creates a draft order.

Using the DraftOrder resource you can create orders in draft state using product variant line items, or custom line items. To create a product variant draft order, provide the variant_id, quantity and discount properties. To create a custom line item, provide the title, price, taxable, and quantity properties.

Polling

When you create and update draft orders some calculations are done asynchronously, such as calculating shipping and taxes. There might be times when a draft order is created but these calculations haven't completed. In these cases, you need to poll the draft order until the calculations are finished. When a draft order requires polling, a 202 accepted response code is returned along with location and retry-after response headers. The location header refers to the URL to be polled, and retry-after denotes the interval (in seconds) at which polling requests should be sent. When the draft order is ready, a 200 OK response code will be returned.

About custom shipping lines

You can use the DraftOrder resource to send orders with custom shipping lines. A custom shipping line includes a title and price with handle set to Nil. A shipping line with a carrier provided shipping rate (currently set via the Shopify admin) includes the shipping rate handle.

Applying discounts

A draft order and its line items can have one discount each. Calculations for discounts are based on the setting of the value_type property, which can be set to either fixed_amount or percentage. For example, you can apply a fixed amount discount to a draft order to reduce the price by the specified value property. When you use a percentage discount, the discount amount property is the price multiplied by the value property. For line item discounts, the value property is applied per individual unit of the item, based on the line item's quantity.

Calculating line item discount amounts

For fixed_amount discounts, the total amount corresponds to the line item quantity times the value of the discount. For percentage discounts, the total amount corresponds to the following:

amount = floor(price * quantity * value) / 100, where floor() is the usual round down function.

For non-fractional currencies, this formula needs to use round() instead of floor(), and the division by 100 takes place inside the rounding, resulting in a non-fractional value. Otherwise, an error is returned.

amount = round(price * quantity * value / 100)

Line item examples

Fixed amount discount

For a $19.99 line item with quantity of 2 and with $5 dollars off, discount amount corresponds to $10 ($5 * 2):

applied_discount: { "value_type": "fixed_amount", "value": 5, "amount": 10 }

Percentage discount

For a $19.99 line item with quantity of 2 and with 15% off, discount amount corresponds to $5.99 (floor ($19.99 * 2 * 15) / 100):

applied_discount: { "value_type": "percentage", "value": 15, "amount": 5.99 }

Loading and removing customers

You can load a customer to a draft order by sending the customer_id as part of the draft order resource. We recommend removing a customer from a draft order by making a POST request with the Customer resource set to null, without specifying an email, shipping address, or billing address. A customer can also be removed by setting customer, email, shipping_address, and billing_address to null.


api_version
string
required

customer_id
Used to load the customer. When a customer is loaded, the customer’s email address is also associated.

use_customer_default_address
boolean
default false
An optional boolean that you can send as part of a draft order resource to load customer shipping information. Valid values: true or false.

Was this section helpful?
Request body
draftorder
Learn more about accessing protected customer data
Draft_order resource
Was this section helpful?
post
/admin/api/2024-10/draft_orders.json
Copy
curl -d '{"draft_order":{"line_items":[{"title":"Custom Tee","price":"20.00","quantity":2}],"applied_discount":{"description":"Custom discount","value_type":"fixed_amount","value":"10.0","amount":"10.00","title":"Custom"},"customer":{"id":207119551},"use_customer_default_address":true}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 201 Created
{
  "draft_order": {
    "id": 1069920477,
    "note": null,
    "email": "bob.norman@mail.example.com",
    "taxes_included": false,
    "currency": "USD",
    "invoice_sent_at": null,
    "created_at": "2024-09-23T17:27:43-04:00",
    "updated_at": "2024-09-23T17:27:43-04:00",
    "tax_exempt": false,
    "completed_at": null,
    "name": "#D3",
    "status": "open",
    "line_items": [
      {
        "id": 1066630383,
        "variant_id": null,
        "product_id": null,
        "title": "Custom Tee",
        "variant_title": null,
        "sku": null,
        "vendor": null,
        "quantity": 2,
        "requires_shipping": false,
        "taxable": true,
        "gift_card": false,
        "fulfillment_service": "manual",
        "grams": 0,
        "tax_lines": [
          {
            "rate": 0.06,
            "title": "Tax",
            "price": "1.80"
          }
        ],
        "applied_discount": null,
        "name": "Custom Tee",
        "properties": [],
        "custom": true,
        "price": "20.00",
        "admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/1066630383"
      }
    ],
    "shipping_address": {
      "first_name": null,
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": null,
      "address2": "",
      "company": null,
      "latitude": null,
      "longitude": null,
      "name": "",
      "country_code": "US",
      "province_code": "KY"
    },
    "billing_address": {
      "first_name": null,
      "address1": "Chestnut Street 92",
      "phone": "555-625-1199",
      "city": "Louisville",
      "zip": "40202",
      "province": "Kentucky",
      "country": "United States",
      "last_name": null,
      "address2": "",
      "company": null,
      "latitude": null,
      "longitude": null,
      "name": "",
      "country_code": "US",
      "province_code": "KY"
    },
    "invoice_url": "https://jsmith.myshopify.com/548380009/invoices/831f1c249b77e1f767ff066cd3e62c78",
    "applied_discount": {
      "description": "Custom discount",
      "value": "10.0",
      "title": "Custom",
      "amount": "10.00",
      "value_type": "fixed_amount"
    },
    "order_id": null,
    "shipping_line": null,
    "tax_lines": [
      {
        "rate": 0.06,
        "title": "Tax",
        "price": "1.80"
      }
    ],
    "tags": "",
    "note_attributes": [],
    "total_price": "31.80",
    "subtotal_price": "30.00",
    "total_tax": "1.80",
    "payment_terms": null,
    "presentment_currency": "USD",
    "total_line_items_price_set": {
      "shop_money": {
        "amount": "40.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "40.00",
        "currency_code": "USD"
      }
    },
    "total_price_set": {
      "shop_money": {
        "amount": "31.80",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "31.80",
        "currency_code": "USD"
      }
    },
    "subtotal_price_set": {
      "shop_money": {
        "amount": "30.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "30.00",
        "currency_code": "USD"
      }
    },
    "total_tax_set": {
      "shop_money": {
        "amount": "1.80",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "1.80",
        "currency_code": "USD"
      }
    },
    "total_discounts_set": {
      "shop_money": {
        "amount": "10.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "10.00",
        "currency_code": "USD"
      }
    },
    "total_shipping_price_set": {
      "shop_money": {
        "amount": "0.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "0.00",
        "currency_code": "USD"
      }
    },
    "total_additional_fees_set": {
      "shop_money": {
        "amount": "0.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "0.00",
        "currency_code": "USD"
      }
    },
    "total_duties_set": {
      "shop_money": {
        "amount": "0.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "0.00",
        "currency_code": "USD"
      }
    },
    "admin_graphql_api_id": "gid://shopify/DraftOrder/1069920477",
    "customer": {
      "id": 207119551,
      "email": "bob.norman@mail.example.com",
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04: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": "Léon, Noël",
      "last_order_name": "#1001",
      "currency": "USD",
      "phone": "+16136120707",
      "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": "2024-09-23T17:13:16-04: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
      }
    }
  }
}

Sends an invoice for the draft order.

You can include the following parameters in the body of the request:

  • draft_order_invoice: The resource to send in the body of the request.
    • to: The email address that will populate the to field of the email.
    • from: The email address that will populate the from field of the email.
    • bcc: The list of email addresses to include in the bcc field of the email. Emails must be associated with staff accounts on the shop.
    • subject: The email subject.
    • custom_message: The custom message displayed in the email.

api_version
string
required

draft_order_id
string
required

Was this section helpful?
Path parameters
draftorderid=994118539
string
required
Was this section helpful?
post
/admin/api/2024-10/draft_orders/994118539/send_invoice.json
Copy
curl -d '{"draft_order_invoice":{"to":"first@example.com","from":"j.smith@example.com","bcc":["j.smith@example.com"],"subject":"Apple Computer Invoice","custom_message":"Thank you for ordering!"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders/994118539/send_invoice.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 201 Created
{
  "draft_order_invoice": {
    "to": "first@example.com",
    "from": "j.smith@example.com",
    "subject": "Apple Computer Invoice",
    "custom_message": "Thank you for ordering!",
    "bcc": [
      "j.smith@example.com"
    ]
  }
}

Retrieves a list of draft orders. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.

api_version
string
required

fields
A comma-separated list of fields to include in the response

fields
comma-separated list of fields to include in the response

ids
Filter by list of IDs

limit
≤ 250
default 50
Amount of results

since_id
Restrict results to after the specified ID

status
enum
default open
Filter draft orders by their status.

updated_at_max
Show orders last updated before date (format: 2014-04-25T16:15:47-04:00)

updated_at_min
Show orders last updated after date (format: 2014-04-25T16:15:47-04:00)

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/draft_orders.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "draft_orders": [
    {
      "id": 72885271,
      "note": "rush order",
      "email": "bob.norman@mail.example.com",
      "taxes_included": false,
      "currency": "USD",
      "invoice_sent_at": null,
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04:00",
      "tax_exempt": false,
      "completed_at": null,
      "name": "#D1",
      "status": "completed",
      "line_items": [
        {
          "id": 498266019,
          "variant_id": 39072856,
          "product_id": 632910392,
          "title": "IPod Nano - 8gb",
          "variant_title": "green",
          "sku": "IPOD2008GREEN",
          "vendor": null,
          "quantity": 2,
          "requires_shipping": true,
          "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/498266019"
        }
      ],
      "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/f945c7e2b158dbb69fa642cb8d79171f",
      "applied_discount": null,
      "order_id": 450789469,
      "shipping_line": null,
      "tax_lines": [],
      "tags": "",
      "note_attributes": [],
      "total_price": "431.88",
      "subtotal_price": "398.00",
      "total_tax": "23.88",
      "payment_terms": null,
      "presentment_currency": "USD",
      "total_line_items_price_set": {
        "shop_money": {
          "amount": "398.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "398.00",
          "currency_code": "USD"
        }
      },
      "total_price_set": {
        "shop_money": {
          "amount": "431.88",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "431.88",
          "currency_code": "USD"
        }
      },
      "subtotal_price_set": {
        "shop_money": {
          "amount": "398.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "398.00",
          "currency_code": "USD"
        }
      },
      "total_tax_set": {
        "shop_money": {
          "amount": "23.88",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "23.88",
          "currency_code": "USD"
        }
      },
      "total_discounts_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "USD"
        }
      },
      "total_shipping_price_set": {
        "shop_money": {
          "amount": "10.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "10.00",
          "currency_code": "USD"
        }
      },
      "total_additional_fees_set": null,
      "total_duties_set": null,
      "admin_graphql_api_id": "gid://shopify/DraftOrder/72885271",
      "customer": {
        "id": 207119551,
        "email": "bob.norman@mail.example.com",
        "created_at": "2024-09-23T17:13:16-04:00",
        "updated_at": "2024-09-23T17:13:16-04: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": "Léon, Noël",
        "last_order_name": "#1001",
        "currency": "USD",
        "phone": "+16136120707",
        "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": "2024-09-23T17:13:16-04: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
        }
      }
    },
    {
      "id": 622762746,
      "note": "rush order",
      "email": "bob.norman@mail.example.com",
      "taxes_included": false,
      "currency": "USD",
      "invoice_sent_at": null,
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04:00",
      "tax_exempt": false,
      "completed_at": null,
      "name": "#D1",
      "status": "open",
      "line_items": [
        {
          "id": 466157049,
          "variant_id": 39072856,
          "product_id": 632910392,
          "title": "IPod Nano - 8gb",
          "variant_title": "green",
          "sku": "IPOD2008GREEN",
          "vendor": null,
          "quantity": 1,
          "requires_shipping": true,
          "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/466157049"
        },
        {
          "id": 605833968,
          "variant_id": null,
          "product_id": null,
          "title": "IPod Nano Engraving",
          "variant_title": null,
          "sku": "IPODENGRAVING",
          "vendor": null,
          "quantity": 1,
          "requires_shipping": false,
          "taxable": true,
          "gift_card": false,
          "fulfillment_service": "manual",
          "grams": 0,
          "tax_lines": [],
          "applied_discount": null,
          "name": "IPod Nano Engraving",
          "properties": [],
          "custom": true,
          "price": "30.00",
          "admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/605833968"
        },
        {
          "id": 783764327,
          "variant_id": 457924702,
          "product_id": 632910392,
          "title": "IPod Nano - 8gb",
          "variant_title": "black",
          "sku": "IPOD2008BLACK",
          "vendor": null,
          "quantity": 3,
          "requires_shipping": true,
          "taxable": true,
          "gift_card": false,
          "fulfillment_service": "manual",
          "grams": 567,
          "tax_lines": [],
          "applied_discount": null,
          "name": "IPod Nano - 8gb - black",
          "properties": [],
          "custom": false,
          "price": "199.00",
          "admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/783764327"
        }
      ],
      "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/f1df1a91d10a6d7704cf2f0315461api",
      "applied_discount": null,
      "order_id": null,
      "shipping_line": {
        "title": "custom shipping",
        "custom": true,
        "handle": null,
        "price": "10.00"
      },
      "tax_lines": [],
      "tags": "",
      "note_attributes": [],
      "total_price": "885.56",
      "subtotal_price": "826.00",
      "total_tax": "49.56",
      "payment_terms": null,
      "presentment_currency": "USD",
      "total_line_items_price_set": {
        "shop_money": {
          "amount": "826.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "826.00",
          "currency_code": "USD"
        }
      },
      "total_price_set": {
        "shop_money": {
          "amount": "885.56",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "885.56",
          "currency_code": "USD"
        }
      },
      "subtotal_price_set": {
        "shop_money": {
          "amount": "826.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "826.00",
          "currency_code": "USD"
        }
      },
      "total_tax_set": {
        "shop_money": {
          "amount": "49.56",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "49.56",
          "currency_code": "USD"
        }
      },
      "total_discounts_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "USD"
        }
      },
      "total_shipping_price_set": {
        "shop_money": {
          "amount": "10.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "10.00",
          "currency_code": "USD"
        }
      },
      "total_additional_fees_set": null,
      "total_duties_set": null,
      "admin_graphql_api_id": "gid://shopify/DraftOrder/622762746",
      "customer": {
        "id": 207119551,
        "email": "bob.norman@mail.example.com",
        "created_at": "2024-09-23T17:13:16-04:00",
        "updated_at": "2024-09-23T17:13:16-04: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": "Léon, Noël",
        "last_order_name": "#1001",
        "currency": "USD",
        "phone": "+16136120707",
        "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": "2024-09-23T17:13:16-04: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
        }
      }
    },
    {
      "id": 691042898,
      "note": "rush order",
      "email": "bob.norman@mail.example.com",
      "taxes_included": false,
      "currency": "USD",
      "invoice_sent_at": "2016-12-31T19:00:00-05:00",
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04:00",
      "tax_exempt": false,
      "completed_at": "2016-12-31T19:00:00-05:00",
      "name": "#D1",
      "status": "completed",
      "line_items": [
        {
          "id": 158115779,
          "variant_id": 39072856,
          "product_id": 632910392,
          "title": "IPod Nano - 8gb",
          "variant_title": "green",
          "sku": "IPOD2008GREEN",
          "vendor": null,
          "quantity": 1,
          "requires_shipping": true,
          "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/158115779"
        }
      ],
      "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/56dd92fb7adc1a2c38402b1aab15b2f4",
      "applied_discount": null,
      "order_id": 450789469,
      "shipping_line": {
        "title": "UPS Ground",
        "custom": false,
        "handle": "e67f43adc63f6b9c7e969ba3dad33297",
        "price": "12.25"
      },
      "tax_lines": [],
      "tags": "",
      "note_attributes": [],
      "total_price": "220.94",
      "subtotal_price": "199.00",
      "total_tax": "11.94",
      "payment_terms": null,
      "presentment_currency": "USD",
      "total_line_items_price_set": {
        "shop_money": {
          "amount": "199.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "199.00",
          "currency_code": "USD"
        }
      },
      "total_price_set": {
        "shop_money": {
          "amount": "220.94",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "220.94",
          "currency_code": "USD"
        }
      },
      "subtotal_price_set": {
        "shop_money": {
          "amount": "199.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "199.00",
          "currency_code": "USD"
        }
      },
      "total_tax_set": {
        "shop_money": {
          "amount": "11.94",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "11.94",
          "currency_code": "USD"
        }
      },
      "total_discounts_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "USD"
        }
      },
      "total_shipping_price_set": {
        "shop_money": {
          "amount": "10.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "10.00",
          "currency_code": "USD"
        }
      },
      "total_additional_fees_set": null,
      "total_duties_set": null,
      "admin_graphql_api_id": "gid://shopify/DraftOrder/691042898",
      "customer": {
        "id": 207119551,
        "email": "bob.norman@mail.example.com",
        "created_at": "2024-09-23T17:13:16-04:00",
        "updated_at": "2024-09-23T17:13:16-04: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": "Léon, Noël",
        "last_order_name": "#1001",
        "currency": "USD",
        "phone": "+16136120707",
        "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": "2024-09-23T17:13:16-04: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
        }
      }
    },
    {
      "id": 994118539,
      "note": "rush order",
      "email": "bob.norman@mail.example.com",
      "taxes_included": false,
      "currency": "USD",
      "invoice_sent_at": null,
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04: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": true,
          "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": "e67f43adc63f6b9c7e969ba3dad33297",
        "price": "12.25"
      },
      "tax_lines": [],
      "tags": "Wholesale",
      "note_attributes": [],
      "total_price": "217.89",
      "subtotal_price": "194.00",
      "total_tax": "11.64",
      "payment_terms": null,
      "presentment_currency": "USD",
      "total_line_items_price_set": {
        "shop_money": {
          "amount": "199.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "199.00",
          "currency_code": "USD"
        }
      },
      "total_price_set": {
        "shop_money": {
          "amount": "217.89",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "217.89",
          "currency_code": "USD"
        }
      },
      "subtotal_price_set": {
        "shop_money": {
          "amount": "194.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "194.00",
          "currency_code": "USD"
        }
      },
      "total_tax_set": {
        "shop_money": {
          "amount": "11.64",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "11.64",
          "currency_code": "USD"
        }
      },
      "total_discounts_set": {
        "shop_money": {
          "amount": "5.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "5.00",
          "currency_code": "USD"
        }
      },
      "total_shipping_price_set": {
        "shop_money": {
          "amount": "12.25",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "12.25",
          "currency_code": "USD"
        }
      },
      "total_additional_fees_set": null,
      "total_duties_set": null,
      "admin_graphql_api_id": "gid://shopify/DraftOrder/994118539",
      "customer": {
        "id": 207119551,
        "email": "bob.norman@mail.example.com",
        "created_at": "2024-09-23T17:13:16-04:00",
        "updated_at": "2024-09-23T17:13:16-04: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": "Léon, Noël",
        "last_order_name": "#1001",
        "currency": "USD",
        "phone": "+16136120707",
        "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": "2024-09-23T17:13:16-04: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
        }
      }
    },
    {
      "id": 1012750869,
      "note": "rush order",
      "email": "bob.norman@mail.example.com",
      "taxes_included": false,
      "currency": "USD",
      "invoice_sent_at": null,
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04:00",
      "tax_exempt": false,
      "completed_at": null,
      "name": "#D2",
      "status": "open",
      "line_items": [
        {
          "id": 294997122,
          "variant_id": 39072856,
          "product_id": 632910392,
          "title": "IPod Nano - 8gb",
          "variant_title": "green",
          "sku": "IPOD2008GREEN",
          "vendor": null,
          "quantity": 1,
          "requires_shipping": true,
          "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/294997122"
        }
      ],
      "shipping_address": null,
      "billing_address": null,
      "invoice_url": "https://jsmith.myshopify.com/548380009/invoices/f1df1a91d10a6d7704cf2f0315461noaddressapi",
      "applied_discount": null,
      "order_id": null,
      "shipping_line": {
        "title": "custom shipping",
        "custom": true,
        "handle": null,
        "price": "10.00"
      },
      "tax_lines": [],
      "tags": "",
      "note_attributes": [],
      "total_price": "232.88",
      "subtotal_price": "199.00",
      "total_tax": "23.88",
      "payment_terms": null,
      "presentment_currency": "USD",
      "total_line_items_price_set": {
        "shop_money": {
          "amount": "199.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "199.00",
          "currency_code": "USD"
        }
      },
      "total_price_set": {
        "shop_money": {
          "amount": "232.88",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "232.88",
          "currency_code": "USD"
        }
      },
      "subtotal_price_set": {
        "shop_money": {
          "amount": "199.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "199.00",
          "currency_code": "USD"
        }
      },
      "total_tax_set": {
        "shop_money": {
          "amount": "23.88",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "23.88",
          "currency_code": "USD"
        }
      },
      "total_discounts_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "USD"
        }
      },
      "total_shipping_price_set": {
        "shop_money": {
          "amount": "10.00",
          "currency_code": "USD"
        },
        "presentment_money": {
          "amount": "10.00",
          "currency_code": "USD"
        }
      },
      "total_additional_fees_set": null,
      "total_duties_set": null,
      "admin_graphql_api_id": "gid://shopify/DraftOrder/1012750869"
    }
  ]
}

Retrieves a specific draft order

api_version
string
required

draft_order_id
string
required

fields
A comma-separated list of fields to include in the response

Was this section helpful?
Path parameters
draftorderid=994118539
string
required
Was this section helpful?
get
/admin/api/2024-10/draft_orders/994118539.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders/994118539.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "draft_order": {
    "id": 994118539,
    "note": "rush order",
    "email": "bob.norman@mail.example.com",
    "taxes_included": false,
    "currency": "USD",
    "invoice_sent_at": null,
    "created_at": "2024-09-23T17:13:16-04:00",
    "updated_at": "2024-09-23T17:13:16-04: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": true,
        "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": "e67f43adc63f6b9c7e969ba3dad33297",
      "price": "12.25"
    },
    "tax_lines": [],
    "tags": "Wholesale",
    "note_attributes": [],
    "total_price": "217.89",
    "subtotal_price": "194.00",
    "total_tax": "11.64",
    "payment_terms": null,
    "admin_graphql_api_id": "gid://shopify/DraftOrder/994118539",
    "customer": {
      "id": 207119551,
      "email": "bob.norman@mail.example.com",
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04: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": "Léon, Noël",
      "last_order_name": "#1001",
      "currency": "USD",
      "phone": "+16136120707",
      "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": "2024-09-23T17:13:16-04: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
      }
    }
  }
}

Retrieves a count of draft orders

api_version
string
required

since_id
Count draft orders after the specified ID.

status
default open
Count draft orders that have a given status.

updated_at_max
Count draft orders last updated before the specified date (format: 2014-04-25T16:15:47-04:00).

updated_at_min
Count draft orders last updated after the specified date (format: 2014-04-25T16:15:47-04:00).

Was this section helpful?
Was this section helpful?
get
/admin/api/2024-10/draft_orders/count.json
Copy
curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders/count.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "count": 5
}

Updates a draft order.

All non read-only properties of the DraftOrder Resource can be edited.


api_version
string
required

draft_order_id
string
required

Was this section helpful?
Path parameters
draftorderid=994118539
string
required
Request body
draftorder
Learn more about accessing protected customer data
Draft_order resource
Was this section helpful?
put
/admin/api/2024-10/draft_orders/994118539.json
Copy
curl -d '{"draft_order":{"id":994118539,"applied_discount":{"description":"Custom discount","value_type":"percentage","value":"10.0","amount":"19.90","title":"Custom"}}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders/994118539.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "draft_order": {
    "id": 994118539,
    "note": "rush order",
    "email": "bob.norman@mail.example.com",
    "taxes_included": false,
    "currency": "USD",
    "invoice_sent_at": null,
    "created_at": "2024-09-23T17:13:16-04:00",
    "updated_at": "2024-09-23T17:27:53-04: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": true,
        "taxable": true,
        "gift_card": false,
        "fulfillment_service": "manual",
        "grams": 567,
        "tax_lines": [
          {
            "rate": 0.06,
            "title": "Tax",
            "price": "10.75"
          }
        ],
        "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": "Custom discount",
      "value": "10.0",
      "title": "Custom",
      "amount": "19.90",
      "value_type": "percentage"
    },
    "order_id": null,
    "shipping_line": {
      "title": "UPS Ground",
      "custom": true,
      "handle": null,
      "price": "12.25"
    },
    "tax_lines": [
      {
        "rate": 0.06,
        "title": "Tax",
        "price": "10.75"
      }
    ],
    "tags": "Wholesale",
    "note_attributes": [],
    "total_price": "202.10",
    "subtotal_price": "179.10",
    "total_tax": "10.75",
    "payment_terms": null,
    "presentment_currency": "USD",
    "total_line_items_price_set": {
      "shop_money": {
        "amount": "199.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "199.00",
        "currency_code": "USD"
      }
    },
    "total_price_set": {
      "shop_money": {
        "amount": "202.10",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "202.10",
        "currency_code": "USD"
      }
    },
    "subtotal_price_set": {
      "shop_money": {
        "amount": "179.10",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "179.10",
        "currency_code": "USD"
      }
    },
    "total_tax_set": {
      "shop_money": {
        "amount": "10.75",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "10.75",
        "currency_code": "USD"
      }
    },
    "total_discounts_set": {
      "shop_money": {
        "amount": "19.90",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "19.90",
        "currency_code": "USD"
      }
    },
    "total_shipping_price_set": {
      "shop_money": {
        "amount": "12.25",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "12.25",
        "currency_code": "USD"
      }
    },
    "total_additional_fees_set": {
      "shop_money": {
        "amount": "0.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "0.00",
        "currency_code": "USD"
      }
    },
    "total_duties_set": {
      "shop_money": {
        "amount": "0.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "0.00",
        "currency_code": "USD"
      }
    },
    "admin_graphql_api_id": "gid://shopify/DraftOrder/994118539",
    "customer": {
      "id": 207119551,
      "email": "bob.norman@mail.example.com",
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:13:16-04: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": "Léon, Noël",
      "last_order_name": "#1001",
      "currency": "USD",
      "phone": "+16136120707",
      "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": "2024-09-23T17:13:16-04: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
      }
    }
  }
}

Completes a draft order.

Using the DraftOrder resource, you can create a draft order and transition it to an order.

The following flows are supported:

  • Create a draft order that calculates taxes and totals but accept payment from the customer outside of Shopify.
  • Create a draft order and send an invoice to the customer.

api_version
string
required

draft_order_id
string
required

payment_gateway_id
Sets the payment gateway ID. For more information, see the Payments API.

payment_pending
Sets payment pending to true or false.

Was this section helpful?
Was this section helpful?
put
/admin/api/2024-10/draft_orders/994118539/complete.json
Copy
curl -X PUT "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders/994118539/complete.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{
  "draft_order": {
    "id": 994118539,
    "note": "rush order",
    "email": "bob.norman@mail.example.com",
    "taxes_included": false,
    "currency": "USD",
    "invoice_sent_at": null,
    "created_at": "2024-09-23T17:13:16-04:00",
    "updated_at": "2024-09-23T17:27:32-04:00",
    "tax_exempt": false,
    "completed_at": "2024-09-23T17:27:32-04:00",
    "name": "#D2",
    "status": "completed",
    "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": true,
        "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": 1073459996,
    "shipping_line": {
      "title": "UPS Ground",
      "custom": false,
      "handle": "e67f43adc63f6b9c7e969ba3dad33297",
      "price": "12.25"
    },
    "tax_lines": [],
    "tags": "Wholesale",
    "note_attributes": [],
    "total_price": "217.89",
    "subtotal_price": "194.00",
    "total_tax": "11.64",
    "payment_terms": null,
    "presentment_currency": "USD",
    "total_line_items_price_set": {
      "shop_money": {
        "amount": "199.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "199.00",
        "currency_code": "USD"
      }
    },
    "total_price_set": {
      "shop_money": {
        "amount": "217.89",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "217.89",
        "currency_code": "USD"
      }
    },
    "subtotal_price_set": {
      "shop_money": {
        "amount": "194.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "194.00",
        "currency_code": "USD"
      }
    },
    "total_tax_set": {
      "shop_money": {
        "amount": "11.64",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "11.64",
        "currency_code": "USD"
      }
    },
    "total_discounts_set": {
      "shop_money": {
        "amount": "5.00",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "5.00",
        "currency_code": "USD"
      }
    },
    "total_shipping_price_set": {
      "shop_money": {
        "amount": "12.25",
        "currency_code": "USD"
      },
      "presentment_money": {
        "amount": "12.25",
        "currency_code": "USD"
      }
    },
    "total_additional_fees_set": null,
    "total_duties_set": null,
    "admin_graphql_api_id": "gid://shopify/DraftOrder/994118539",
    "customer": {
      "id": 207119551,
      "email": "bob.norman@mail.example.com",
      "created_at": "2024-09-23T17:13:16-04:00",
      "updated_at": "2024-09-23T17:27:33-04:00",
      "first_name": "Bob",
      "last_name": "Norman",
      "orders_count": 2,
      "state": "disabled",
      "total_spent": "417.54",
      "last_order_id": 1073459996,
      "note": null,
      "verified_email": true,
      "multipass_identifier": null,
      "tax_exempt": false,
      "tags": "Léon, Noël",
      "last_order_name": "#1002",
      "currency": "USD",
      "phone": "+16136120707",
      "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": "2024-09-23T17:13:16-04:00",
        "consent_collected_from": "OTHER"
      },
      "admin_graphql_api_id": "gid://shopify/Customer/207119551",
      "default_address": {
        "id": 1053317298,
        "customer_id": 207119551,
        "first_name": "Bob",
        "last_name": "Norman",
        "company": null,
        "address1": "Chestnut Street 92",
        "address2": null,
        "city": "Louisville",
        "province": "Kentucky",
        "country": "United States",
        "zip": "40202",
        "phone": "+1(502)-459-2181",
        "name": "Bob Norman",
        "province_code": "KY",
        "country_code": "US",
        "country_name": "United States",
        "default": true
      }
    }
  }
}

Deletes a draft order

api_version
string
required

draft_order_id
string
required

Was this section helpful?
Path parameters
draftorderid=994118539
string
required
Was this section helpful?
del
/admin/api/2024-10/draft_orders/994118539.json
Copy
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2024-10/draft_orders/994118539.json" \
-H "X-Shopify-Access-Token: {access_token}"
{}Response
JSON
HTTP/1.1 200 OK
{}