绑定商品库与事件源
您可以使用本接口将商务中心的商品库与事件源(应用事件源或网站Pixel事件源)进行绑定,以追踪相关数据。
v1.2与v1.3版本对比
以下表格概括了 v1.2与v1.3接口的变化。
``xtable
|变化内容{30%}|v1.2{35%}|v1.3{35%}|
|---|---|---|
|接口路径|/v1.2/catalog/eventsource_bind/create/|/v1.3/catalog/eventsource/bind/|
|请求参数类型|bc_id: number<br>advertiser_id: number<br>catalog_id: number|bc_id: string <br>advertiser_id: string<br>catalog_id`: string|
## 请求
**地址** <https://business-api.tiktok.com/open_api/v1.3/catalog/eventsource/bind/>
**方法** POST
**Header**
```xtable
|字段|类型|描述|
|---|---|---|
|Access-Token {必填}|string|授权访问令牌。可以通过[获取访问令牌](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162)接口获取。|
|Content-Type {必填}|string|请求信息类型。<br>允许格式:`application/json`。|
参数
|字段|类型|描述|
|---|---|---|
|advertiser_id {必填}|string| 广告主ID。 |
|bc_id {必填}|string| 商务中心ID。|
|catalog_id {必填}|string| 商品库ID。|
|app_id| string| 移动应用ID。您可以在TikTok Ads Manager中进入<strong>资产</strong> > <strong>事件</strong> > <strong>应用事件</strong>中获取。您至少需要传入移动应用ID(`app_id`)或者网站Pixel代码(`pixel_code`)两者之一。若您想要同时绑定应用事件和网页事件,可以两者都传入。|
|pixel_code|string| 网站Pixel代码。您可以在TikTok Ads Manager中进入<strong>资产</strong> > <strong>事件</strong> > <strong>网页事件</strong>中获取。您至少需要传入移动应用ID(`app_id`)或者网站Pixel代码(`pixel_code`)两者之一。若您想要同时绑定应用事件和网页事件,可以两者都传入。|
示例
(code curl http)
curl --location --request POST https://business-api.tiktok.com/open_api/v1.3/catalog/eventsource/bind/
--header 'Access-Token: {{Access-Token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"advertiser_id": "{{advertiser_id}}",
"bc_id": "{{bc_id}}",
"catalog_id": "{{catalog_id}}",
"app_id": "{{app_id}}"
}'
(/code)
返回
|字段|类型|描述|
|---|---|---|
|code |number|返回码,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。|
|message |string|返回信息,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。|
示例
(code Success-Response http)
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "{{request_id}}",
"data": {}
}
(/code)