tiktok.logistics.202309.warehouses
GET/logistics/202309/warehousesVia 360: GET https://partner.quantri360.com/v1/tiktok/logistics/202309/warehouses
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description
Danh sách kho của gian hàng: kho xuất hàng / kho nhận hàng hoàn, kho mặc định, trạng thái cho bán, địa chỉ — dùng để lấy warehouse_id khi cập nhật tồn kho, lọc đơn theo kho, map kho TikTok với kho nội bộ.
- Gọi qua /v1/tiktok/logistics/202309/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.
- Gian hàng VN thường có 2 kho: một
SALES_WAREHOUSE(mặc định) và mộtRETURN_WAREHOUSE— chỉ dùng khoSALES_WAREHOUSEkhi cập nhật tồn kho. - Không có tham số; không phân trang.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok/logistics/202309/warehouses
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
No specific parameters (besides the common ones).
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok/logistics/202309/warehouses?platform_shop_id=7494000000000000000" \ -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/warehouses",
params={
"platform_shop_id": "7494000000000000000"
},
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/warehouses');
for (const [k, v] of Object.entries({"platform_shop_id":"7494000000000000000"})) 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/warehouses' . '?' . http_build_query(['platform_shop_id' => '7494000000000000000']); $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 | DEMO_REQUEST_A_01 | Mã request TikTok. |
| data | object | Dữ liệu. | |
| warehouses | object[] | Kho (vắng hẳn khi gian hàng không có kho). | |
| id | string | 100000000000000001 | Mã kho — dùng cho `warehouse_id` ở cập nhật tồn kho / lọc đơn. |
| entity_id | string | 100000000000000001 | Mã thực thể vật lý — kho xuất và kho hoàn cùng địa chỉ có thể khác `id` nhưng chung thực thể. |
| name | string | Minh họa | Tên kho (không duy nhất). |
| type | string | SALES_WAREHOUSE | `SALES_WAREHOUSE` (kho xuất hàng) · `RETURN_WAREHOUSE` (kho nhận hàng hoàn). |
| sub_type | string | Minh họa | `DOMESTIC_WAREHOUSE` (kho nội địa) · `CB_OVERSEA_WAREHOUSE` · `CB_DIRECT_SHIPPING_WAREHOUSE` (xuyên biên giới). |
| effect_status | string | Minh họa | `ENABLED` (tồn được bán) · `DISABLED` · `RESTRICTED`. |
| is_default | bool | False | Kho mặc định — sản phẩm không chỉ định kho dùng kho này. |
| address | object | Địa chỉ kho. | |
| region | string | Minh họa | Khu vực. |
| region_code | string | Minh họa | Khu vực mã. |
| state | string | Minh họa | Tỉnh / thành. |
| city | string | Minh họa | Quận / phường. |
| distict | string | Minh họa | Quận / huyện (tên trường viết sai chính tả `distict`). |
| full_address | string | Minh họa | Địa chỉ đầy đủ. |
| address_line1 | string | Minh họa | Địa chỉ line1. |
| contact_person | string | Minh họa | Người liên hệ. |
| phone_number | string | Minh họa | SĐT kho. |
| postal_code | string | Minh họa | Postal mã. |
| geolocation | object | {} | {latitude, longitude} (chuỗi) — có thể vắng. |
| town | string | Minh họa | Town. |
Response sample
{
"code": 0,
"message": "Success",
"request_id": "DEMO_REQUEST_A_01",
"data": {
"warehouses": [
{
"id": "100000000000000001",
"entity_id": "100000000000000001",
"name": "Minh họa",
"type": "SALES_WAREHOUSE",
"sub_type": "Minh họa",
"effect_status": "Minh họa",
"is_default": false,
"address": {
"region": "Minh họa",
"region_code": "Minh họa",
"state": "Minh họa",
"city": "Minh họa",
"distict": "Minh họa",
"full_address": "Minh họa",
"address_line1": "Minh họa",
"contact_person": "Minh họa",
"phone_number": "Minh họa",
"postal_code": "Minh họa",
"geolocation": {},
"town": "Minh họa"
}
}
]
}
}
Get started
- Sign up for Partner
- Enable a data type of the Tồn kho group on the platform page
- Create an API key (tick the TikTok Shop channel)
- Call it as in the examples above