--- title: Location description: Retrieve the locations that a merchant has set up from their Shopify admin. Each location refers to the address of a business's headquarters, retail stores, pop-up stores, and warehouses. The store's locations are used to track sales and to configure the tax rates applied at checkout. api_version: 2025-10 api_name: admin-rest api_type: rest source_url: html: https://shopify.dev/docs/api/admin-rest/latest/resources/location md: https://shopify.dev/docs/api/admin-rest/latest/resources/location.md --- ![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg) The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql). For details and migration steps, visit our [migration guide](https://shopify.dev/docs/apps/build/graphql/migrate). # Location A location represents a geographical location where your stores, pop-up stores, headquarters, and warehouses exist. You can use the Location resource to track sales, manage inventory, and configure the tax rates to apply at checkout. For a better understanding of the relationship between locations, inventory levels and inventory items, refer to the [InventoryLevel](https://shopify.dev/api/admin-rest/latest/resources/inventorylevel) resource reference documentation \# ## Endpoints * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations) [/admin/api/latest/locations.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations) Retrieve a list of locations [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations?example=retrieve-a-list-of-locations) [locations](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations?example=retrieve-a-list-of-locations) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations-location-id) [/admin/api/latest/locations/{location\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations-location-id) Retrieve a single location by its ID [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-single-location-by-its-id) [location](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-single-location-by-its-id) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations-location-id-inventory-levels) [/admin/api/latest/locations/{location\_​id}/inventory\_​levels.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations-location-id-inventory-levels) Retrieve a list of inventory levels for a location [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-list-of-inventory-levels-for-a-location) [location](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-list-of-inventory-levels-for-a-location) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations-count) [/admin/api/latest/locations/count.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/location#get-locations-count) Retrieve a count of locations [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/locationsCount?example=retrieve-a-count-of-locations) [locationsCount](https://shopify.dev/docs/api/admin-graphql/latest/queries/locationsCount?example=retrieve-a-count-of-locations) *** ## The Location resource ### Properties *** active -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.isActive) [isActive](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.isActive) Whether the location is active. If `true`, then the location can be used to sell products, stock inventory, and fulfill orders. Merchants can deactivate locations from the Shopify admin. Deactivated locations don't contribute to the shop's [location limit](https://help.shopify.com/manual/locations/setting-up-your-locations). *** address1 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.address1) [address1](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.address1) The location's street address. *** address2 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.address2) [address2](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.address2) The optional second line of the location's street address. *** city -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.city) [city](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.city) The city the location is in. *** country -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.country) [country](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.country) The country the location is in. *** country\_code -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.countryCode) [countryCode](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.countryCode) The two-letter code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format) corresponding to country the location is in. *** created\_at -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.createdAt) [createdAt](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.createdAt) The date and time ([ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)) when the location was created. *** id -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) [id](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.id) The ID of the location. *** legacy -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.isFulfillmentService) [isFulfillmentService](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.isFulfillmentService) Whether this is a fulfillment service location. If `true`, then the location is a fulfillment service location. If `false`, then the location was created by the merchant and isn't tied to a fulfillment service. *** name -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.name) [name](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-Location.fields.name) The name of the location. *** phone -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.phone) [phone](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.phone) The phone number of the location. This value can contain special characters, such as `-` or `+`. *** province -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.province) [province](https://shopify.dev/docs/api/admin-graphql/latest/objects/LocationAddress#field-LocationAddress.fields.province) The province, state, or district of the location. *** {} ## The Location resource ```json { "active": true, "address1": "126 York Street", "address2": "Unit 42", "city": "Ottawa", "country": "Canada", "country_code": "CA", "created_at": "2008-12-31T19:00:00-05:00", "id": 121, "legacy": true, "name": "Ottawa Store", "phone": "18883290139", "province": "Ontario", "province_code": "ON", "updated_at": "2009-01-31T19:00:00-05:00", "zip": "k1n5t5", "localized_country_name": "Canada", "localized_province_name": "Ontario" } ``` *** ## getRetrieve a list of locations [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations?example=retrieve-a-list-of-locations) [locations](https://shopify.dev/docs/api/admin-graphql/latest/queries/locations?example=retrieve-a-list-of-locations) Retrieve a list of locations. **Note:** This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to [Make paginated requests to the REST Admin API](https://shopify.dev/api/usage/pagination-rest). ### Parameters *** api\_version string required *** limit ≤ 250 default 50 The maximum number of results to show. *** ### Examples Retrieve a list of all locations get ## /admin/api/2025-10/locations.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "locations": [ { "id": 655441491, "name": "50 Rideau Street", "address1": "50 Rideau Street", "address2": null, "city": "Ottawa", "zip": "K1N 9J7", "province": "Ontario", "country": "CA", "phone": null, "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "country_code": "CA", "country_name": "Canada", "province_code": "ON", "legacy": false, "active": true, "admin_graphql_api_id": "gid://shopify/Location/655441491", "localized_country_name": "Canada", "localized_province_name": "Ontario" }, { "id": 24826418, "name": "Apple Api Shipwire", "address1": null, "address2": null, "city": null, "zip": null, "province": null, "country": "DE", "phone": null, "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "country_code": "DE", "country_name": "Germany", "province_code": null, "legacy": true, "active": true, "admin_graphql_api_id": "gid://shopify/Location/24826418", "localized_country_name": "Germany", "localized_province_name": null }, { "id": 844681632, "name": "Apple Cupertino", "address1": "One Apple Park Way", "address2": null, "city": "Cupertino", "zip": "95014", "province": "California", "country": "US", "phone": null, "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "country_code": "US", "country_name": "United States", "province_code": "CA", "legacy": false, "active": true, "admin_graphql_api_id": "gid://shopify/Location/844681632", "localized_country_name": "United States", "localized_province_name": "California" }, { "id": 611870435, "name": "Apple Shipwire", "address1": null, "address2": null, "city": null, "zip": null, "province": null, "country": "DE", "phone": null, "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "country_code": "DE", "country_name": "Germany", "province_code": null, "legacy": true, "active": true, "admin_graphql_api_id": "gid://shopify/Location/611870435", "localized_country_name": "Germany", "localized_province_name": null }, { "id": 487838322, "name": "Fifth Avenue AppleStore", "address1": null, "address2": null, "city": null, "zip": null, "province": null, "country": "US", "phone": null, "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "country_code": "US", "country_name": "United States", "province_code": null, "legacy": false, "active": true, "admin_graphql_api_id": "gid://shopify/Location/487838322", "localized_country_name": "United States", "localized_province_name": null } ] } ``` ### examples * #### Retrieve a list of all locations ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Location.all({ session: session, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Location.all( session: test_session, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Location.all({ session: session, }); ``` #### response ```json HTTP/1.1 200 OK{"locations":[{"id":655441491,"name":"50 Rideau Street","address1":"50 Rideau Street","address2":null,"city":"Ottawa","zip":"K1N 9J7","province":"Ontario","country":"CA","phone":null,"created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","country_code":"CA","country_name":"Canada","province_code":"ON","legacy":false,"active":true,"admin_graphql_api_id":"gid://shopify/Location/655441491","localized_country_name":"Canada","localized_province_name":"Ontario"},{"id":24826418,"name":"Apple Api Shipwire","address1":null,"address2":null,"city":null,"zip":null,"province":null,"country":"DE","phone":null,"created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","country_code":"DE","country_name":"Germany","province_code":null,"legacy":true,"active":true,"admin_graphql_api_id":"gid://shopify/Location/24826418","localized_country_name":"Germany","localized_province_name":null},{"id":844681632,"name":"Apple Cupertino","address1":"One Apple Park Way","address2":null,"city":"Cupertino","zip":"95014","province":"California","country":"US","phone":null,"created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","country_code":"US","country_name":"United States","province_code":"CA","legacy":false,"active":true,"admin_graphql_api_id":"gid://shopify/Location/844681632","localized_country_name":"United States","localized_province_name":"California"},{"id":611870435,"name":"Apple Shipwire","address1":null,"address2":null,"city":null,"zip":null,"province":null,"country":"DE","phone":null,"created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","country_code":"DE","country_name":"Germany","province_code":null,"legacy":true,"active":true,"admin_graphql_api_id":"gid://shopify/Location/611870435","localized_country_name":"Germany","localized_province_name":null},{"id":487838322,"name":"Fifth Avenue AppleStore","address1":null,"address2":null,"city":null,"zip":null,"province":null,"country":"US","phone":null,"created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","country_code":"US","country_name":"United States","province_code":null,"legacy":false,"active":true,"admin_graphql_api_id":"gid://shopify/Location/487838322","localized_country_name":"United States","localized_province_name":null}]} ``` *** ## getRetrieve a single location by its ID [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-single-location-by-its-id) [location](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-single-location-by-its-id) Retrieve a single location by its ID. ### Parameters *** api\_version string required *** location\_id string required *** ### Examples Retrieve a single location Path parameters location\_​id=​487838322 string required get ## /admin/api/2025-10/locations/487838322.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations/487838322.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "location": { "id": 487838322, "name": "Fifth Avenue AppleStore", "address1": null, "address2": null, "city": null, "zip": null, "province": null, "country": "US", "phone": null, "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "country_code": "US", "country_name": "United States", "province_code": null, "legacy": false, "active": true, "admin_graphql_api_id": "gid://shopify/Location/487838322" } } ``` ### examples * #### Retrieve a single location ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations/487838322.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Location.find({ session: session, id: 487838322, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Location.find( session: test_session, id: 487838322, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Location.find({ session: session, id: 487838322, }); ``` #### response ```json HTTP/1.1 200 OK{"location":{"id":487838322,"name":"Fifth Avenue AppleStore","address1":null,"address2":null,"city":null,"zip":null,"province":null,"country":"US","phone":null,"created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","country_code":"US","country_name":"United States","province_code":null,"legacy":false,"active":true,"admin_graphql_api_id":"gid://shopify/Location/487838322"}} ``` *** ## getRetrieve a list of inventory levels for a location [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-list-of-inventory-levels-for-a-location) [location](https://shopify.dev/docs/api/admin-graphql/latest/queries/location?example=retrieve-a-list-of-inventory-levels-for-a-location) Retrieve a list of inventory levels for a location. **Note:** This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to [Make paginated requests to the REST Admin API](https://shopify.dev/api/usage/pagination-rest). ### Parameters *** api\_version string required *** location\_id string required *** ### Examples Retrieve a list of all inventory for a location by its ID Path parameters location\_​id=​487838322 string required get ## /admin/api/2025-10/locations/487838322/inventory\_​levels.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations/487838322/inventory_levels.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "inventory_levels": [ { "inventory_item_id": 49148385, "location_id": 487838322, "available": 18, "updated_at": "2025-10-01T14:30:56-04:00", "admin_graphql_api_id": "gid://shopify/InventoryLevel/548380009?inventory_item_id=49148385" }, { "inventory_item_id": 808950810, "location_id": 487838322, "available": 9, "updated_at": "2025-10-01T14:30:56-04:00", "admin_graphql_api_id": "gid://shopify/InventoryLevel/548380009?inventory_item_id=808950810" }, { "inventory_item_id": 457924702, "location_id": 487838322, "available": 36, "updated_at": "2025-10-01T14:30:56-04:00", "admin_graphql_api_id": "gid://shopify/InventoryLevel/548380009?inventory_item_id=457924702" }, { "inventory_item_id": 39072856, "location_id": 487838322, "available": 27, "updated_at": "2025-10-01T14:30:56-04:00", "admin_graphql_api_id": "gid://shopify/InventoryLevel/548380009?inventory_item_id=39072856" } ] } ``` ### examples * #### Retrieve a list of all inventory for a location by its ID ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations/487838322/inventory_levels.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Location.inventory_levels({ session: session, id: 487838322, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Location.inventory_levels( session: test_session, id: 487838322, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Location.inventory_levels({ session: session, id: 487838322, }); ``` #### response ```json HTTP/1.1 200 OK{"inventory_levels":[{"inventory_item_id":49148385,"location_id":487838322,"available":18,"updated_at":"2025-10-01T14:30:56-04:00","admin_graphql_api_id":"gid://shopify/InventoryLevel/548380009?inventory_item_id=49148385"},{"inventory_item_id":808950810,"location_id":487838322,"available":9,"updated_at":"2025-10-01T14:30:56-04:00","admin_graphql_api_id":"gid://shopify/InventoryLevel/548380009?inventory_item_id=808950810"},{"inventory_item_id":457924702,"location_id":487838322,"available":36,"updated_at":"2025-10-01T14:30:56-04:00","admin_graphql_api_id":"gid://shopify/InventoryLevel/548380009?inventory_item_id=457924702"},{"inventory_item_id":39072856,"location_id":487838322,"available":27,"updated_at":"2025-10-01T14:30:56-04:00","admin_graphql_api_id":"gid://shopify/InventoryLevel/548380009?inventory_item_id=39072856"}]} ``` *** ## getRetrieve a count of locations [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/locationsCount?example=retrieve-a-count-of-locations) [locationsCount](https://shopify.dev/docs/api/admin-graphql/latest/queries/locationsCount?example=retrieve-a-count-of-locations) Retrieve a count of locations. ### Parameters *** api\_version string required *** ### Examples Count all store locations get ## /admin/api/2025-10/locations/count.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations/count.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "count": 5 } ``` ### examples * #### Count all store locations ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/locations/count.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Location.count({ session: session, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Location.count( session: test_session, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Location.count({ session: session, }); ``` #### response ```json HTTP/1.1 200 OK{"count":5} ```