# GET /api/v1/inventory/products

> List products

- **Tag:** inventory:products
- **Operation ID:** `list_products_api_v1_inventory_products_get`

## Description

Retrieve all products with optional filtering and pagination.

## Authentication

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

## Parameters

- `type` (query, string, optional) — Filter by product type ('manual' or 'shopify')
- `category` (query, string, optional) — Filter by category (e.g. 'Finished Goods', 'Ingredients', 'Packaging')
- `include_variants` (query, boolean, optional) — Whether to include variant details
- `archived` (query, boolean, optional) — Filter by archived status (true/false/null for all)
- `search` (query, string, optional) — Fuzzy search term (trigram-similarity matching against the entity's primary text columns). Trimmed; ignored when blank.
- `cursor` (query, string, optional) — Cursor for pagination
- `limit` (query, integer, optional) — Pagination limit
- `direction` (query, string, optional) — Pagination direction: 'next' or 'prev'
- `include_total_count` (query, boolean, optional) — Whether to include total count (expensive - avoid if possible)
- `sort_by` (query, string, optional) — Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.
- `descending` (query, boolean, optional) — Sort direction: true for descending (newest/largest first), false for ascending

## Responses

### 200 — Successful Response

Schema: `SuccessEnvelope_ProductsListResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (ProductsListResponse)

### 404 — Business not found

### 422 — Invalid query parameters

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/inventory/products' \
  -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/products', {
  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/products", headers=headers)
data = response.json()
```

## See also

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