Locations API and deprecated primary_location_id on shop resource

Jiri_Hacmac
Shopify Expert
10 0 9

The description of shop resource (GET /admin/shop.json) says that the primary_location_id attribute is deprecated.

But the location resource GET /admin/locations.json does not provide any attribute to find out the shipping origin.

 

What is the correct way to get the shipping origin?

 

 

moving primates GmbH • https://www.movingprimates.de
Reply 1 (1)
Josh
Shopify Staff
Shopify Staff
1134 84 233

Hey there, 

 

Currently this is still the correct way to get a shop's shipping origin location.

 

Now that Shopify has shifted toward the concept of multiple locations though, there may not always truly be a 'primary' location. If you're using this field for fulfillment or inventory management purposes, in the long run it's likely safer to look up the location that inventory has been stocked at using either this guide (if you're creating fulfillments) or this guide (if you're managing inventory)

Josh | 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 the Shopify Help Center or the Shopify Blog