How do I get the warehouse id from a placed order via the API?

Highlighted
New Member
2 0 0
Hi everyone, I have a question I hope you might advice me in. 
 
My client has two locations that might stock inventory, one with products for men and one for women. We use Shopify's Rest API to retrieve order information regarding the order that just have been placed. From the retrieve order API, how do we know which location the item was allocated from? We need to send this information to our clients ERP system so it can fulfill the order from the right location. We know that it's not the location_id or the origin_id that we're looking for. Is there another value that tells us the location for each line item in the order?
 
We have read this threads that we think address the same subject:
 
Thank you,
Panagora
0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 179

Hey @Panagora , 

 

The location that line items are stocked at won't be available anywhere on the order itself. At the moment you can get the potential locations that an item is available at using these steps outlined here. This won't tell you which location a line item was allocated from though, because you can use any location for a fulfillment and we'll deduct the inventory from there instead regardless of where the inventory is currently allocated from. Essentially, we don't tell you which location to use - we tell you which ones can be used, and then you make a choice. 

 

However, with our new Fulfillment Order API that is coming I believe there is some functionality in place to improve upon the current workflow. 

 

 

1 Like
Highlighted
New Member
2 0 0

Thank you Josh for clearing this out! 

0 Likes