[Shopify Orders APIs] Creating order with specified location

wylanosorio
Shopify Partner
10 0 0

Is there a way to specify the location during order creation via the Orders API?

I know that we could set the target location as the priority in the admin settings but that would affect other orders that are coming from different platforms which are dependent to the initial setup.

The current solution we have is to move the order to the target location after the order is created.
But there's downsides:

1. Order creation won't push through when the default location don't have stock
2. It might mislead our team members about the stock of the default location being deducted.

So it is best really to specify the target location during order creation.

Replies 3 (3)
csam
Shopify Staff
Shopify Staff
267 40 43

Hi @WY 

You can use the origin_location field, which is a property of line items within the order. You can read more about this on the Orders API page here: https://shopify.dev/api/admin/rest/reference/orders/order

 

 

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

wylanosorio
Shopify Partner
10 0 0

@csam Thanks for you reply. I have tried it, specifying each line item location different from the default location and unfortunately it does not work. The order didn't went through because the default location don't have stock.

wylanosorio
Shopify Partner
10 0 0

Hi  @csam , you might have new solution for this?