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?
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).