To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more

Draft Orders API - Official Launch

Dominique_Simo1
Shopify Staff
Shopify Staff
41 0 11

The Draft Orders API is officially launched and moving out of Beta!


Since our initial Beta launch, we've made the following improvements:

  • Draft orders can be completed via the API.
  • For compatibility with Checkout, parameters added to the invoice URL are now included in the redirection to Checkout.
  • Draft order tags now get copied over to their corresponding orders. 
  • The Sales by Channel report now shows all channels and applications which created orders directly. This means that Draft Orders no longer show under Other, and Draft Orders which are completed using the API's Complete endpoint will be listed under the name of the application which completed it. Similarly, applications which imported orders using the Orders API will be listed individually.

We are continuing to make improvements and considering feature requests as these are reported in the Shopify API and SDKs forum. We look forward to seeing what you build!

Replies 6 (6)
Dominique_Simo1
Shopify Staff
Shopify Staff
41 0 11

Here is an example of the updated Sales by Channel report, reflecting Orders created by an application named Order Application using the Orders API, and Orders completed by the Draft Order Application via the Draft Orders API.

Sales by Channel

HunkyBill
Shopify Expert
4826 60 575

There are some amusing aspects of using Draft Orders that would be nice for Shopify to point out in a detailed explanation of their use. 

As an example, one funny (or not depending on your view) thing about them is that when you mark a Draft Order as paid, that action generates a webhook for Orders/Paid. Seems about right. Except, the order does not actually exist in good shape yet. If you were to do some API snooping at that time, you'd notice inventory is not yet affected, as the payment has to go through. Apparently the payment action takes some time in the background, so to know what that Draft Order does to inventory you have to count on the Orders/Create webhook instead, which fires once payment is accepted. That is just so intuitive!

Anyway.. yay for progress, even if we have many many issues to now sort through and learn. Hopefully Shopify has some souls dedicated to informing us all about the little things we might not know except through discovery and careful use.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Dominique_Simo1
Shopify Staff
Shopify Staff
41 0 11

Hi Dave,

We can only address what we know about. As such, your feedback is important to ensuring we can improve the API, and also to document some of the less obvious aspects as accurately and effectively as possible. I wasn't aware that you've been using the API, if there's anything you think we should improve, feel free to post additional detail in the Shopify API and SDKs forum.

Dominique

Reamaze
Shopify Partner
244 0 20

Is there a way to use the draft orders API calculate the draft order totals (kinda like what the calculate endpoint does on refunds), without actually creating the draft order? I notice on the Shopify Admin, when you create a draft order, it builds the draft order but doesn't create it until you save the draft order. It would be great if there was similar functionality on the Draft Orders API. 

Our use case is that we want to be able to allow our users to create draft orders for their customers, by adding products / variants and viewing the draft order summary as they go along, but only creating the draft order after they've reviewed everything.

Reamaze - Customer Communications Platform for Shopify at https://apps.shopify.com/reamaze.
Akki
Shopify Partner
17 0 4

Hi Guys,

There seems to be a bug in case of sorting order_by in Draft order APIs.

I have tried to access the order API with the following URL and it is working perfectly:

https://cueblocks-2.myshopify.com/admin/orders.json?limit=10&fields=name,status&order=created_at%20d...

But when I try to access with the same parameters with the draft order API, it only shows the result in ascending order.

https://cueblocks-2.myshopify.com/admin/draft_orders.json?limit=10&fields=name,status&order=created_...

Does anyone face the same issue with Draft Order API?

MHolt
Tourist
9 0 5

It would be nice to be able to put custom weights on the custom line products so shipping can calculate.