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

# Search coupons

> Search coupons by code or name, and filter by state, type, or branch.

**app\_id** `string` *required*

Your store ID in Jelou Shop.

**page** `integer` (default: 1)

Page number to return.

**limit** `integer` (default: 15)

Number of results per page (max. 100).

**state** `string`

Filter by the derived state: `active`, `scheduled`, `expired`, `depleted`, or `inactive`.

**search** `object`

Text search object.

**Search properties**

**value** `string` *required*

Text to search in the `code` and `name` fields.

**case\_sensitive** `boolean` (default: false)

Whether the search is case sensitive.

**filters** `object[]`

List of filters to apply.

**Properties of each filter**

**field** `string` *required*

Field to filter by: `status`, `discount_type`, `applies_to_all_branches`, or `branches.id`.

**operator** `string` (default: =)

Comparison operator. Supported values: `=`, `!=`, `<`, `<=`, `>`, `>=`, `like`, `not like`, `in`, `not in`.

**value** `string | boolean` *required*

Filter value.

**sort** `object[]`

Sorting of results.

**Properties of each sort**

**field** `string` *required*

Field to sort by: `created_at`, `valid_from`, `valid_until`, `code`, or `status`.

**direction** `string` (default: asc)

Sort direction: `asc` or `desc`.

```bash cURL theme={null}
curl -X POST "https://gateway.jelou.ai/ecommerce/v2/apps/{app_id}/coupons/search?page=1&limit=20" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "search": {
      "value": "black",
      "case_sensitive": false
    },
    "filters": [
      { "field": "discount_type", "operator": "=", "value": "percentage" },
      { "field": "status", "operator": "=", "value": true }
    ],
    "sort": [
      { "field": "valid_until", "direction": "asc" }
    ]
  }'
```

```json 200 Success theme={null}
{
  "data": [
    {
      "id": "9e3f2c1a-8b7d-4e6f-a5c4-d3b2a1e0f9c8",
      "code": "BLACKFRIDAY25",
      "name": "Black Friday 25%",
      "discount_type": "percentage",
      "discount_value": "25.000000",
      "status": true,
      "valid_from": "2026-11-25T00:00:00.000000Z",
      "valid_until": "2026-11-30T23:59:59.000000Z",
      "max_uses": 100,
      "once_per_client": true,
      "applies_to_all_branches": true,
      "uses_count": 0,
      "state": "scheduled",
      "created_at": "2026-07-02T15:30:00.000000Z",
      "updated_at": "2026-07-02T15:30:00.000000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 1
  }
}
```

> [!TIP]
>
> **Searchable fields:** `code`, `name`
> **Filterable fields:** `status`, `discount_type`, `applies_to_all_branches`, `branches.id`
> **Sortable fields:** `created_at`, `valid_from`, `valid_until`, `code`, `status`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.