> For the complete documentation index, see [llms.txt](https://knowledgebase.offer18.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.offer18.com/ru/partnyor/api-partnyorov/api-kuponov.md).

# API купонов

API купонов — это партнёрский API, который получает подробную информацию о купонных кодах.

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

### **Общие параметры**

<table data-header-hidden><thead><tr><th width="150">Путь</th><th width="150"> </th><th> </th></tr></thead><tbody><tr><td><strong>Параметр</strong></td><td><strong>Тип</strong></td><td><strong>Описание</strong></td></tr><tr><td>key</td><td>Строка</td><td>API ключ</td></tr><tr><td>aid</td><td>Целое</td><td>ID партнёра</td></tr><tr><td>mid</td><td>Целое</td><td>Ваш рекламодатель MID</td></tr></tbody></table>

***

### Фильтры

<table data-header-hidden><thead><tr><th width="150">Запрос</th><th width="150"> </th><th width="376.2"> </th></tr></thead><tbody><tr><td><strong>Запрос</strong></td><td><strong>Тип</strong></td><td><strong>Описание</strong></td></tr><tr><td>offer_id</td><td>Целое</td><td>ID оффера (&#x26;offer_id=000,001,002)</td></tr><tr><td>status</td><td>Строка</td><td>Утверждено, Просрочено</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**

```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": "описание купона",
      "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": "описание купона",
      "status": "Expired"
    }
  ]
}
```

{% hint style="info" %}
**Совместный купонный код (**&#x71;uota\_type: share&#x64;**)** - Один купонный код, используемый несколькими партнёрами.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://knowledgebase.offer18.com/ru/partnyor/api-partnyorov/api-kuponov.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
