# 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)
- `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: `ProductsListResponse`

- `items` (array · ProductResponse · required) → `ProductResponse` — List of items
  - `id` (string · required) — Product UUID.
  - `business_id` (string · required) — Business UUID.
  - `created_at` (string · date-time · required) — Creation timestamp.
  - `updated_at` (string · date-time · required) — Last update timestamp.
  - `name` (string · required) — Product name.
  - `type` (string · required) — Product type: 'manual' or 'shopify'.
  - `category` (string) — Product category (e.g. 'Finished Goods', 'Intermediate Goods', 'Ingredients').
  - `stripe_product_id` (string) — Stripe product ID if synced to Stripe.
  - `shopify_product_id` (string) — Shopify product ID if synced from Shopify.
  - `archived` (boolean) — Whether product is archived (hidden from lists).
  - `variant_count` (integer) — Number of variants this product has.
  - `variants` (array · VariantResponse) — List of product variants (when include_variants=true).
- `total` (integer) — Total number of items (null when not calculated for performance)
- `limit` (integer) — Pagination limit
- `next_cursor` (string) — Cursor for next page
- `prev_cursor` (string) — Cursor for previous page
- `has_next` (boolean · required) — Whether there are more items
- `has_prev` (boolean · required) — Whether there are previous items

### 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
