> 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/zh/wang-luo/wang-luo-api/feng-ding-api.md).

# 封顶 API

{% code overflow="wrap" %}

```
POST https://api.offer18.com/api/m/offer_capping
```

{% endcode %}

### 常用参数

| 查询         | 类型  | 描述      |
| ---------- | --- | ------- |
| mid        | 整数  | 网络账户ID  |
| api-key    | 字符串 | 网络API密钥 |
| secret-key | 字符串 | 网络密钥    |

**操作**

| 查询        | 类型  | 描述                                |
| --------- | --- | --------------------------------- |
| action    | 字符串 | **允许值：** create / update / delete |
| offer\_id | 整数  | 所有操作均必填                           |

###

### 过滤

<table><thead><tr><th>查询</th><th width="249">类型</th><th>描述</th></tr></thead><tbody><tr><td>rule_id</td><td>整数</td><td>封顶规则ID</td></tr><tr><td>status</td><td>字符串</td><td>enable/disable</td></tr><tr><td>limit</td><td>整数</td><td>每页封顶规则数量（最多30条规则）</td></tr><tr><td>page</td><td>整数</td><td>页码</td></tr></tbody></table>

####

{% code overflow="wrap" %}

```
https://api.offer18.com/api/m/offer_capping?mid=000&api-key=000000&secret-key=000000000&action=create
```

{% endcode %}

###

### 字段

<table><thead><tr><th>查询</th><th>类型</th><th width="263">描述</th></tr></thead><tbody><tr><td>offer_id</td><td>整数</td><td>优惠ID</td></tr><tr><td>rule_name</td><td>字符串</td><td>封顶规则名称</td></tr><tr><td>rule_type</td><td>字符串</td><td><ul><li>advertiser_capping</li><li>affiliate_capping</li></ul></td></tr><tr><td>affiliate_id</td><td>整数</td><td>若为联盟封顶，则填写联盟ID</td></tr><tr><td>timezone</td><td>整数</td><td>封顶时区</td></tr><tr><td>capping_type</td><td>字符串</td><td><ul><li>gross_conversions</li><li>approved_conversions</li><li>gross_revenue</li><li>approved_revenue</li><li>gross_payout</li><li>approved_payout</li><li>gross_clicks</li><li>approved_clicks</li></ul></td></tr><tr><td>capping_period</td><td>字符串</td><td><ul><li>daily</li><li>weekly</li><li>monthly</li><li>hourly</li></ul></td></tr><tr><td>capping_value</td><td>整数</td><td>封顶值</td></tr><tr><td>overcap_action</td><td>字符串</td><td><ul><li>stop</li><li>fallback</li><li>fallback_conversion_accept</li><li>conversion_accept</li><li>conversion_reject</li><li>conversion_pending</li></ul></td></tr><tr><td>event</td><td>字符串</td><td>用于事件封顶的事件</td></tr><tr><td>affiliate_visibility</td><td>字符串</td><td><ul><li>show</li><li>hide</li></ul></td></tr><tr><td>notification_email</td><td>字符串</td><td>封顶通知邮箱ID</td></tr><tr><td>notification_earlier_threshold</td><td>字符串</td><td>封顶阈值通知邮箱ID</td></tr><tr><td>status</td><td>字符串</td><td><p>封顶规则状态</p><ul><li>enable</li><li>disable</li></ul></td></tr><tr><td>rule_id</td><td>整数</td><td>用于更新和删除封顶规则</td></tr></tbody></table>

## API请求示例 <a href="#example-api-request" id="example-api-request"></a>

<figure><img src="/files/a06bd081ae544f012d768c5a0807c2381090bacc" alt=""><figcaption></figcaption></figure>

### API响应 <a href="#api-response" id="api-response"></a>

{% code overflow="wrap" %}

```javascript
{
    "status": 200,
    "response": "capping_rule_created_successfully",
    "data": {
        "rule_id": 70xxx1
    }
}
```

{% endcode %}

<br>
