← 返回目录
📁 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/get/| /v1.3/catalog/set/get/| |请求参数类型|bc_id: number<br>catalog_id: number|bc_id: string<br>catalog_id: string| |请求参数名称和类型|set_id: number|product_set_id: string| |新增请求参数| / |return_product_count| |返回参数名称|count<br>name|product_count<br>product_set_name| |返回参数类型|catalog_id: number|catalog_id: string| |返回参数名称和类型 |id: number|product_set_id`: string|


## 请求

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

**方法** GET

**Header**

```xtable
|字段{30%}|类型{15%}|描述{55%}|
|--- |--- |--- |
|Access-Token {必填}|string|授权访问令牌。可以通过[获取访问令牌](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162)接口获取。|

参数

|字段{30%}|类型{15%}|描述{55%}|
|--- |--- |--- |
| bc_id{必填} | string | 商务中心 ID。<br><br> 若想获取您有权访问的商务中心列表,可使用[/bc/get/](1737115687501826.html)。 |
| catalog_id{必填} | string | 商品库 ID。 <br><br>若想获取您有权访问的商品库列表,可使用[/bc/asset/get/](1739432717798401.html)并将 `asset_type` 设置为 `CATALOG`。 |
| product_set_id | string | 商品系列 ID。<br><br><ul><li>若未不传入本字段,系统将返回与商品库(`catalog_id`)绑定的所有商品系列。</li><li>若传入了本字段,系统将返回指定的商品系列。</li></ul> |
| return_product_count| boolean | 是否返回参数 `product_count`。<br><br>支持的值:`true`,`false`。 <br> 默认值:`true`。 <br><br><p><span style="color:darkred"><b>注意</b></span>:若商品系列中的商品过多,返回 `product_count` 可能导致超时错误。若想避免此情况下的超时错误,可将本字段设置为 `false`。 |

示例

(code curl http)

curl -X GET -H "Access-Token:YOUR_ACCESS_TOKEN" \
--data-urlencode "bc_id=BC_ID" \
--data-urlencode "catalog_id=CATALOG_ID" \
--data-urlencode "product_set_id=SET_ID" \

https://business-api.tiktok.com/open_api/v1.3/catalog/set/get/
(/code)

返回

|字段{30%}|类型{15%}|描述{55%}|
|--- |--- |--- |
|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|返回数据。|
#|list|object[]|商品系列列表。|
##|product_count|number|仅当请求中`return_product_count`为`true`或未传入时返回本字段。 <br><br>该商品系列中的商品数量。|
##|product_set_id|string|商品系列ID。|
##|catalog_id|string|商品库ID。|
##|product_set_name|string|商品系列名称。|
##|conditions|object|筛选规则。|
###|and/or|object[]|筛选条件的交并情况,and:交集 or:并集<br>只能选择其中一个。|
####|field|string|筛选字段。枚举值请参考[附录-商品库管理-筛选字段](https://ads.tiktok.com/marketing_api/docs?id=1740673108747265)。|
####|operation|string|筛选运算符。枚举值请参考[附录-商品库管理-运算符](https://ads.tiktok.com/marketing_api/docs?id=1740673108747265)。|
####|value|string/string[]|预期值。|

示例

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "message": "OK",
    "code": 0,
    "data": {
        "list": [
            {                
                "product_set_id": "1767",
                "product_count": 8,
                "name": "test_create",
                "catalog_id": "6873077759237687045",
                "conditions": {
                    "or": [
                        {
                            "field": "price",
                            "operation": "LT",
                            "value": "250"
                        },
                        {
                            "field": "sale_price_effective_start_date",
                            "operation": "GTE",
                            "value": "2021-03-04 12:00:00"
                        }
                    ]
                }
            }
        ]
    },
    "request_id": "2021030908581701023102608005883C"
}
(/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 每日平台更新简报 →