# GET /api/v1/inventory/locations

> List inventory locations

- **Tag:** inventory:locations
- **Operation ID:** `list_locations_api_v1_inventory_locations_get`

## Description

List all inventory locations for the business with optional filtering.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `location_type` (query, LocationTypeEnum, optional) — Filter by location type
- `include_archived` (query, boolean, optional) — Include archived locations
- `cursor` (query, string, optional) — Pagination cursor
- `limit` (query, integer, optional) — Page size
- `include_total_count` (query, boolean, optional) — Include total count

## Responses

### 200 — Successful Response

Schema: `LocationListResponse`

- `items` (array · LocationResponse · required) → `LocationResponse`
  - `name` (string · required) — Location name
  - `code` (string) — Short code like 'WH1', 'STORE-NYC'
  - `location_type` (LocationTypeEnum) → `LocationTypeEnum` — Type of location
  - `address_line1` (string)
  - `address_line2` (string)
  - `city` (string)
  - `state` (string)
  - `postal_code` (string)
  - `country` (string)
  - `is_default` (boolean) — Default location for new inventory
  - `is_active` (boolean) — Whether location accepts new inventory
  - `contact_name` (string)
  - `contact_email` (string)
  - `contact_phone` (string)
  - `notes` (string)
  - `id` (string · required)
  - `business_id` (string · required)
  - `archived` (boolean · required)
  - `full_address` (string)
  - `display_name` (string · required)
  - `can_receive_inventory` (boolean · required)
  - `created_at` (string · date-time · required)
  - `updated_at` (string · date-time · required)
  - `shopify_location_id` (string)
- `total_count` (integer)
- `next_cursor` (string)
- `prev_cursor` (string)
- `has_next` (boolean)
- `has_prev` (boolean)

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/inventory/locations' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/inventory/locations', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/inventory/locations", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/inventory-locations/list-locations
- OpenAPI slice: https://www.ondayzero.com/docs/reference/inventory-locations/list-locations/openapi.json
- Other endpoints in **inventory:locations**: https://www.ondayzero.com/docs/reference/inventory-locations
