> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/account-administration/account-settings/notifications/enable-event-notification-postbacks-for-brands.md).

# 为品牌启用事件通知回传

事件通知回传（webhooks）在特定事件发生时会实时通知您的内部系统。虽然发送的数据因事件而异，但配置流程对所有事件都相同。

{% stepper %}
{% step %}

### 访问事件通知回传

1. 在顶部导航栏中，选择 ![](/files/1cbb667ec4878308f24ec4acd13cbf03ede0bdfe) **\[用户资料] → 设置**.
2. 在……下的 *技术* 部分中，选择 [**事件通知**](https://app.impact.com/secure/advertiser/accountSettings/techintegration/view-edit-adv-pingback-settings-flow.ihtml?).
   {% endstep %}

{% step %}

### 填写全局配置字段

1. 将鼠标悬停在要配置通知回传的事件上，然后选择 ![](/files/ae87ea28f541bc1749d482fcfdb423e5cb4965f8) **\[编辑]**.
2. 使用下表配置投递设置：

| 字段               | 说明                                                                                                                                                                                           |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL              | 您服务器上接收数据的端点。                                                                                                                                                                                |
| HTTP 方法          | <p><code>GET</code>：数据将作为查询字符串附加到 URL。</p><p></p><p><code>POST</code>：数据将发送到请求正文中，其中包含您可设置的各种可选参数。<br><br>参见 <a href="#notification-events-and-payloads">通知事件和负载</a> 以了解每个事件及其负载内容的更多信息。</p> |
| HTTP 头           | （可选）添加用于身份验证的自定义标头（例如， `Authorization: Bearer token`).                                                                                                                                       |
| 最小延迟             | 设置 *最小延迟* 为秒，以保护您的服务器免受流量激增影响。                                                                                                                                                               |
| 最大请求数            | 设置 *最大请求数* 每秒，以保护您的服务器免受流量激增影响。                                                                                                                                                              |
| 成功响应             | 当回传正确处理时，您的服务器返回的特定文本字符串或 HTTP 状态码。                                                                                                                                                          |
| 错误响应             | 表示失败的文本字符串或状态码（例如， `ERROR` 或 `500`).                                                                                                                                                         |
| {% endstep %}    |                                                                                                                                                                                              |
| {% endstepper %} |                                                                                                                                                                                              |

### 通知事件与负载

每个事件通知都会发送一组独特的可配置数据点（例如， `{ActionId}`）。请参阅下面的事件，以了解可从负载中提取哪些数据点。

<details>

<summary><strong>操作生命周期事件</strong></summary>

当某个操作被跟踪、修改或撤销时，操作生命周期事件将向指定 URL（以及其中包含的任何参数）发出 HTTP 请求。

```json
// JSON 格式的 POST 示例
{
  "CampaignId": 9876, // 项目ID
  "ActionTrackerId": 12345, // 事件类型ID
  "MediaPartnerId": 555, // 合作伙伴ID
  "CampaignName": "Spring Global Promotion", // 项目名称
  "ActionTrackerName": "Standard Sale Tracker", // 事件类型名称
  "MediaPartnerName": "Top Tier Affiliates", // 合作伙伴名称
  "ActionId": "ACT-778899", // 操作ID
  "Status": "MODIFIED", // 操作状态
  "StatusDetail": "Item return - payout adjusted", // 关于操作状态的更多详情
  "AdId": 44332, // 广告ID
  "Payout": 10.50, // 分配给合作伙伴的操作佣金，以合作伙伴的货币计
  "DeltaPayout": -5.00, // 佣金金额变动
  "IntendedPayout": 15.50, // 超额操作的预期佣金金额
  "Amount": 100.00, // 操作金额，以账户货币计
  "DeltaAmount": -50.00, // 来自上一笔操作的更正后金额
  "IntendedAmount": 150.00, // 超额操作的预期销售金额
  "Currency": "USD", // 操作的货币
  "OriginalCurrency": "USD", // 操作的原始（即购物车）货币
  "OriginalAmount": 100.00, // 操作的原始（即购物车）金额
  // "items" 集合：此操作中各个商品的数据
  "items": [{join(items, i, 
  "\{\"sku\":\"{i.sku}\",
  \"item_price\":{i.amt},
  \"category\":\"{i.cat}\",
  \"quantity\":{i.qty},
  \"cartamt\":{i.cartamt},
  \"rbt\":\"{i.rbt}\",
  \"name\":\"{i.name}\"\}")}],
  "EventDate": "2026-04-08T09:00:00Z", // 转化日期
  "CreationDate": "2026-04-08T09:05:00Z", // 在系统中创建的日期
  "LockingDate": "2026-05-08T00:00:00Z", // 操作将被锁定的日期
  "ClearedDate": "2026-05-15T00:00:00Z", // 计划清算日期
  "ReferringDomain": "blog.partner.com", // 引荐域名
  "LandingPageUrl": "https://brand.com/sale", // 着陆页 URL
  "RefCustomerArea": "California", // 客户地区（由 IP 推导）
  "RefCustomerCity": "San Francisco", // 客户城市（由 IP 推导）
  "RefCustomerRegion": "CA", // 客户区域（由 IP 推导）
  "RefCustomerCountry": "US", // 客户国家代码（由 IP 推导）
  "RefClickId": "CLK9988776655", // 唯一点击标识符
  "SharedId": "social_post_01", // 合作伙伴共享 ID
  "PromoCode": "SAVE20", // 通用促销代码
  "CustomerStatus": "EXISTING", // 客户状态
  "Oid": "ORD-554433", // 订单 ID
  "Note": "Partial return processed", // 随操作提供的备注
  "CustomerPostCode": "94105", // 客户邮政编码
  "CustomerCity": "San Francisco", // 客户城市
  "CustomerCountry": "US", // 客户国家代码
  "CustomerRegion": "CA", // 客户区域
  "CustomerId": "CUST-12345", // 客户 ID
  "CustomerEmail": "a665a45920422f9d417...", // 哈希后的客户邮箱
  "IpAddress": "192.168.1.1", // IP 地址
  "CallerId": null, // 来电号码
  // 自定义补充字段
  "Text1": "Custom Val 1", // 文本 1
  "Date1": "2026-04-08", // 日期 1
  "Money1": 10.00, // 金额 1
  "Numeric1": 1, // 数值 1
  // 设备与应用元数据
  "appPackage": "com.brand.app", // 移动应用包名
  "appName": "BrandStore", // 移动应用名称
  "appVersion": "4.2.1", // 移动应用版本
  "deviceOs": "iOS", // 设备操作系统
  "deviceOsVersion": "17.4", // 设备操作系统版本
  "deviceManuf": "Apple", // 设备制造商
  "deviceModel": "iPhone 15", // 设备型号
  "macAddress": "00:1B:44:11:3A:B7", // MAC 地址（大写）
  "macAddressLower": "00:1b:44:11:3a:b7", // MAC 地址（小写）
  "macAddressAlpha": "001B44113AB7", // MAC 地址（无冒号）
  "macAddressSha1": "47a32...", // MAC SHA1
  "iosIfa": "EA7583CD-A667-48BC-B806-42ECB2B48606", // iOS 广告标识符
  "iosAdTracking": "1", // iOS 广告跟踪设置
  "androidId": null, // Android ID
  "deviceId": "D-556677", // 设备 ID
  "deviceIp": "192.168.1.1" // 设备 IP
}
```

</details>

<details>

<summary><strong>操作查询事件</strong></summary>

当创建或解决操作查询时，操作查询事件将向指定 URL（以及其中包含的任何参数）发出 HTTP 请求。

```json
// JSON 格式的 POST 示例
{
  "Id": 554433, // 系统中该操作查询的唯一标识符
  "MediaPartnerId": 555, // 合作伙伴ID
  "MediaPartnerName": "Top Tier Affiliates", // 合作伙伴名称
  "CampaignId": 9876, // 项目ID
  "CampaignName": "Spring Global Promotion", // 项目名称
  "OrderId": "ORD-12345", // 已报告操作的订单 ID
  "TransactionDate": "2026-04-01T14:30:00Z", // 触发操作查询的事件交易日期
  "TransactionAmount": 250.00, // 触发操作查询的事件交易金额
  "InquiryType": "MISSING_ACTION", // 操作查询类型
  "ExpectedPayout": 25.00, // 合作伙伴预期的佣金金额
  "ResolutionDeadlineDate": "2026-05-01T00:00:00Z", // 查询必须被接受或拒绝的日期
  "TrackingLink": "https://proweb.com/click?cid=1&pid=555", // 合作伙伴提供的跟踪链接
  "ActionId": "ACT-999000", // 操作 ID（如关联到现有操作）
  "AutoApprovalDate": "2026-05-05T00:00:00Z", // 系统将运行自动批准规则的日期
  "ResolutionStatus": "PENDING", // 操作查询的最终处理状态
  "RejectReason": null, // 操作查询被拒绝的原因
  "FinalPayout": 0.00, // 与操作查询相关的最终佣金
  "ResolutionDate": null, // 查询作出决定的日期
  "CreationDate": "2026-04-08T10:05:00Z", // 查询在系统中创建的日期
  "InquiryNotes": "Customer claims they clicked the link but no credit was shown.", // 合作伙伴提交的查询备注
  "ResolutionNotes": null, // 查询作出决定时提交的备注
  "Comments": "[{\"user\": \"support_agent\", \"text\": \"Verifying click logs now.\"}, {\"user\": \"partner\", \"text\": \"Customer provided receipt.\"}]" // 添加到查询中的评论（JSON 格式）
}
```

</details>

<details>

<summary><strong>操作清算事件</strong></summary>

当操作被清算时，操作清算事件将向指定 URL（以及其中包含的任何参数）发出 HTTP 请求。

```json
// JSON 格式的 POST 示例
{
  "ActionTrackerId": 12345, // 事件类型ID
  "ActionTrackerName": "Standard Sale Tracker", // 事件类型名称
  "CampaignId": 9876, // 项目ID
  "CampaignName": "Spring Global Promotion", // 项目名称
  "MediaPartnerId": 555, // 合作伙伴ID
  "MediaPartnerName": "Top Tier Affiliates", // 合作伙伴名称
  "OrderIds": "ORD-9921,ORD-9922", // 已报告操作的订单 ID（以逗号分隔）
  "ActionIds": "ACT-101,ACT-102", // 操作 ID（以逗号分隔）
  "ClearedDate": "2026-04-15T12:00:00Z", // 操作计划清算日期（ISO 8601）
  "LedgerDate": "2026-04-08T09:54:43Z" // 操作清算日期（ISO 8601）
}
```

</details>

<details>

<summary><strong>跟踪价值请求事件</strong></summary>

当创建跟踪请求时，跟踪价值请求事件将向指定 URL（以及其中包含的任何参数）发出 HTTP 请求。

```json
// JSON 格式的 POST 示例
{
  "CampaignId": 9876, // 项目ID
  "ActionTrackerId": 12345, // 事件类型ID
  "MediaPartnerId": 555, // 合作伙伴ID
  "ActionId": "ACT-778899", // 操作ID
  "Amount": 150.00, // 账户货币中的操作金额
  "Currency": "USD", // 操作的货币
  "Oid": "ORD-554433", // 订单 ID
  // "items" 集合：此操作中各个商品的明细
  "items": [{join(items, i, "\{\"sku\":\"{i.sku}\",\"item_price\":{i.amt},\"category\":\"{i.cat}\",\"quantity\":{i.qty},\"cartamt\":{i.cartamt},\"rbt\":\"{i.rbt}\",\"name\":\"{i.name}\"\}")}],
  "EventDate": "2026-04-08T09:00:00Z", // 转化日期
  "IpAddress": "192.168.1.1", // 设备的 IP 地址
  "RefClickId": "CLK9988776655" // 唯一点击标识符
}
```

</details>

<details>

<summary><strong>已完成作业事件</strong></summary>

当某个作业已完成时，已完成作业事件将向指定 URL（以及任何附加参数）发出 HTTP 请求，以用于 [报告导出](https://integrations.impact.com/impact-brand/reference/export-reports) 或 [点击导出](https://integrations.impact.com/impact-brand/reference/retrieve-export-click).

```json
// JSON 格式的 POST 示例
{
  "JobId": 10293847, // 作业的唯一 ID
  "JobType": "REPORT_EXPORT", // 作业类型
  "AccountId": 7744, // 账户 ID
  "StartDate": "2026-04-08T10:00:05Z", // 作业开始时间
  "EndDate": "2026-04-08T10:11:02Z", // 作业完成时间
  "RecordsProcessed": 5240, // 已处理或生成的记录数
  "ApiJobDetailUri": "https://api.impact.com/jobs/10293847", // 用于获取更多作业详细信息的 API URI
  "ApiResultUri": "https://api.impact.com/jobs/10293847/result", // 用于获取作业输出结果的 API URI
  "ResultDownloadUrlExp5": "https://download.impact.com/file?token=a1b2...&exp=5min", // 下载输出结果的 URL（5 分钟有效期）
  "ResultDownloadUrlExp15": "https://download.impact.com/file?token=a1b2...&exp=15min", // 下载输出结果的 URL（15 分钟有效期）
  "ResultDownloadUrlExp30": "https://download.impact.com/file?token=a1b2...&exp=30min", // 下载输出结果的 URL（30 分钟有效期）
  "ResultDownloadUrlExp60": "https://download.impact.com/file?token=a1b2...&exp=60min" // 下载输出结果的 URL（60 分钟有效期）
}
```

</details>

<details>

<summary><strong>发布者申请事件</strong></summary>

{% hint style="success" %}
**注意：** 此功能目前处于测试版。请联系您的 CSM 或我们的 [支持团队](https://app.impact.com/support/portal.ihtml?createTicket=true&) ，如果您想测试此功能。
{% endhint %}

当合作伙伴提交申请以及每次申请被批准、拒绝或撤回时，发布者申请事件将向指定 URL 发出 HTTP 请求。

如果 `PENDING` 负载传送时数据点为空，系统会在信息可用时触发更新。后续成功传送将填充之前为空的字段，确保您的记录与最新处理信息保持同步。

{% hint style="warning" %}
**重要：** 如果您有 [申请工作流](/brand/zh/what-would-you-like-to-learn-about/platform-features/review-partner-applications/automate-partner-application-processing.md) 配置，它们会在 webhook 触发前运行。webhook 会携带产生的 *状态*: `APPROVED` 或 `REJECTED` 如果工作流处理了该申请， `PENDING` 如果未应用任何工作流，或 `RETRACTED` 如果合作伙伴撤回了申请。
{% endhint %}

负载内容因 *状态*而异。下面的示例展示了一个 `PENDING` 事件，注释标明其他状态会出现哪些字段。

```json
// JSON 格式的 POST 示例
{
  "Status": "PENDING", // 申请状态：PENDING、APPROVED、REJECTED、RETRACTED
  "ProgramId": "9876", // 项目ID
  "TemplateTermsId": "4455", // 模板条款ID
  "ContractId": "112233", // 合同ID
  "ApplicationDate": "2026-04-09T08:30:00Z", // 申请日期
  "PublisherSignerName": "Sarah Chen", // 处理该申请的发布者用户
  "PublisherId": "555", // 合作伙伴ID
  "Name": "Elite Content Creators", // 合作伙伴名称
  "BusinessModel": "SOCIAL_INFLUENCER", // 合作伙伴的主要商业模式
  "Address": "123 Marketing Way", // 街道地址
  "City": "Los Angeles", // 城市
  "State": "CA", // 州/省
  "Country": "US", // 国家

  // 仅适用于 APPROVED、REJECTED、RETRACTED
  "DecisionDate": null, // 决定日期

  // 仅适用于 APPROVED
  "ContractStartDate": null, // 合同开始日期

  // 仅适用于 REJECTED
  "DeclineReason": null, // 拒绝原因

  // 仅适用于 APPROVED、REJECTED
  "AdvertiserSignerName": null, // 广告主处理用户

  // 仅适用于 PENDING：合作伙伴资料字段
  "Description": "A premium network of lifestyle and travel influencers.", // 合作伙伴资料描述
  "Language": "en-US", // 语言
  "PublisherSize": "M", // XS、S、M、L、XL
  "PastRelationship": "false", // 表示是否有过先前合同的布尔值
  "MarketplaceApproved": "true", // 表示是否已通过市场审核的布尔值
  "ReceivedPayout": "true", // 表示是否已收到佣金的布尔值

  // 仅适用于 PENDING：与合作伙伴关联的媒体属性
  "properties": [{join(properties, i, "{\"platform\":\"{i.platform}\",\"verified\":\"{i.verified}\",\"url\":\"{i.url}\",\"category\":\"{i.category}\",\"reach\":\"{i.reach}\",\"engagementRate\":\"{i.engagementRate}\",\"audienceCountryPct\":\"{i.audienceCountryPct}\",\"audienceGenderPct\":\"{i.audienceGenderPct}\",\"audienceAgeRangePct\":\"{i.audienceAgeRangePct}\"}")}],

  // 仅适用于 PENDING：创作者人口统计字段
  "CreatorIncome": "", // 家庭收入
  "CreatorGender": "", // 性别
  "CreatorEthnicity": "", // 族裔
  "CreatorEducation": "", // 教育程度
  "CreatorRelationshipStatus": "", // 关系状态
  "CreatorParentalStatus": "", // 为人父母状态
  "CreatorPronouns": "", // 代词
  "CreatorDOB": "", // 出生日期

  // 仅适用于 PENDING：组 ID
  "GroupIds": "1001,1002,1003" // 以逗号分隔的组 ID
}
```

</details>

### 回传重试机制

如果在尝试向目标 URL 发布时回传失败，传递将根据预设计划自动重试，最多 15 次。重试有助于处理临时网络问题或服务器不可用。

#### 不会进行重试的情况

在以下情况下，回传不会重试：

* 目标 URL 格式错误或无效。
* 目标 URL 或其主机无法解析，例如由于 DNS 查询失败。

#### 重试计划

重试尝试遵循以下计划。如果 HTTP 响应代码位于 `400` 到 `500`.

<details>

<summary>重试计划参考</summary>

<table><thead><tr><th width="321.0546875">重试次数</th><th>重试前延迟</th></tr></thead><tbody><tr><td>重试 1</td><td>+15 秒</td></tr><tr><td>重试 2</td><td>+15 秒</td></tr><tr><td>重试 3</td><td>+15 秒</td></tr><tr><td>重试 4</td><td>+3 分钟</td></tr><tr><td>重试 5</td><td>+3 分钟</td></tr><tr><td>重试 6</td><td>+15 分钟</td></tr><tr><td>重试 7</td><td>+15 分钟</td></tr><tr><td>重试 8</td><td>+15 分钟</td></tr><tr><td>重试 9</td><td>+2 小时</td></tr><tr><td>重试 10</td><td>+2 小时</td></tr><tr><td>重试 11</td><td>+2 小时</td></tr><tr><td>重试 12</td><td>+6 小时</td></tr><tr><td>重试 13</td><td>+6 小时</td></tr><tr><td>重试 14</td><td>+6 小时</td></tr><tr><td>重试 15</td><td>+6 小时</td></tr></tbody></table>

</details>


---

# 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://help.impact.com/brand/zh/what-would-you-like-to-learn-about/account-administration/account-settings/notifications/enable-event-notification-postbacks-for-brands.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.
