> 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/lian-meng-huo-ban/lian-meng-huo-ban-api/sdk-lian-meng-huo-ban-offer-biao.md).

# SDK - 联盟客 Offer 表格

Affiliate Offer 表格 SDK 是一个简单的实用程序，根据 API 数据以表格形式显示联盟优惠。只需输入您的联盟 API 信息， 此 SDK 将自动以有组织的表格结构显示优惠。这是一种无需大量设置即可快速显示优惠信息的简便方法。

***

### 设置&#x20;

启用 Offer18 联盟优惠表格 SDK 的说明

#### 1. 创建一个新的 HTML 文件

#### 2. 添加 SDK 配置和脚本

在 `<body>` 标记内，添加以下脚本以配置并加载 Offer18 SDK。将占位符值替换为您实际的联盟信息：

{% code overflow="wrap" %}

```html
<script>
  OFFER18_API_CONFIG = {
    "aid": "<--AFFILIATE-ID-->",  // 替换为您的联盟 ID
    "mid": "<--ACCOUNT-ID-->",             // 替换为您的帐户 ID (MID)
    "key": "<--API-KEY-->"             // 替换为您的 API 密钥
  };
</script>
<script src="https://web-resources.offer18.net/sdk/web/affiliate-api/OfferTable.js"></script>
```

{% endcode %}

#### 3. 添加您的联盟 API 详细信息

在 `OFFER18_API_CONFIG` 对象

* **aid**中：输入您独特的联盟 ID。&#x20;
* **mid**中：输入您的帐户 ID (MID)。
* **key**中：输入您的 API 密钥。

这些字段是 Affiliate Offer 表格 SDK 的必填项

***

### 附加配置选项

您可以通过向 `OFFER18_API_CONFIG` 对象添加可选参数来增强显示并自定义 Affiliate Offer 表格中优惠的过滤。下面列出了可用的附加配置选项。

<table data-header-hidden><thead><tr><th width="164"></th><th width="142"></th><th></th></tr></thead><tbody><tr><td><strong>参数</strong></td><td><strong>类型</strong></td><td><strong>描述</strong></td></tr><tr><td>fields</td><td>数组</td><td><p>指定要在表格中显示的字段，按提供的顺序。<br><br><strong>可用字段：</strong></p><pre class="language-html" data-overflow="wrap"><code class="lang-html">"offerid", "name", "logo", "status", "category", "price", "currency", "model", "date_start", "date_end", "preview_url", "offer_terms", "offer_kpi",  "capping", "events", "payout", "impression_url", "click_url", "authorized", "creatives", "targeting"
</code></pre></td></tr><tr><td>offer_id</td><td>字符串</td><td>以逗号分隔的特定优惠 ID 字符串以显示这些优惠。仅显示这些优惠。</td></tr><tr><td>page</td><td>字符串</td><td>指定分页的页码。</td></tr><tr><td>category</td><td>字符串</td><td>按特定类别（例如 “Finance”、“E-commerce”）过滤优惠。</td></tr><tr><td>model</td><td>字符串</td><td>指定优惠的模型，例如 CPA（按行动付费）或 CPL（按潜在客户付费）。</td></tr><tr><td>country</td><td>字符串</td><td>以逗号分隔的国家/地区代码列表，用于按位置过滤优惠。</td></tr><tr><td>offer_status</td><td>字符串</td><td>设置为 <code>"1"</code> 以仅显示活动优惠。</td></tr><tr><td>authorized</td><td>字符串</td><td>设置为 <code>"1"</code> 以仅显示已授权的优惠。</td></tr></tbody></table>

***

### 示例文件

下面是一个包含必需和可选参数的完整配置 `OFFER18_API_CONFIG` 对象示例：

```html
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
  <script>
    OFFER18_API_CONFIG = {
      "aid": "12345",
      "mid": "67890",
      "key": "000000000000000000000000000000",
       
       // 可选配置
      "fields": ["offerid", "name", "logo", "status", "category", "price", "currency", "model", "date_start", "date_end", "preview_url", "offer_terms", "offer_kpi",  "capping", "events", "payout", "impression_url", "click_url", "authorized", "creatives", "targeting"],        // 要显示的字段数组，按所需顺序
      "offer_id": "123,456,789",             // 以逗号分隔的特定优惠 ID 字符串
      "page": "1",                           // 要显示的页码
      "category": "Finance",                 // 要显示的优惠类别
      "model": "CPA",                        // 优惠的模型（例如 CPA、CPL）
      "country": "US,CA",                    // 以逗号分隔的国家代码列表
      "offer_status": "1",                   // 设置为 "1" 以仅显示活动优惠
      "authorized": "1"                      // 设置为 "1" 以仅显示已授权的优惠
    };
  </script>
  <script src="https://web-resources.offer18.net/sdk/web/affiliate-api/OfferTable.js"></script>
</body>

</html>
```


---

# 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:

```
GET https://knowledgebase.offer18.com/zh/lian-meng-huo-ban/lian-meng-huo-ban-api/sdk-lian-meng-huo-ban-offer-biao.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.
