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

# List Products

> Retrieve a list of all products with optional filtering

# List Products

Returns a paginated list of products, ordered by creation date (most recent first). Supports filtering by status, eligibility, and more.

## Authentication

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

## Query Parameters

| Parameter             | Type      | Description                                        |
| --------------------- | --------- | -------------------------------------------------- |
| `limit`               | integer   | Number of results per page (default: 10, max: 100) |
| `starting_after`      | integer   | Cursor for pagination (product ID)                 |
| `status`              | enum      | Filter by status: `active`, `inactive`, `archived` |
| `hsa_fsa_eligible`    | boolean   | Filter by HSA/FSA eligibility (true/false)         |
| `merchant_product_id` | string    | Filter by your product ID                          |
| `created_after`       | timestamp | Filter products created after this date            |
| `created_before`      | timestamp | Filter products created before this date           |

## Request

```bash theme={null}
GET /api/v2/products?limit=10&status=active
```

## Response

```json theme={null}
{
  "data": [
    {
      "id": 12345,
      "name": "Digital Blood Pressure Monitor",
      "tagline": "FDA-approved automatic BP monitor",
      "price": 4995,
      "currency": "USD",
      "merchant_product_id": "BP-MONITOR-001",
      "status": "active",
      "eligibility": {
        "hsa_fsa_eligible": true,
        "message": "SIGIS verified - Medical device"
      },
      "images": [
        {
          "id": 567,
          "url": "https://cdn.example.com/bp-monitor.jpg",
          "is_primary": true
        }
      ],
      "created_at": "2025-10-18T14:30:00Z"
    },
    {
      "id": 12346,
      "name": "Digital Thermometer",
      "price": 2995,
      "currency": "USD",
      "merchant_product_id": "THERM-001",
      "status": "active",
      "eligibility": {
        "hsa_fsa_eligible": true,
        "message": "SIGIS verified - Medical device"
      },
      "created_at": "2025-10-17T10:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": 12346
}
```

## Response Fields

| Field         | Type    | Description                                    |
| ------------- | ------- | ---------------------------------------------- |
| `data`        | array   | Array of product objects                       |
| `has_more`    | boolean | Whether more results are available             |
| `next_cursor` | integer | Cursor for next page (use as `starting_after`) |

## Examples

### List All Products

```bash theme={null}
curl https://api.withgale.com/api/v2/products \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

### Filter by Status

```bash theme={null}
curl "https://api.withgale.com/api/v2/products?status=active&limit=50" \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

### Filter by HSA/FSA Eligibility

```bash theme={null}
curl "https://api.withgale.com/api/v2/products?hsa_fsa_eligible=true" \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

### Pagination

Use cursor-based pagination for large datasets. Pass the `next_cursor` value from the previous response as the `starting_after` parameter:

```bash theme={null}
curl "https://api.withgale.com/api/v2/products?limit=100&starting_after=12345" \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

## Errors

| Status Code | Error Code            | Description                |
| ----------- | --------------------- | -------------------------- |
| 400         | `invalid_request`     | Invalid query parameters   |
| 401         | `unauthorized`        | Invalid or missing API key |
| 429         | `rate_limit_exceeded` | Too many requests          |

Example error:

```json theme={null}
{
  "error": {
    "code": "invalid_request",
    "message": "Invalid status value",
    "param": "status"
  }
}
```

## Related Endpoints

* [Create Product](/api-reference/endpoint/create-product-v2) - POST /api/v2/products
* [Get Product](/api-reference/endpoint/get-product-v2) - GET /api/v2/products/{id}
* [Update Product](/api-reference/endpoint/update-product-v2) - PUT /api/v2/products/{id}
* [Check Eligibility](/api-reference/endpoint/check-eligibility) - POST /api/v2/products/check-eligibility

## Related Resources

* [Product Object](/api-reference/objects/product)
* [Webhooks Reference](/developer-manual/webhooks)
