# API de cupones

La API de Cupones es una API de afiliados que obtiene información detallada sobre códigos de cupón.

```
GET https://api.offer18.com/api/af/coupon
```

### **Parámetros comunes**

<table data-header-hidden><thead><tr><th width="150">Ruta</th><th width="150"> </th><th> </th></tr></thead><tbody><tr><td><strong>Parámetro</strong></td><td><strong>Tipo</strong></td><td><strong>Descripción</strong></td></tr><tr><td>key</td><td>Cadena</td><td>Clave API</td></tr><tr><td>aid</td><td>Entero</td><td>Id de Afiliado</td></tr><tr><td>mid</td><td>Entero</td><td>Su MID de anunciante</td></tr></tbody></table>

***

### Filtros

<table data-header-hidden><thead><tr><th width="150">Consulta</th><th width="150"> </th><th width="376.2"> </th></tr></thead><tbody><tr><td><strong>Consulta</strong></td><td><strong>Tipo</strong></td><td><strong>Descripción</strong></td></tr><tr><td>offer_id</td><td>Entero</td><td>ID de oferta (&#x26;offer_id=000,001,002)</td></tr><tr><td>status</td><td>Cadena</td><td>Aprobado, Expirado</td></tr></tbody></table>

{% code overflow="wrap" %}

```
https://api.offer18.com/api/af/coupon?key=000000000&aid=0000&mid=0000&offer_id=0000000&status=approved
```

{% endcode %}

***

### **Respuesta de la API**

```json
{
  "status": "200",
  "data": [
    {
      "coupon_code": "coupon1",
      "offer_id": "00011",
      "start_date": "2024-07-02",
      "end_date": "2025-05-29",
      "quota": "22",
      "quota_used": 2,
      "description": "coupon description",
      "status": "Approved"
    },
    {
      "coupon_code": "coupon2",
      "offer_id": "00012",
      "start_date": "2024-07-06",
      "end_date": "2025-01-06",
      "quota": "24",
      "quota_type": "shared",
      "quota_used": 4,
      "description": "coupon description",
      "status": "Expired"
    }
  ]
}
```

{% hint style="info" %}
**Código de cupón compartido (**&#x71;uota\_type: share&#x64;**)** - Un único código de cupón compartido por múltiples Afiliados.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.offer18.com/es/afiliado/api-de-afiliados/api-de-cupones.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
