VI | EN
Message us on Messenger
Developer resources

Get product sets — TikTok Business API

Get product sets · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

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

NameInTypeSampleDescription
AuthorizationheaderheaderBearer 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_idquerystring7000000000000000001Tà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

NameInTypeRequiredSampleDescription
bc_idquerystringYesBusiness Center ID. To obtain the list of Business Centers that you can access, use /bc/get/.
catalog_idquerystringYesThe 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_idquerystringNoThe 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_countquerybooleanNoWhether 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)

NameTypeSampleDescription
codenumberThe response code. For the complete list of response codes and descriptions, see Appendix - Return Codes.
messagestringThe response message. For details, see Appendix - Return Codes.
request_idstringThe request ID.
dataobjectThe returned data.
listobject[]A list of product sets.
product_countnumberReturned only when `return_product_count` is `true` or not passed in the request. Number of products in this product set.
product_set_idstringThe product set ID.
catalog_idstringThe catalog ID.
product_set_namestringThe name of the product set.
conditionsobjectThe filter conditions.
and/orobject[]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.
fieldstringThe field that the filter will be applied to. For enum values, see Appendix - Product Set - Filter fields.
operationstringThe filter operator. For enum values, see Appendix - Product Set - Operators.
valuestring/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

  1. Sign up for Partner
  2. Enable a data type of the Ads (Marketing API) group on the platform page
  3. Create an API key (tick the TikTok Business channel)
  4. Call it as in the examples above