Get product sets
GET/catalog/set/get/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/catalog/set/get/
Description
Use this endpoint to get a list of product sets or one specified product set in a catalog under your Business Center.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok_business/catalog/set/get/
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | 7000000000000000001 | Tài sản TikTok Business đã kết nối — "Mã tài sản" ở trang Nền tảng hoặc GET /v1/platforms (tài khoản quảng cáo cho Marketing API, tài khoản TikTok cho Organic / Messaging). Có thể bỏ khi chỉ kết nối một tài sản. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| bc_id | query | string | Yes | Business Center ID. To obtain the list of Business Centers that you can access, use /bc/get/. | |
| catalog_id | query | string | Yes | The ID of the catalog that you want to get product sets from.
To obtain the list of catalogs that you can access, use /bc/asset/get/ and set asset_type to CATALOG. | |
| product_set_id | query | string | No | The ID of the product set that you want to get.
- If this field is not passed, the system will return the complete list of product sets associated with the catalog (catalog_id).
- If this field is passed, the system will only return the specified product set. | |
| return_product_count | query | boolean | No | Whether to return the response parameter product_count.
Supported values: true, false.
Default value: true.
Note: For product sets with too many products, returning product_count might trigger timeout errors. To avoid timeout issues in such cases, set this field to false. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok_business/catalog/set/get/?bc_id=&catalog_id=" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/tiktok_business/catalog/set/get/",
params={
"bc_id": "",
"catalog_id": ""
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/tiktok_business/catalog/set/get/');
for (const [k, v] of Object.entries({"bc_id":"","catalog_id":""})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/tiktok_business/catalog/set/get/' . '?' . http_build_query(['bc_id' => '', 'catalog_id' => '']); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $status, "\n", $res;
Response
Response fields (as returned by TikTok Business)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | number | The response code. For the complete list of response codes and descriptions, see Appendix - Return Codes. | |
| message | string | The response message. For details, see Appendix - Return Codes. | |
| request_id | string | The request ID. | |
| data | object | The returned data. | |
| list | object[] | A list of product sets. | |
| product_count | number | Returned only when `return_product_count` is `true` or not passed in the request. Number of products in this product set. | |
| product_set_id | string | The product set ID. | |
| catalog_id | string | The catalog ID. | |
| product_set_name | string | The name of the product set. | |
| conditions | object | The filter conditions. | |
| and/or | object[] | The logical operator that will be applied to multiple filter conditions. You must specify either `and` or `or`. `and` stands for the AND logical operator. `or` stands for the OR logical operator. | |
| field | string | The field that the filter will be applied to. For enum values, see Appendix - Product Set - Filter fields. | |
| operation | string | The filter operator. For enum values, see Appendix - Product Set - Operators. | |
| value | string/string[] | The expected value. |
Response sample
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);
Get started
- Sign up for Partner
- Enable a data type of the Ads (Marketing API) group on the platform page
- Create an API key (tick the TikTok Business channel)
- Call it as in the examples above