Development discussions around Shopify APIs
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.
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
@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.
User | RANK |
---|---|
49 | |
14 | |
9 | |
7 | |
5 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023