获取 TikTok Shop 中的商品
您可以使用本接口获取第一方商店(TikTok Shop)中的商品。
请求
地址 https://business-api.tiktok.com/open_api/v1.3/store/product/get/
方法 GET
Header
|字段{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)。 |
| store_id {必填} | string | TikTok Shop ID。<br><br>若想获取与广告账号绑定的 TikTok Shop ID 列表,可使用[/store/list/](1793482248880130.html)。 |
| filtering | object | 筛选条件。 |
#| item_group_ids| string[] | 商品的 SPU(标准化产品单元)ID 列表。<br><br>最大数量:10。 |
#| ad_creation_eligible | string | 商品可用于的广告或推广系列类型。<br><br> 枚举值:<ul><li>`CUSTOM_SHOP_ADS`:购物广告,包括[视频购物广告](1750361719059457.html)和[商品购物广告](1785886237030401.html)。</li><li>`GMV_MAX`:[商品 GMV Max 推广系列](1822009220448257.html)。</li></ul><br>若不传入本字段,返回中将不包含商品是否对于商品 GMV Max 推广系列可用的信息。 |
#| product_name | string | 商品名称。 |
| advertiser_id {+条件必填} | string | 传入 `ad_creation_eligible` 时本字段必填。 <br><br>广告主 ID。|
| sort_field | string | 排序字段。<br><br>枚举值:<ul><li> `min_price`:返回字段 `min_price`。</li><li> `historical_sales`:返回字段`historical_sales` 。</li></ul> |
| sort_type | string | 排序类型。<br><br> 枚举值:<ul><li> `ASC`:升序。</li><li> `DESC`:降序。</li></ul> |
| page | integer | 当前页数。 <br><br> 默认值: 1。<br><br>取值范围: ≥ 1。 |
| page_size | integer | 分页大小。 <br><br>默认值: 10。 <br><br>取值范围: 1-100。 |
示例
获取商品 GMV Max 推广系列可用的商品
(code curl http)
curl --location --request GET 'https://business-api.tiktok.com/open_api/v1.3/store/product/get/?store_id={{store_id}}&bc_id={{bc_id}}&filtering={"ad_creation_eligible":"GMV_MAX"}&advertiser_id={{advertiser_id}}&page_size=100' \
--header 'Access-Token: {{Access-Token}}'
(/code)
获取购物广告可用的商品
(code curl http)
curl --location --request GET 'https://business-api.tiktok.com/open_api/v1.3/store/product/get/?store_id={{store_id}}&bc_id={{bc_id}}&filtering={"ad_creation_eligible":"CUSTOM_SHOP_ADS"}&advertiser_id={{advertiser_id}}&page_size=100' \
--header 'Access-Token: {{Access-Token}}'
(/code)
不使用筛选字段 ad_creation_eligible,仅获取 TikTok Shop 中的商品
(code curl http)
curl --location --request GET 'https://business-api.tiktok.com/open_api/v1.3/store/product/get/?bc_id={{bc_id}}&store_id={{store_id}}&page_size=100' \
--header 'Access-Token: {{Access-Token}}'
(/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| 返回数据。 |
#|store_products | object[] |TikTok Shop 中的商品列表。 |
##| store_id | string | TikTok Shop ID。 |
##| item_group_id | string | 商品的 SPU ID。 |
##| catalog_id {-已废弃}| string | 商品(`item_group_id`)所属的商品库 ID。 <br><br><p><span style="color:darkred"><b>注意</b></span>:自 2024 年 6 月 30 日起,本字段返回 null 值。|
##| title | string | 商品的标题。 |
##| product_image_url | string | 商品图片的 URL 。 |
##| min_price | string | 商品的最低价格。<br><br><p><span style="color:darkred"><b>注意</b></span>:若您仅为商品设置了一个固定价格,则 `min_price` 和 `max_price` 将返回相同的值。 |
##| max_price | string | 商品的最高价格。<br><br><p><span style="color:darkred"><b>注意</b></span>:若您仅为商品设置了一个固定价格,则 `min_price` 和 `max_price` 将返回相同的值。 |
##| currency | string | 商品价格(`min_price` 和 `max_price`)对应的币种代码。<br><br>若想了解币种代码对应的币种,请查看[不同币种的预算校验比例和取值范围](1737585839634433.html)。 |
##| historical_sales | number | 商品的历史销售额,即该商品已销售的数量。 |
##| category | string | 商品的分类。 |
##| quantity | number | TikTok Shop 中商品的数量。<br><br>示例:5。 |
##| status | string | 商品的状态。<br><br>枚举值:<ul><li>`AVAILABLE`:商品可用于创建广告。</li><li>`NOT_AVAILABLE`:商品不可用于创建广告。</li></ul> |
##| gmv_max_ads_status | string | 仅当请求中传入筛选字段 `ad_creation_eligible` 时返回本字段。<br><br> 该商品在处于启用状态的商品 GMV Max 推广系列中的状态。<br><br> 枚举值: <ul><li>`OCCUPIED`:该商品已被处于启用状态的商品 GMV Max 推广系列占用。 </li><li>`UNOCCUPIED`: 该商品未被处于启用状态的商品 GMV Max 推广系列占用。</li></ul><br><p><span style="color:darkred"><b>注意</b></span>:若 `status` 为 `AVAILABLE` 且 `gmv_max_ads_status` 为 `UNOCCUPIED`,则该商品可用于商品 GMV Max 推广系列。 |
##| is_running_custom_shop_ads | boolean | 仅当请求中筛选字段 `ad_creation_eligible` 设置为 `GMV_MAX` 时返回本字段。 <br><br>该商品是否被处于启用状态的视频购物广告或商品购物广告占用。<br><br> 支持的值:`true`,`false`。 <br><br> 若 `is_running_custom_shop_ads` 为 `true`,您可调用 [/gmv_max/occupied_custom_shop_ads/list/](1822001136924674.html) 并将 `occupied_asset_type` 设置为 `SPU`,从而找出正在使用此商品的处于启用状态的视频购物广告或商品购物广告。若想暂停这些广告,可使用[/ad/status/update/](1739953422970882.html) ,并将 `operation_status` 设置为 `DISABLE`。|
#| page_info | object | 分页信息。 |
##| page | number | 当前页码。 |
##| page_size | number | 当前页面大小。 |
##| total_number | number | 结果总数。 |
##| total_page | number | 总页数。 |
示例
获取商品 GMV Max 推广系列可用的商品
(code Success-Response http)
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "{{request_id}}",
"data": {
"store_products": [
{
"status": "AVAILABLE",
"product_image_url": "{{product_image_url}}",
"catalog_id": null,
"category": "{{category}}",
"historical_sales": 0,
"quantity": 2,
"item_group_id": "{{item_group_id}}",
"max_price": "1000",
"store_id": "{{store_id}}",
"min_price": "1000",
"currency": "IDR",
"title": "{{title}}",
"gmv_max_ads_status": "OCCUPIED",
"is_running_custom_shop_ads": true
},
{
"status": "AVAILABLE",
"product_image_url": "{{product_image_url}}",
"catalog_id": null,
"category": "{{category}}",
"historical_sales": 0,
"quantity": 2,
"item_group_id": "{{item_group_id}}",
"max_price": "100",
"store_id": "{{store_id}}",
"min_price": "100",
"currency": "IDR",
"title": "{{title}}",
"gmv_max_ads_status": "OCCUPIED",
"is_running_custom_shop_ads": false
}
],
"page_info": {
"total_number": 2,
"page_size": 100,
"page": 1,
"total_page": 1
}
}
}
(/code)
获取购物广告可用的商品
(code Success-Response http)
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "{{request_id}}",
"data": {
"page_info": {
"page": 1,
"total_number": 2,
"page_size": 100,
"total_page": 1
},
"store_products": [
{
"category": "{{category}}",
"currency": "IDR",
"max_price": "1000",
"catalog_id": null,
"gmv_max_ads_status": "UNOCCUPIED",
"product_image_url": "{{product_image_url}}",
"historical_sales": 0,
"quantity": 2,
"store_id": "{{store_id}}",
"item_group_id": "{{item_group_id}}",
"title": "{{title}}",
"status": "AVAILABLE",
"min_price": "1000"
},
{
"category": "{{category}}",
"currency": "IDR",
"max_price": "100",
"catalog_id": null,
"gmv_max_ads_status": "UNOCCUPIED",
"product_image_url": "{{product_image_url}}",
"historical_sales": 0,
"quantity": 2,
"store_id": "{{store_id}}",
"item_group_id": "{{item_group_id}}",
"title": "{{title}}",
"status": "AVAILABLE",
"min_price": "100"
}
]
}
}
(/code)
不使用筛选字段 ad_creation_eligible,仅获取 TikTok Shop 中的商品
(code Success-Response http)
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "{{request_id}}",
"data": {
"page_info": {
"total_page": 1,
"page": 1,
"page_size": 100,
"total_number": 2
},
"store_products": [
{
"currency": "GBP",
"category": "Fashion Accessories > Eyewear > Glasses Cases & Accessories",
"catalog_id": "{{catalog_id}}",
"max_price": "0.07",
"status": "AVAILABLE",
"title": "{{title}}",
"product_image_url": "{{product_image_url}}",
"store_id": "{{store_id}}",
"item_group_id": "{{item_group_id}}",
"min_price": "0.07",
"quantity": 2,
"historical_sales": 18
},
{
"currency": "GBP",
"category": "Womenswear & Underwear > Women's Tops > Vests",
"catalog_id": "{{catalog_id}}",
"max_price": "0.7",
"status": "NOT_AVAILABLE",
"title": "{{title}}",
"product_image_url": "{{product_image_url}}",
"store_id": "{{store_id}}",
"item_group_id": "{{item_group_id}}",
"min_price": "0.7",
"quantity": 2,
"historical_sales": 0
}
]
}
}
(/code)