Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
In the Shopify store admin panel, you can set Default Location. And in the UI, the default location has Default tag showing up. However, when I look at the REST API to retrieve a list of locations (https://shopify.dev/docs/api/admin-rest/2023-10/resources/location#get-locations), there is no way for me to find out which one is the default location. Can anyone help?
Solved! Go to the solution
This is an accepted solution.
You get can it from the shop object under primary_location_id
https://shopify.dev/docs/api/admin-rest/2023-10/resources/shop
Looking for the same.
This is an accepted solution.
You get can it from the shop object under primary_location_id
https://shopify.dev/docs/api/admin-rest/2023-10/resources/shop
Looks like in the latest REST API and GQL API have primary location fields `deprecated`.
REST API:
https://shopify.dev/docs/api/admin-rest/2024-04/resources/shop
GQL API:
https://shopify.dev/docs/api/admin-graphql/2024-04/queries/location
How do we find this information in a new way now?
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024