tiktok.product.202309.categories
GET/product/202309/categoriesVia 360: GET https://partner.quantri360.com/v1/tiktok/product/202309/categories
Description
Cây ngành hàng gian hàng được dùng khi đăng sản phẩm (tên theo ngôn ngữ gian hàng, cha / con, lá hay không, quyền đăng). Dùng để chọn category_id (phải là ngành LÁ) trước khi lấy thuộc tính và tạo sản phẩm.
- Gian hàng VN phải dùng
category_version=v2(cũng ở API thuộc tính và tạo sản phẩm) — tạo sản phẩm bằng mã ngành v1 bị lỗi 12052217. Không gửi thì mặc định v1. - Trả toàn bộ cây trong một lần (không phân trang). Ngành thay đổi thường xuyên — nên gọi lại khi đăng thay vì lưu lâu.
keywordtrả cả ngành cha khớp tên; lọcis_leaf = trueđể lấy ngành đăng được.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok/product/202309/categories
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 | 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. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| category_version | query | string | No | v2 | v2 = cây 7 cấp (BẮT BUỘC với gian hàng VN / Đông Nam Á) · v1 = cây 3 cấp (mặc định). |
| keyword | query | string | No | Váy | Lọc theo từ trong tên ngành (local_name). |
| locale | query | string | No | vi-VN | Ngôn ngữ tên ngành (mặc định theo gian hàng). |
| include_prohibited_categories | query | bool | No | false | true = kèm cả ngành bị cấm đăng. |
| is_live_quick | query | bool | No | false | Ngành cho sản phẩm LIVE_QUICK (cần quyền riêng). |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok/product/202309/categories?platform_shop_id=7494000000000000000&category_version=v2&keyword=V%C3%A1y" \ -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/product/202309/categories",
params={
"platform_shop_id": "7494000000000000000",
"category_version": "v2",
"keyword": "Váy"
},
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/product/202309/categories');
for (const [k, v] of Object.entries({"platform_shop_id":"7494000000000000000","category_version":"v2","keyword":"Váy"})) 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/product/202309/categories' . '?' . http_build_query(['platform_shop_id' => '7494000000000000000', 'category_version' => 'v2', 'keyword' => 'Váy']); $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 Shop)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | int | 0 | 0 = thành công; khác 0 xem message (105001–105003 = token, 360 đã tự làm mới một lần). |
| message | string | Success | Thông điệp của TikTok. |
| request_id | string | 2025101900000000000000000000 | Mã request TikTok. |
| data | object | Dữ liệu. | |
| categories | object[] | Danh sách PHẲNG — dựng cây bằng `parent_id`. | |
| id | string | 601264 | Mã ngành. |
| parent_id | string | 842376 | `0` = ngành gốc. |
| local_name | string | Chân váy | Tên ngành. |
| is_leaf | bool | true | Chỉ ngành lá mới đăng / sửa sản phẩm được. |
| permission_statuses | string[] | ["AVAILABLE"] | `AVAILABLE` (đăng được) · `INVITE_ONLY` (chỉ gian hàng được mời) · `NON_MAIN_CATEGORY` (ngoài ngành chính đã đăng ký) … |
Response sample
{
"code": 0,
"message": "Success",
"request_id": "20261029170207FDBB16…",
"data": {
"categories": [
{
"id": "600001",
"parent_id": "0",
"local_name": "Đồ gia dụng",
"is_leaf": false,
"permission_statuses": [
"AVAILABLE"
]
},
{
"id": "601264",
"parent_id": "842376",
"local_name": "Chân váy",
"is_leaf": true,
"permission_statuses": [
"AVAILABLE"
]
}
]
}
}
Get started
- Sign up for Partner
- Enable a data type of the Sản phẩm group on the platform page
- Create an API key (tick the TikTok Shop channel)
- Call it as in the examples above