> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Locations

> List all locations with filtering and pagination

<Note>
  This endpoint retrieves a paginated list of locations. Use filters to narrow results by type, capabilities, and status.
</Note>

## Authentication

This endpoint requires a valid API key with `locations:read` permissions.

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Query Parameters

<ParamField query="limit" type="integer">
  Number of items to return (default: 20, max: 100)
</ParamField>

<ParamField query="offset" type="integer">
  Number of items to skip
</ParamField>

<ParamField query="type" type="string">
  Filter by type: "warehouse", "store", "distribution\_center", "dropship"
</ParamField>

<ParamField query="status" type="string">
  Filter by status: "active", "inactive", "maintenance"
</ParamField>

<ParamField query="capabilities" type="array">
  Filter by capabilities: "storage", "fulfillment", "returns", "cross\_dock", "pickup"
</ParamField>

<ParamField query="country" type="string">
  Filter by country code
</ParamField>

<ParamField query="state" type="string">
  Filter by state/province
</ParamField>

<ParamField query="city" type="string">
  Filter by city
</ParamField>

<ParamField query="sort_by" type="string">
  Sort field: "created\_at", "name", "code", "capacity"
</ParamField>

<ParamField query="sort_order" type="string">
  Sort order: "asc" or "desc"
</ParamField>

### Response

<ResponseField name="object" type="string">
  Object type, always "list"
</ResponseField>

<ResponseField name="data" type="array">
  Array of location objects
</ResponseField>

<ResponseField name="has_more" type="boolean">
  Whether more items exist
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://api.stateset.com/v1/locations?type=warehouse&status=active' \
  --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const locations = await stateset.locations.list({
    type: 'warehouse',
    status: 'active',
    capabilities: ['fulfillment']
  });
  ```

  ```python Python theme={null}
  locations = stateset.locations.list(
    type='warehouse',
    status='active',
    capabilities=['fulfillment']
  )
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "object": "list",
    "data": [
      {
        "id": "loc_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
        "object": "location",
        "name": "West Coast Distribution Center",
        "code": "WH-WEST-01",
        "type": "warehouse",
        "status": "active",
        "address": {
          "city": "Los Angeles",
          "state": "CA",
          "country": "US"
        },
        "capabilities": ["storage", "fulfillment", "returns"],
        "capacity": {
          "utilization_percent": 4.0,
          "available_units": 4850
        }
      },
      {
        "id": "loc_7823f083-bb2c-54d6-bf6d-1b8e3fc75f41",
        "object": "location",
        "name": "East Coast Fulfillment Center",
        "code": "WH-EAST-01",
        "type": "warehouse",
        "status": "active",
        "address": {
          "city": "Newark",
          "state": "NJ",
          "country": "US"
        },
        "capabilities": ["storage", "fulfillment", "cross_dock"],
        "capacity": {
          "utilization_percent": 65.0,
          "available_units": 1750
        }
      }
    ],
    "has_more": true,
    "total_count": 8
  }
  ```
</ResponseExample>
