tiktok.logistics.202309.global_warehouses
GET/logistics/202309/global_warehousesGọi qua 360: GET https://partner.quantri360.com/v1/tiktok/logistics/202309/global_warehouses
Mô tả API
Lấy các kho toàn cầu gắn với người bán, gồm mã kho, tên và bên sở hữu.
- Gọi qua /v1/tiktok/logistics/202309/global_warehouses 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ỉ
GET https://partner.quantri360.com/v1/tiktok/logistics/202309/global_warehouses
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
Không có tham số riêng (ngoài tham số chung).
Ví dụ request
curl -s "https://partner.quantri360.com/v1/tiktok/logistics/202309/global_warehouses" \ -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/202309/global_warehouses",
params={},
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/202309/global_warehouses');
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: '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/202309/global_warehouses' . '?' . http_build_query([]); $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. | |
| global_warehouses | object[] | Các kho toàn cầu gắn với người bán. | |
| id | string | 100000000000000101 | Mã định danh. |
| name | string | Mẫu minh họa | Tên kho. |
| ownership | string | SELLER | SELLER kho của người bán; PLATFORM_COOPERATION kho của TikTok Shop; giá trị: SELLER, PLATFORM_COOPERATION. |
Mẫu phản hồi
{
"code": 0,
"message": "Success",
"request_id": "DEMO_REQUEST_FBT_01",
"data": {
"global_warehouses": [
{
"id": "100000000000000101",
"name": "Mẫu minh họa",
"ownership": "SELLER"
}
]
}
}
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