Saltar al contenido principal
POST
/
ecommerce
/
v2
/
apps
/
{app_id}
/
coupons
/
search
curl -X POST "https://gateway.jelou.ai/ecommerce/v2/apps/{app_id}/coupons/search?page=1&limit=20" \
  -H "x-api-key: TU_CLAVE_API" \
  -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" }
    ]
  }'
{
  "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
  }
}
app_id
string
requerido
ID de tu tienda en Jelou Shop.
page
integer
predeterminado:"1"
Número de página a retornar.
limit
integer
predeterminado:"15"
Cantidad de resultados por página (máx. 100).
state
string
Filtra por el estado derivado: active, scheduled, expired, depleted o inactive.
Objeto de búsqueda por texto.
filters
object[]
Lista de filtros a aplicar.
sort
object[]
Ordenamiento de resultados.
curl -X POST "https://gateway.jelou.ai/ecommerce/v2/apps/{app_id}/coupons/search?page=1&limit=20" \
  -H "x-api-key: TU_CLAVE_API" \
  -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" }
    ]
  }'
{
  "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
  }
}
Campos buscables: code, name Campos filtrables: status, discount_type, applies_to_all_branches, branches.id Campos ordenables: created_at, valid_from, valid_until, code, status