Re: [Shopify Orders APIs] Creating order with specified location

[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 (Retired)
267 40 51

Hi @Anonymous 

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

 

 

To learn more visit the Shopify Help Center or the Community 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?