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

# List Coupons

> Retrieve a list of all coupons with optional filtering and pagination.

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination
</ParamField>

<ParamField query="per_page" type="integer" default="20">
  Number of coupons per page (max 100)
</ParamField>

<ParamField query="status" type="string">
  Filter coupons by status. Available values: `active`, `inactive`
</ParamField>

<ParamField query="search" type="string">
  Search coupons by code or name
</ParamField>

<ParamField query="discount_type" type="string">
  Filter by discount type. Valid values: `percent`, `fixed_amount`
</ParamField>

<ParamField query="discount_value_min" type="number">
  Filter coupons with a discount value greater than or equal to this amount
</ParamField>

<ParamField query="discount_value_max" type="number">
  Filter coupons with a discount value less than or equal to this amount
</ParamField>

<ParamField query="valid_from" type="string">
  Filter coupons whose `active_from` date is on or after this date (YYYY-MM-DD)
</ParamField>

<ParamField query="valid_until" type="string">
  Filter coupons whose `active_to` date is on or before this date (YYYY-MM-DD)
</ParamField>

<ParamField query="sort" type="string" default="created_at">
  Field to sort results by. Valid values: `id`, `code`, `discount_value`, `active_from`, `active_to`, `created_at`
</ParamField>

<ParamField query="order" type="string" default="DESC">
  Sort direction. Valid values: `ASC`, `DESC`
</ParamField>

## Example Request

```bash theme={null}
GET /wp-json/latepoint-api/v1/coupons?status=active&per_page=10
Authorization: Bearer YOUR_API_KEY
```

## Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "6",
      "code": "DESCUENTO25",
      "name": "Descuento 25%",
      "description": "Descuento del 25% en todos los servicios",
      "discount_type": "percent",
      "discount_value": 25,
      "readable_discount": "25%",
      "status": "active",
      "active_from": "0000-00-00",
      "active_to": "0000-00-00",
      "usage_count": 0,
      "total_discount": 0,
      "last_usage_date": "n/a",
      "created_at": "2025-08-18 07:59:36",
      "updated_at": "2025-08-18 07:59:36"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total": 4,
    "total_pages": 1,
    "has_next_page": false,
    "has_previous_page": false
  }
}
```
