> 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. 从顶部导航栏中，选择 ![](https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2F210dEQa93qyQgoJDkieL%2FUser%20profile.svg?alt=media\&token=f84c5b17-fae4-4a30-990a-9de5e57a150b) **\[用户资料] → 设置**.
2. 在 *技术* 部分下，选择 [**事件通知**](https://app.impact.com/secure/advertiser/accountSettings/techintegration/view-edit-adv-pingback-settings-flow.ihtml?).
   {% endstep %}

{% step %}

## 填写全局配置字段

1. 将鼠标悬停在要配置通知回传的事件上，并选择 ![](https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fkka3dqJOx8ZhiX82RDLt%2FEdit_light.svg?alt=media\&token=f454405c-ebd8-49af-90db-22efc27476bf) **\[编辑]**.
2. 使用下表配置投递设置：

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

## 通知事件和负载

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

<details>

<summary>动作生命周期事件</summary>

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

```json
// JSON 格式的 POST 示例
{
  "CampaignId": 9876, // 计划 ID
  "ActionTrackerId": 12345, // 事件类型 ID
  "MediaPartnerId": 555, // 合作伙伴 ID
  "CampaignName": "春季全球促销", // 计划名称
  "ActionTrackerName": "标准销售跟踪器", // 事件类型名称
  "MediaPartnerName": "顶级联盟伙伴", // 合作伙伴名称
  "ActionId": "ACT-778899", // 动作 ID
  "Status": "MODIFIED", // 动作状态
  "StatusDetail": "商品退货 - 佣金已调整", // 有关动作状态的更多详情
  "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>动作查询事件</summary>

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

```json
// JSON 格式的 POST 示例
{
  "Id": 554433, // 系统中该动作查询的唯一标识符
  "MediaPartnerId": 555, // 合作伙伴 ID
  "MediaPartnerName": "顶级联盟伙伴", // 合作伙伴名称
  "CampaignId": 9876, // 计划 ID
  "CampaignName": "春季全球促销", // 计划名称
  "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\": \"正在核实点击日志。\"}, {\"user\": \"partner\", \"text\": \"客户已提供收据。\"}]" // 添加到查询中的评论（JSON 格式）
}
```

</details>

<details>

<summary>动作清算事件</summary>

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

```json
// JSON 格式的 POST 示例
{
  "ActionTrackerId": 12345, // 事件类型 ID
  "ActionTrackerName": "标准销售跟踪器", // 事件类型名称
  "CampaignId": 9876, // 计划 ID
  "CampaignName": "春季全球促销", // 计划名称
  "MediaPartnerId": 555, // 合作伙伴 ID
  "MediaPartnerName": "顶级联盟伙伴", // 合作伙伴名称
  "OrderIds": "ORD-9921,ORD-9922", // 所报告动作的订单 ID（以逗号分隔）
  "ActionIds": "ACT-101,ACT-102", // 动作 ID（以逗号分隔）
  "ClearedDate": "2026-04-15T12:00:00Z", // 计划清算该动作的日期
  "LedgerDate": "2026-04-08T09:54:43Z" // 该动作被清算的日期
}
```

</details>

<details>

<summary>跟踪值请求事件</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>已完成任务事件</summary>

当某个任务已完成时，已完成任务事件将向指定的 URL（以及任何附加参数）发出 HTTP 请求。 [报表导出](https://integrations.impact.com/brand-api-reference/reference/report-export/report-export) 或 [点击导出](https://integrations.impact.com/brand-api-reference/reference/clicks/clickexport).

```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>发布者申请事件</summary>

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

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

发布者申请事件也称为合同事件回传、申请处理 webhook 或申请 webhook。

如果某个 `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 %}

要了解此 webhook 如何与 Recruitment Agent 协同工作，请参阅 [Recruitment Agent](/brand/zh/what-would-you-like-to-learn-about/platform-features/review-partner-applications/recruitment-agent.md#see-where-the-agent-fits-with-your-existing-automation).

负载内容因 *状态*而异。下面的示例显示了一个 `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": "一个高端的生活方式和旅行网红网络。", // 合作伙伴资料描述
  "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 响应代码位于以下范围内，则会跳过重试 1、2 和 3： `400` 进行 `500`.

<details>

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

<table><thead><tr><th width="180.5390625">重试尝试</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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
