tiktok.logistics.202309.warehouses.warehouse_id.delivery_options
GET/logistics/202309/warehouses/{warehouse_id}/delivery_optionsGọi qua 360: GET https://partner.quantri360.com/v1/tiktok/logistics/202309/warehouses/{warehouse_id}/delivery_options
Mô tả API
Lấy các tùy chọn giao hàng của kho hoặc tùy chọn gán trực tiếp cho sản phẩm.
- Gọi qua /v1/tiktok/logistics/202309/warehouses/{warehouse_id}/delivery_options 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.
- Danh sách delivery_options có thể rỗng. scope = PRODUCT không trả dimension_limit và weight_limit.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/tiktok/logistics/202309/warehouses/{warehouse_id}/delivery_options
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ả |
|---|---|---|---|---|---|
| warehouse_id | path | string | Có | 100000000000000101 | Mã kho dạng chuỗi số. |
| scope | query | string | Không | WAREHOUSE | WAREHOUSE tùy chọn kho đang dùng, mặc định; PRODUCT tùy chọn gán sản phẩm ghi đè kho, không trả dimension_limit và weight_limit. |
Ví dụ request
curl -s "https://partner.quantri360.com/v1/tiktok/logistics/202309/warehouses/100000000000000101/delivery_options" \ -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/100000000000000101/delivery_options",
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/warehouses/100000000000000101/delivery_options');
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/warehouses/100000000000000101/delivery_options' . '?' . 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. | |
| delivery_options | object[] | Các tùy chọn giao hàng theo scope, kèm nền tảng áp dụng. | |
| id | string | 100000000000000101 | Mã định danh. |
| name | string | Mẫu minh họa | Tên. |
| type | string | STANDARD | Loại; giá trị: STANDARD, EXPRESS, ECONOMY, SEND_BY_SELLER, INSTANT, SAMEDAY, NEXTDAY, CARGO. |
| description | string | Minh họa | Mô tả. |
| dimension_limit | object | Giới hạn chiều dài, rộng và cao. | |
| max_height | int | 30 | Chiều cao tối đa. |
| max_length | int | 50 | Chiều dài tối đa. |
| max_width | int | 40 | Chiều rộng tối đa. |
| unit | string | CM | Đơn vị; giá trị: CM, INCH. |
| weight_limit | object | Giới hạn khối lượng. | |
| max_weight | int | 1000 | Khối lượng tối đa. |
| min_weight | int | 1 | Khối lượng tối thiểu. |
| unit | string | GRAM | Đơn vị; giá trị: GRAM, POUND, OUNCE, KILOGRAM. |
| platform | string[] | ["TIKTOK_SHOP"] | Nền tảng áp dụng; giá trị: TIKTOK_SHOP, TOKOPEDIA. |
Mẫu phản hồi
{
"code": 0,
"message": "Success",
"request_id": "DEMO_REQUEST_FBT_01",
"data": {
"delivery_options": []
}
}
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