tiktok.logistics.202606.seller_template.template_exist
GET/logistics/202606/seller_template/template_existGọi qua 360: GET https://partner.quantri360.com/v1/tiktok/logistics/202606/seller_template/template_exist
Mô tả API
Kiểm tra gian hàng có mẫu vận chuyển cho mã kho kinh doanh được chỉ định hay chưa.
- HIỆN CHƯA GỌI ĐƯỢC QUA 360: API này đang trả lỗi thiếu xác thực khi gọi qua 360. Cần dùng → liên hệ 360.
- Gọi qua /v1/tiktok/logistics/202606/seller_template/template_exist 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.
- API đang trả HTTP 400, code 36009004: AccessToken is a required field.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/tiktok/logistics/202606/seller_template/template_exist
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ả |
|---|---|---|---|---|---|
| biz_warehouse_id | query | int | Có | 100000001 | Mã kho kinh doanh. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/tiktok/logistics/202606/seller_template/template_exist?biz_warehouse_id=100000001" \ -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/logistics/202606/seller_template/template_exist",
params={
"biz_warehouse_id": 100000001
},
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/logistics/202606/seller_template/template_exist');
for (const [k, v] of Object.entries({"biz_warehouse_id":100000001})) 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/logistics/202606/seller_template/template_exist' . '?' . http_build_query(['biz_warehouse_id' => 100000001]); $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 | Mã kết quả; 0 là thành công. |
| message | string | Success | Thông báo kết quả. |
| request_id | string | DEMO_REQUEST_FBT_01 | Mã truy vết yêu cầu. |
| data | object | Dữ liệu phản hồi. | |
| template_exist | bool | true | true có mẫu vận chuyển cho kho kinh doanh. |
Mẫu phản hồi
{
"code": 0,
"message": "Success",
"request_id": "DEMO_REQUEST_FBT_01",
"data": {
"template_exist": true
}
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Đơn hàng ở trang nền tảng
- Tạo API key (tick kênh TikTok Shop)
- Gọi theo ví dụ ở trên