> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# List Locations

GET https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locations

List locations. You can use optional filter parameters.

**Limits**
* Limit of 50 concurrent requests.
* Limit of 1000 items for payload length.


Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/inventory/locations/get-locations

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Store Inventory | read-only | `store_inventory_read_only` | | Store Inventory | modify | `store_inventory` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts). For more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Query parameters

- `location_id:in` (integer, optional) — Comma separated list of `location_id`.
- `location_code:in` (string, optional) — Comma separated list of `location_code`.
- `type_id:in` (string, optional) — Comma separated list of locations type codes.
- `managed_by_external_source` (boolean, optional) — Filter whether an external source manages location inventory levels.
- `is_active` (boolean, optional) — Filter by active locations flag; return both if not specified.
- `storefront_visibility` (boolean, optional) — Filter by storefront_visibility flag; return both if not specified.
- `page` (integer, optional) — Specifies the page number in a limited (paginated) list of products.
- `limit` (integer, optional) — Controls the number of items per page in a limited (paginated) list of products.

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

## Response

### 200

The request has been successfully processed.

- `data` (list of LocationResponse, optional)
- `meta` (Meta, optional)

## Types

### LocationResponse

- `id` (integer, optional) — Location immutable unique identifier.
- `code` (string, optional) — Location user-defined unique identifier.
- `label` (string, optional) — Location label.
- `description` (string, optional) — Description of location.
- `managed_by_external_source` (boolean, optional, default: false) — Indicates if the third-party system is the source of truth for inventory values. If set to true, manually editing inventory in the BigCommerce control panel will be disabled.
- `type_id` (enum, optional, default: PHYSICAL) — Describe type of given location.
  - Allowed values: `PHYSICAL`, `VIRTUAL`
- `enabled` (boolean, optional, default: true) — Indicator of accessibility of the location.
- `operating_hours` (OperatingHours, optional) — Schedule with opening and closing hours for each day of the week.
- `time_zone` (string, optional) — Time zone of location.
- `created_at` (datetime, optional) — Time when location was created.
- `updated_at` (datetime, optional) — Time of last update of the location.
- `address` (LocationResponseAddress, optional)
- `storefront_visibility` (boolean, optional, default: true) — Indicator of accessibility of location on the storefront.
- `special_hours` (list of LocationResponseSpecialHoursItems, optional)

### Meta

- `pagination` (MetaPagination, optional)

### OperatingHours

Schedule with opening and closing hours for each day of the week.

- `sunday` (OperatingHoursForDay, optional)
- `monday` (OperatingHoursForDay, optional)
- `tuesday` (OperatingHoursForDay, optional)
- `wednesday` (OperatingHoursForDay, optional)
- `thursday` (OperatingHoursForDay, optional)
- `friday` (OperatingHoursForDay, optional)
- `saturday` (OperatingHoursForDay, optional)

### LocationResponseAddress

- `address1` (string, optional) — Main address information.
- `address2` (string, optional) — Additional address information.
- `city` (string, optional) — The city where the location is located.
- `state` (string, optional) — The state where the location is located.
- `zip` (string, optional) — Zip code of the location.
- `email` (string, optional) — Email of the location.
- `phone` (string, optional) — Phone number of the location.
- `geo_coordinates` (LocationResponseAddressGeoCoordinates, optional) — Object with latitude and longitude that points at the location.
- `country_code` (string, optional) — ISO 3166-1 alpha-3 code.

### LocationResponseSpecialHoursItems

- `label` (string, optional)
- `date` (date, optional)
- `open` (boolean, optional)
- `opening` (string, optional, default: 00:00)
- `closing` (string, optional, default: 00:00)
- `all_day` (boolean, optional, default: false)
- `annual` (boolean, optional, default: false)

### MetaPagination

- `total` (integer, optional) — The total number of items in the result set.
- `count` (integer, optional) — The total number of items in the collection on current page.
- `per_page` (integer, optional) — The number of items returned in the collection per page, controlled by the limit parameter.
- `current_page` (integer, optional) — The page you are currently on within the collection.
- `total_pages` (integer, optional) — The total number of pages in the collection.
- `links` (MetaPaginationLinks, optional) — Pagination links for the previous and next parts of the whole collection.

### OperatingHoursForDay

- `open` (boolean, optional, default: false) — Boolean variable that defines if the location is open or not.
- `opening` (string, optional) — Opening time.
- `closing` (string, optional) — Closing time.

### LocationResponseAddressGeoCoordinates

Object with latitude and longitude that points at the location.

- `latitude` (float, optional) — Latitude.
- `longitude` (float, optional) — Longitude.

### MetaPaginationLinks

Pagination links for the previous and next parts of the whole collection.

- `previous` (string, optional) — The link to the previous page is returned in the response.
- `current` (string, optional) — A link to the current page is returned in the response.
- `next` (string, optional) — Link to the next page returned in the response.

## Examples

**Response**

```json
{
  "data": [
    {
      "id": 2,
      "code": "BIGC-1",
      "label": "Central store",
      "description": "Central shop of the world",
      "managed_by_external_source": false,
      "type_id": "PHYSICAL",
      "enabled": true,
      "operating_hours": {
        "sunday": {
          "open": false,
          "opening": "08:00",
          "closing": "16:00"
        },
        "monday": {
          "open": false,
          "opening": "08:00",
          "closing": "16:00"
        },
        "tuesday": {
          "open": false,
          "opening": "08:00",
          "closing": "16:00"
        },
        "wednesday": {
          "open": false,
          "opening": "08:00",
          "closing": "16:00"
        },
        "thursday": {
          "open": false,
          "opening": "08:00",
          "closing": "16:00"
        },
        "friday": {
          "open": false,
          "opening": "08:00",
          "closing": "16:00"
        },
        "saturday": {
          "open": false,
          "opening": "08:00",
          "closing": "16:00"
        }
      },
      "time_zone": "Etc/GMT+12",
      "created_at": "2022-05-30T12:18:02Z",
      "updated_at": "2022-05-30T12:18:02Z",
      "address": {
        "address1": "Central Park",
        "address2": "string",
        "city": "New York City",
        "state": "NY",
        "zip": "11111",
        "email": "test@example.com",
        "phone": "800-555-0198",
        "geo_coordinates": {
          "latitude": 11,
          "longitude": 8
        },
        "country_code": "US"
      },
      "storefront_visibility": true,
      "special_hours": [
        {
          "label": "Thanksgiving",
          "date": "2022-09-29",
          "open": true,
          "opening": "09:00",
          "closing": "09:00",
          "all_day": false,
          "annual": false
        }
      ]
    }
  ],
  "meta": {
    "pagination": {
      "total": 2,
      "count": 2,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 1,
      "links": {
        "previous": "?limit=100&page=1",
        "current": "?limit=100&page=1",
        "next": "?limit=100&page=1"
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations"

headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations';
const options = {
  method: 'GET',
  headers: {Accept: 'application/json', 'X-Auth-Token': '<apiKey>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations', [
  'headers' => [
    'Accept' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/inventory/locations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```