VI | EN
Nhắn Messenger
Dành cho developer

Search Goods Hazmat And Expiration Info — API TikTok Shop

tiktok.fbt.202603.goods.hazmat_and_expiration_info.search · gọi qua Quantri360 bằng một API key cho chính tài khoản / tài sản bạn đã kết nối và ủy quyền — 360 lo việc ký request và làm mới phiên đăng nhập bạn đã cấp.

tiktok.fbt.202603.goods.hazmat_and_expiration_info.search

POST/fbt/202603/goods/hazmat_and_expiration_info/searchGọi qua 360: POST https://partner.quantri360.com/v1/tiktok/fbt/202603/goods/hazmat_and_expiration_info/search
Mô tả API

KHO TIKTOK (FBT): Tra thông tin hàng nguy hiểm, quản lý lô và hạn dùng theo mã SKU TikTok Shop.

  • HIỆN CHƯA GỌI ĐƯỢC QUA 360: ứng dụng 360 chưa được cấp quyền cho nhóm API kho TikTok (FBT). Cần dùng → liên hệ 360.
  • Gọi qua /v1/tiktok/fbt/202603/goods/hazmat_and_expiration_info/search với Authorization: Bearer <key>; dùng platform_shop_id khi có nhiều shop. 360 tự gắn app_key, shop_cipher, sign và access_token.
  • API chỉ đọc; code = 0 mới là thành công.

Request

Địa chỉ

POST https://partner.quantri360.com/v1/tiktok/fbt/202603/goods/hazmat_and_expiration_info/search

Xác thực & gian hàng

TênVị tríKiểuMẫuMô tả
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.

Tham số request

TênVị tríKiểuBắt buộcMẫuMô tả
tts_sku_idsbodystring[]Có["100000000000000101"]Các mã SKU TikTok Shop.

Ví dụ request

curl -s -X POST "https://partner.quantri360.com/v1/tiktok/fbt/202603/goods/hazmat_and_expiration_info/search" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"tts_sku_ids":["100000000000000101"]}'
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.post(
    "https://partner.quantri360.com/v1/tiktok/fbt/202603/goods/hazmat_and_expiration_info/search",
    params={},
    json={
        "tts_sku_ids": [
            "100000000000000101"
        ]
    },
    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/fbt/202603/goods/hazmat_and_expiration_info/search');
for (const [k, v] of Object.entries({})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
  method: 'POST',
  headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"tts_sku_ids":["100000000000000101"]}),
});
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/fbt/202603/goods/hazmat_and_expiration_info/search' . '?' . http_build_query([]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"tts_sku_ids":["100000000000000101"]}');
$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ênKiểuMẫuMô tả
codeint0Mã kết quả; 0 là thành công.
messagestringSuccessThông báo kết quả.
request_idstringDEMO_REQUEST_FBT_01Mã truy vết yêu cầu.
dataobjectDữ liệu phản hồi.
hazmat_and_expiration_infoobjectThông tin hàng nguy hiểm, quản lý lô và hạn dùng theo SKU.
hazmat_and_expiration_dto_listobject[]Kết quả theo SKU; đối chiếu bằng tts_sku_id.
tts_sku_idstring100000000000000101Mã SKU TikTok Shop.
is_hazmatboolfalseCó phải hàng nguy hiểm; true cần khai thông tin nguy hiểm.
is_lot_codeboolfalseCó quản lý mã lô theo quy tắc ngành hàng FBT.
is_expiration_managementboolfalseCó quản lý hạn dùng theo quy tắc ngành hàng FBT.
exp_base_infoobjectCác ngưỡng quản lý hạn dùng khi is_expiration_management = true.
inbound_cutoff_daysint90Số ngày trước hạn dùng mà kho ngừng nhận hàng.
expiration_alert_daysint60Số ngày trước hạn dùng để gửi cảnh báo.
sales_cutoff_daysint30Số ngày trước hạn dùng mà hàng ngừng bán.

Mẫu phản hồi

{
  "code": 0,
  "message": "Success",
  "request_id": "DEMO_REQUEST_FBT_01",
  "data": {
    "hazmat_and_expiration_info": {
      "hazmat_and_expiration_dto_list": [
        {
          "tts_sku_id": "100000000000000101",
          "is_hazmat": false,
          "is_lot_code": false,
          "is_expiration_management": true,
          "exp_base_info": {
            "inbound_cutoff_days": 90,
            "expiration_alert_days": 60,
            "sales_cutoff_days": 30
          }
        }
      ]
    }
  }
}

Bắt đầu dùng

  1. Đăng ký tài khoản Partner
  2. Mở loại dữ liệu thuộc nhóm Đơn hàng ở trang nền tảng
  3. Tạo API key (tick kênh TikTok Shop)
  4. Gọi theo ví dụ ở trên