tiktok.analytics.202610.acc.preferences.product.categories
GET/analytics/202610/acc/preferences/product/categoriesGọi qua 360: GET https://partner.quantri360.com/v1/tiktok/analytics/202610/acc/preferences/product/categories
Mô tả API
KHÔNG HỖ TRỢ VIỆT NAM: Lấy xếp hạng doanh số theo danh mục sản phẩm của khán giả, thương hiệu và khoảng ngày đã chọn. Kết quả gồm danh mục cấp 2 kèm danh mục cấp 3; sắp xếp và phân trang áp dụng cho danh mục cấp 2.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/tiktok/analytics/202610/acc/preferences/product/categories
Xác thực & gian hàng
| Tên | Vị trí | Kiểu | Mẫu | Mô tả |
|---|---|---|---|---|
| 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 | 100001 | Gian hàng (lấy ở GET /v1/platforms → shops[].platform_shop_id). BẮT BUỘC khi brand có > 1 gian hàng trên nền tảng; 360 bỏ tham số này trước khi chuyển tiếp. |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| brand_id | query | string | Có | 1000001 | ACC brand ID. Use a brand_id returned by Get ACC Brands (GET /analytics/202610/acc/brands) for the same shop. |
| industry_id | query | string | Có | 9000001 | ACC industry ID used with brand_id to determine available data dates. Use the industry_id returned alongside that brand by Get ACC Brands (GET /analytics/202610/acc/brands). |
| date | query | string | Không | 2026-09-20 | Inclusive end date of the data window, in UTC using YYYY-MM-DD format. Defaults to the latest available date when omitted. The entire trend_days window, including its start date, must fall between earliest_available_date and latest_available_date. Use the same date and trend_days as the Product Preference List request that will consume these category IDs. |
| trend_days | query | int | Không | 30 | Number of days in the data window, including date. Valid values: 7, 14, 30. Default: 30. The start date is date - (trend_days - 1) days. |
| audience_type | query | string | Có | CONVERSION | ACC audience segment used for the category ranking. Valid values: SHOP_NON_EXPOSED, SHOP_CLICKED_NOT_PURCHASED, CONVERSION, NEW_CONVERSION, REPEAT_CONVERSION, DTC_NEW_CONVERSION, DTC_REPEAT_CONVERSION. Segment definitions: SHOP_NON_EXPOSED means people not exposed to the shop; SHOP_CLICKED_NOT_PURCHASED means people who clicked the shop without purchasing; CONVERSION means people who completed a purchase; NEW_CONVERSION means first-time shop buyers; REPEAT_CONVERSION means repeat shop buyers. DTC_NEW_CONVERSION and DTC_REPEAT_CONVERSION select the corresponding DTC new-conversion and repeat-conversion cohorts. ACC, AWARENESS, CONSIDERATION, and the DRC-prefixed values are not supported by the preference APIs. |
| scope | query | string | Không | MY_SHOP | Scope of the category metrics. Valid values: MY_SHOP (shop data), MARKET (market data). Default: MY_SHOP. |
| keyword | query | string | Không | Makeup | Filter categories by a case-insensitive substring of a category ID or category name. The filter is applied before the category tree is built and paginated. Omit this parameter to disable keyword filtering. |
| sort_field | query | string | Không | GMV | Metric used to sort the level-2 categories. Valid values: GMV, CUSTOMERS, ORDERS. Default: GMV. Categories with equal values are ordered by category ID in ascending numeric order. Level-3 children are ordered separately by category ID. |
| sort_order | query | string | Không | DESC | Sort direction for level-2 categories. Valid values: ASC (ascending), DESC (descending). Default: DESC. |
| page_size | query | int | Không | 10 | Maximum number of level-2 categories per page. Allowed values: 10, 20, 50, 100. Default: 10. Level-3 children do not count toward this limit. |
| page_token | query | string | Không | cGFnZV9udW1iZXI9MQ== | Pagination token from next_page_token in the previous response. Omit this parameter for the first page. For subsequent pages, pass the returned token unchanged as page_token and keep all other request parameters unchanged. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/tiktok/analytics/202610/acc/preferences/product/categories?brand_id=1000001&industry_id=9000001&date=2026-09-20&trend_days=30&audience_type=CONVERSION&scope=MY_SHOP&keyword=Makeup&sort_field=GMV&sort_order=DESC&page_size=10&page_token=cGFnZV9udW1iZXI9MQ%3D%3D" \ -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/analytics/202610/acc/preferences/product/categories",
params={
"brand_id": "1000001",
"industry_id": "9000001",
"date": "2026-09-20",
"trend_days": 30,
"audience_type": "CONVERSION",
"scope": "MY_SHOP",
"keyword": "Makeup",
"sort_field": "GMV",
"sort_order": "DESC",
"page_size": 10,
"page_token": "cGFnZV9udW1iZXI9MQ=="
},
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/analytics/202610/acc/preferences/product/categories');
for (const [k, v] of Object.entries({"brand_id":"1000001","industry_id":"9000001","date":"2026-09-20","trend_days":30,"audience_type":"CONVERSION","scope":"MY_SHOP","keyword":"Makeup","sort_field":"GMV","sort_order":"DESC","page_size":10,"page_token":"cGFnZV9udW1iZXI9MQ=="})) 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/analytics/202610/acc/preferences/product/categories' . '?' . http_build_query(['brand_id' => '1000001', 'industry_id' => '9000001', 'date' => '2026-09-20', 'trend_days' => 30, 'audience_type' => 'CONVERSION', 'scope' => 'MY_SHOP', 'keyword' => 'Makeup', 'sort_field' => 'GMV', 'sort_order' => 'DESC', 'page_size' => 10, 'page_token' => 'cGFnZV9udW1iZXI9MQ==']); $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
Tham số phản hồi (nguyên của TikTok Shop)
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| code | int | 0 | The success or failure status code returned in API response. |
| message | string | Success | The success or failure messages returned in API response. Reasons of failure will be described in the message. |
| request_id | string | 202203070749000101890810281E8C70B7 | Request log |
| data | object | Specific return information | |
| categories | []object | Current page of level-2 category rankings, with their level-3 children after scope and keyword filtering. Sorting, page_size and page_token apply to this top-level list. | |
| category_id | string | 848648 | ID of the level-2 product category. Pass this ID as l2_category_id when querying PRODUCT in Get ACC Audience Preference List. These product category IDs are not the Market category IDs used for LIVE, VIDEO, or PHOTO. |
| category_level | int | 2 | Product category level. The value is 2 for this node. |
| category_name | string | Makeup | Name of the level-2 product category. |
| children | []object | Level-3 categories under this level-2 category, after scope and keyword filtering, ordered by category ID in ascending numeric order. This list is not paginated. | |
| category_id | string | 601529 | ID of the level-3 product category. To query PRODUCT preferences for this node, pass this ID as l3_category_id together with the parent level-2 category_id as l2_category_id. |
| category_level | int | 3 | Product category level. The value is 3 for this node. |
| category_name | string | Makeup Sets | Name of the level-3 product category. |
| metrics | object | Sales metrics reported for this level-3 category and the selected audience, scope and date window. | |
| customers | string | 4210 | Reported customer count for this category and the selected audience, scope and date window. |
| gmv_range | string | $331,451.00 ~ $331,500.00 | Formatted gross merchandise value (GMV) range for this category, in the shop's currency. Zero is shown as a formatted zero amount. |
| orders | string | 8566 | Reported order count for this category and the selected audience, scope and date window. |
| metrics | object | Sales metrics reported for this level-2 category and the selected audience, scope and date window, when available. | |
| customers | string | 4210 | Reported customer count for this category and the selected audience, scope and date window. |
| gmv_range | string | $331,451.00 ~ $331,500.00 | Formatted gross merchandise value (GMV) range for this category, in the shop's currency. Zero is shown as a formatted zero amount. |
| orders | string | 8566 | Reported order count for this category and the selected audience, scope and date window. |
| earliest_available_date | string | 2026-08-21 | Earliest available UTC data date for the requested shop, brand and industry, in YYYY-MM-DD format. The start_date must not precede this date. |
| end_date | string | 2026-09-20 | Inclusive end date of the data window used for the ranking, in UTC using YYYY-MM-DD format. It is the requested date, or the latest available date when date is omitted. |
| latest_available_date | string | 2026-09-20 | Latest available UTC data date for the requested shop, brand and industry, in YYYY-MM-DD format. Used as end_date when date is omitted. |
| next_page_token | string | cGFnZV9udW1iZXI9MQ== | Token for the next page. Pass this value unchanged as page_token in the next request and keep all other request parameters unchanged. An empty string means there are no more pages. |
| start_date | string | 2026-08-22 | Inclusive start date of the data window used for the ranking, in UTC using YYYY-MM-DD format. It is end_date - (trend_days - 1) days. |
| total_count | int | 1 | Total number of matching level-2 categories before pagination. Level-3 children are excluded. |
Mẫu phản hồi
{"code":0,"data":{"categories":[{"category_id":"848648","category_level":2,"category_name":"Makeup","children":[{"category_id":"601529","category_level":3,"category_name":"Makeup Sets","metrics":{"customers":"4210","gmv_range":"$331,451.00 ~ $331,500.00","orders":"8566"}}],"metrics":{"customers":"4210","gmv_range":"$331,451.00 ~ $331,500.00","orders":"8566"}}],"earliest_available_date":"2026-08-21","end_date":"2026-09-20","latest_available_date":"2026-09-20","next_page_token":"cGFnZV9udW1iZXI9MQ==","start_date":"2026-08-22","total_count":1},"message":"Success","request_id":"202203070749000101890810281E8C70B7"}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Sản phẩm ở trang nền tảng
- Tạo API key (tick kênh TikTok Shop)
- Gọi theo ví dụ ở trên