← 返回目录
📁 API Reference › Catalog Product Sets

更新商品系列

您可以使用本接口更新已有商品系列的筛选条件和名称。您只需传入您希望修改的字段。

v1.2与v1.3版本对比

以下表格概括了 v1.2与v1.3接口的变化。 ``xtable |变化内容{30%}|v1.2{35%}|v1.3{35%}| |---|---|---| |接口路径|/v1.2/catalog/set/update/| /v1.3/catalog/set/update/| |请求参数名称|name|product_set_name| |请求参数类型|bc_id: number<br>catalog_id: number|bc_id: string<br>catalog_id: string| |请求参数名称和类型|set_id: number|product_set_id: string| |返回参数名称|name<br>count|product_set_name<br>product_count| |返回参数名称和类型|id: number|product_set_id`: string|


## 请求

**地址** https://business-api.tiktok.com/open_api/v1.3/catalog/set/update/

**方法** POST

**Header**
```xtable
|字段{30%}|类型{15%}|描述{55%}|
|--- |--- |--- |
|Access-Token {必填}|string|授权访问令牌。可以通过[获取访问令牌](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162)接口获取。|
|Content-Type {必填}|string|请求信息类型。<br>允许格式:`application/json`。|

参数

|字段{30%}|类型{15%}|描述{55%}|
|--- |--- |--- |
|bc_id {必填}|string|商务中心 ID。|
|catalog_id {必填}|string|商品库 ID。|
|product_set_id {必填}|string|商品系列 ID。|
|product_set_name{+条件必填}|string|`product_set_name` 和 `conditions` 需至少传入其中一个或同时传入。<br><br>商品系列名称。<br><br>长度限制:128 个字符。|
|conditions {+条件必填}|object|`product_set_name` 和 `conditions` 需至少传入其中一个或同时传入。<br><br>筛选条件。<br><br><p><span style="color:darkred"><b>注意</b></span>:若您通过本对象传入多个筛选条件,建议您在所有筛选条件中传入的预期值总数不超过1024个。否则,很可能出现请求超时。|
#|and/or {+条件必填}|object[]|传入`conditions` 时本字段必填。<br><br>筛选条件的交并情况,and:交集 or:并集。<br>只能选择其中一个。|
##|field {+条件必填}|string|传入`conditions` 时本字段必填。<br><br>筛选字段。枚举值请参考[商品系列运算符和筛选字段 - 筛选字段](https://ads.tiktok.com/marketing_api/docs?id=1740673108747265)。|
##|operation{+条件必填} |string|传入`conditions` 时本字段必填。<br><br>筛选运算符。枚举值请参考[商品系列运算符和筛选字段 - 运算符](https://ads.tiktok.com/marketing_api/docs?id=1740673108747265)。|
##|value{+条件必填} |string/string[]|传入`conditions` 时本字段必填。<br><br>预期值。<br><br>根据您通过`operation`字段指定的运算符,本字段可能是一个单独值或一个列表中的多个值。请查看[商品系列运算符和筛选字段 - 运算符](https://ads.tiktok.com/marketing_api/docs?id=1740673108747265)了解您需要指定的值。<br><br><p><span style="color:darkred"><b>注意</b></span>:若您通过本字段传入的值为多个,则最多传入1,024个值。|

示例:筛选规则

(code curl http)
curl -X POST -H "Access-Token:YOUR_ACCESS_TOKEN" \
-H "Content-Type:application/json" \
-d '{\"bc_id\": BC_ID,\"catalog_id\": CATALOG_ID,\"name\": NAME},\"conditions\": [CONDITIONS]}' \
https://business-api.tiktok.com/open_api/v1.3/catalog/set/update/
(/code)

返回

|字段|类型|描述|
|--- |--- |--- |
|code |number|返回码,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。|
|message |string|返回信息,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。|
|request_id|string|请求日志ID。|
|data|object|返回数据。|
#|product_set_id|string|商品系列ID。|
#|product_set_name|string|商品系列名称。|
#|product_count|number|该商品系列下的商品数量。|

示例

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "message": "OK",
    "code": 0,
    "data": {
        "count": 20,
        "product_set_id": "1566",
        "name": "test_create"
    },
    "request_id": "20210228131918010231010121650793"
}
(/code);

内容来源:TikTok API for Business 官方文档 · 本地归档

在接这个接口时卡住了?
Stuck wiring this API into production? We build ad-delivery tooling on these platforms — campaign automation, reporting pipelines, error-handling and migration between API versions.
联系我们 · Talk to us 每日平台更新简报 →