tiktok.product.202309.categories.category_id.attributes
GET/product/202309/categories/{category_id}/attributesVia 360: GET https://partner.quantri360.com/v1/tiktok/product/202309/categories/{category_id}/attributes
Description
Thuộc tính của một ngành hàng lá: thuộc tính sản phẩm (xuất xứ, chất liệu, mùa…) và thuộc tính bán hàng tạo biến thể (màu sắc, kích cỡ) — cái nào bắt buộc, giá trị chọn sẵn, có cho nhập tự do / chọn nhiều không. Dùng trước khi tạo / sửa sản phẩm để điền đủ product_attributes và sales_attributes.
- Ví dụ ngành Chân váy có các thuộc tính bán hàng
Màu sắc(100000) vàKích cỡ(100007) —valuesrỗng, tự đặt tên giá trị. - Thuộc tính bắt buộc hay gặp ở VN: Quốc gia xuất xứ, Tên / Địa chỉ tổ chức chịu trách nhiệm hàng hóa (nhập tự do).
- Danh sách KHÔNG phân trang; thứ tự không cố định.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok/product/202309/categories/{category_id}/attributes
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_id | path | string | Yes | 601264 | Mã ngành LÁ (is_leaf = true). |
| category_version | query | string | No | v2 | Phải khớp cây của category_id — gian hàng VN dùng v2. |
| locale | query | string | No | vi-VN | Ngôn ngữ tên. |
| is_live_quick | query | bool | No | false |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok/product/202309/categories/601264/attributes?platform_shop_id=7494000000000000000&category_version=v2" \ -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/601264/attributes",
params={
"platform_shop_id": "7494000000000000000",
"category_version": "v2"
},
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/601264/attributes');
for (const [k, v] of Object.entries({"platform_shop_id":"7494000000000000000","category_version":"v2"})) 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/601264/attributes' . '?' . http_build_query(['platform_shop_id' => '7494000000000000000', 'category_version' => 'v2']); $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 | YEU_CAU_MINH_HOA | Mã request TikTok. |
| data | object | Dữ liệu. | |
| attributes | object[] | Danh sách thuộc tính. | |
| id | string | 900000000000000001 | Mã thuộc tính. |
| name | string | Minh họa | Tên (theo ngôn ngữ gian hàng). |
| type | string | PRODUCT_PROPERTY | `PRODUCT_PROPERTY` (thuộc tính sản phẩm → `product_attributes`) · `SALES_PROPERTY` (tạo biến thể → `skus[].sales_attributes`). |
| is_requried | bool | false | Bắt buộc luôn (tên trường viết sai `is_requried`). |
| is_customizable | bool | false | Cho nhập giá trị tự do (gửi `name` thay `id`). |
| is_multiple_selection | bool | false | Cho chọn nhiều giá trị. |
| values | object[] | Giá trị chọn sẵn [{id, name}] — rỗng với thuộc tính nhập tự do / thuộc tính bán hàng. | |
| id | string | 900000000000000001 | Mã định danh. |
| name | string | Minh họa | Tên. |
| requirement_conditions | object[] | Bắt buộc CÓ ĐIỀU KIỆN: [{condition_type `VALUE_ID_MATCH`, attribute_id, attribute_value_id}] — chọn giá trị đó ở thuộc tính kia thì thuộc tính này thành bắt buộc. | |
| value_data_format | string | Minh họa | Định dạng khi nhập số (vd `POSITIVE_INT_OR_DECIMAL`). |
| metric_standards | object[] | Mẫu đơn vị đo (nếu có). |
Response sample
{
"code": 0,
"message": "Success",
"request_id": "YEU_CAU_MINH_HOA",
"data": {
"attributes": [
{
"id": "900000000000000001",
"name": "Minh họa",
"type": "PRODUCT_PROPERTY",
"is_requried": false,
"is_customizable": false,
"is_multiple_selection": false,
"values": [
{
"id": "900000000000000001",
"name": "Minh họa"
}
],
"requirement_conditions": [],
"value_data_format": "Minh họa",
"metric_standards": []
}
]
}
}
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