# Coupon API

The Coupon API is an affiliate API that fetches detailed information about coupon codes.

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

### **Common Parameters**

<table data-header-hidden><thead><tr><th width="150">Path</th><th width="150"> </th><th> </th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>key</td><td>String</td><td>API Key</td></tr><tr><td>aid</td><td>Integer</td><td>Affiliate Id</td></tr><tr><td>mid</td><td>Integer</td><td>Your Advertiser MID</td></tr></tbody></table>

***

### Filters

<table data-header-hidden><thead><tr><th width="150">Query</th><th width="150"> </th><th width="376.2"> </th></tr></thead><tbody><tr><td><strong>Query</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>offer_id</td><td>Integer</td><td>OfferID (&#x26;offer_id=000,001,002)</td></tr><tr><td>status</td><td>String</td><td>Approved, Expired</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 %}

***

### **API Response**

```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" %}
**Shared Coupon Code (**&#x71;uota\_type: share&#x64;**)** - A single coupon code shared by multiple Affiliates.
{% endhint %}
