VI | EN
Message us on Messenger
Developer resources

Thuộc tính của danh mục — TikTok Shop API

tiktok.product.202309.categories.category_id.attributes · 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.

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) — values rỗ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

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_idquerystring100001Gian 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

NameInTypeRequiredSampleDescription
category_idpathstringYes601264Mã ngành LÁ (is_leaf = true).
category_versionquerystringNov2Phải khớp cây của category_id — gian hàng VN dùng v2.
localequerystringNovi-VNNgôn ngữ tên.
is_live_quickqueryboolNofalse

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)

NameTypeSampleDescription
codeint00 = thành công; khác 0 xem message (105001–105003 = token, 360 đã tự làm mới một lần).
messagestringSuccessThông điệp của TikTok.
request_idstringYEU_CAU_MINH_HOAMã request TikTok.
dataobjectDữ liệu.
attributesobject[]Danh sách thuộc tính.
idstring900000000000000001Mã thuộc tính.
namestringMinh họaTên (theo ngôn ngữ gian hàng).
typestringPRODUCT_PROPERTY`PRODUCT_PROPERTY` (thuộc tính sản phẩm → `product_attributes`) · `SALES_PROPERTY` (tạo biến thể → `skus[].sales_attributes`).
is_requriedboolfalseBắt buộc luôn (tên trường viết sai `is_requried`).
is_customizableboolfalseCho nhập giá trị tự do (gửi `name` thay `id`).
is_multiple_selectionboolfalseCho chọn nhiều giá trị.
valuesobject[]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.
idstring900000000000000001Mã định danh.
namestringMinh họaTên.
requirement_conditionsobject[]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_formatstringMinh họaĐịnh dạng khi nhập số (vd `POSITIVE_INT_OR_DECIMAL`).
metric_standardsobject[]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

  1. Sign up for Partner
  2. Enable a data type of the Sản phẩm group on the platform page
  3. Create an API key (tick the TikTok Shop channel)
  4. Call it as in the examples above