Skip to main content

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. For details and migration steps, visit our migration guide.

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 resource reference documentation

Was this section helpful?

Anchor to

The Location resource

Anchor to

Properties


active

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.


address1

The location's street address.


address2

The optional second line of the location's street address.


city

The city the location is in.


country

The country the location is in.


country_code

The two-letter code (ISO 3166-1 alpha-2 format) corresponding to country the location is in.


created_at

The date and time (ISO 8601 format) when the location was created.


id
->
id

The ID of the location.


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

The name of the location.


phone

The phone number of the location. This value can contain special characters, such as - or +.


province

The province, state, or district of the location.


Was this section helpful?
{}

The Location resource

{
"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"
}

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.


api_version
string
required

limit
≤ 250
default 50

The maximum number of results to show.


Was this section helpful?

Retrieve a list of all locations

Was this section helpful?
get

/admin/api/2025-07/locations.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/locations.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

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-07-01T14:03:22-04:00",
"updated_at": "2025-07-01T14:03:22-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-07-01T14:03:22-04:00",
"updated_at": "2025-07-01T14:03:22-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-07-01T14:03:22-04:00",
"updated_at": "2025-07-01T14:03:22-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-07-01T14:03:22-04:00",
"updated_at": "2025-07-01T14:03:22-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-07-01T14:03:22-04:00",
"updated_at": "2025-07-01T14:03:22-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
}
]
}

Retrieve a single location by its ID.


api_version
string
required

location_id
string
required

Was this section helpful?

Retrieve a single location

Path parameters
location_id=487838322
string
required
Was this section helpful?
get

/admin/api/2025-07/locations/487838322.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/locations/487838322.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

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-07-01T14:03:22-04:00",
"updated_at": "2025-07-01T14:03:22-04:00",
"country_code": "US",
"country_name": "United States",
"province_code": null,
"legacy": false,
"active": true,
"admin_graphql_api_id": "gid://shopify/Location/487838322"
}
}

Anchor to GET request, Retrieve a list of inventory levels for a location
get
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.


api_version
string
required

location_id
string
required

Was this section helpful?

Retrieve a list of all inventory for a location by its ID

Path parameters
location_id=487838322
string
required
Was this section helpful?
get

/admin/api/2025-07/locations/487838322/inventory_levels.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/locations/487838322/inventory_levels.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"inventory_levels": [
{
"inventory_item_id": 49148385,
"location_id": 487838322,
"available": 18,
"updated_at": "2025-07-01T14:03:22-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-07-01T14:03:22-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-07-01T14:03:22-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-07-01T14:03:22-04:00",
"admin_graphql_api_id": "gid://shopify/InventoryLevel/548380009?inventory_item_id=39072856"
}
]
}

Retrieve a count of locations.


api_version
string
required

Was this section helpful?

Count all store locations

Was this section helpful?
get

/admin/api/2025-07/locations/count.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/locations/count.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"count": 5
}