Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Draft Order API > Queries

Draft Order API > Queries

Ceri-Waters
Shopify Partner
98 6 30

Hi,

A few queries about the Draft Order API that aren't convered in the documentation.

 

  • Is it possible to set the payment gateway for a new order created from the draft
  • Can you 'Hold Stock' for a draft order created through the API (Like you can in the admin panel)
  • Is it possible to mark an order created from the draft as 'authorized' instead of paid, or pending. If not what is the point in pending? You can't actually capture a payment for the new order through the API then, nor add a new Authorization since the order has already been created. The only way to change the new order from 'Pending' to 'Paid' is to manually do it via the admin panel.

Thanks in Advance,
Ceri.

Replies 3 (3)

Ceri-Waters
Shopify Partner
98 6 30

Following on from this, tax lines do not appear to take any affect from the Draft Order API - but the exact same thing works fine on the Order API.

Shopify can you confirm please?

seshna
Shopify Partner
13 0 1

Hey kehza,

Were you able to figure out how to set the payment gateway for a new order created from a draft? To anything other than 'manual'.

I've been trying to do this for a couple of days now.

Ceri-Waters
Shopify Partner
98 6 30

Hi Seshna,


Unfortunately not.. I ended up taking the approach where I create a new order via the Order API matching the Draft Details, after which I then either deleted the Draft Order, or added a note indicating it had been turned into x order.

A few things to be aware of with the Order API that they don't make very clear in their documentation.. You cannot mark an API order as paid, if you didn't mark it as 'Authorized' or 'Paid' during its creation. You can however if it was created via the Shopify Checkout. You can no longer directly mark orders as Paid, instead you need to add a transaction of 'capture' and 'success'. If you want to temporarily hold stock for an order, the only method is to create a genuine Order, and cancel it after x period of time, the 'Temporary Stock Holding' for the Draft API isn't a thing, although you can do it via the Shopify Admin (Frustrating). When Re-Stocking an Order, you need to Re-Fund it first, and pass in a Location ID (sort of a Warehouse) even if your Shopify Store doesn't use this functionality.

 

I've worked through a lot of 'Kinks' with the Shopify Admin API, so let me know if you have any queries because Shopify certainly won't answer you.