tiktok.affiliate_seller.202410.open_collaborations.sample_rules
GET/affiliate_seller/202410/open_collaborations/sample_rulesVia 360: GET https://partner.quantri360.com/v1/tiktok/affiliate_seller/202410/open_collaborations/sample_rules
Description
Lấy trạng thái và chi tiết quy tắc nhận mẫu của các sản phẩm trong hợp tác mở.
- Gọi qua /v1/tiktok/affiliate_seller/202410/open_collaborations/sample_rules 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
Endpoint
GET https://partner.quantri360.com/v1/tiktok/affiliate_seller/202410/open_collaborations/sample_rules
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
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| product_ids | query | []string | Yes | ["100000000000000101"] | Danh sách 1–200 mã sản phẩm cần lấy quy tắc mẫu. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok/affiliate_seller/202410/open_collaborations/sample_rules?product_ids=%5B%22100000000000000101%22%5D" \ -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/affiliate_seller/202410/open_collaborations/sample_rules",
params={
"product_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/affiliate_seller/202410/open_collaborations/sample_rules');
for (const [k, v] of Object.entries({"product_ids":["100000000000000101"]})) 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/affiliate_seller/202410/open_collaborations/sample_rules' . '?' . http_build_query(['product_ids' => '["100000000000000101"]']); $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 | Mã kết quả; 0 là thành công. |
| message | string | Success | Thông báo kết quả. |
| request_id | string | DEMO_AFFILIATE_REQUEST | Mã truy vết yêu cầu. |
| data | object | Dữ liệu phản hồi. | |
| sample_rules | object[] | Danh sách quy tắc nhận mẫu. | |
| product_id | string | 100000000000000101 | Mã sản phẩm. |
| sample_quota | int | 1 | Số mẫu có thể cấp. |
| is_sample_time_unlimited | bool | false | Là mẫu thời điểm không giới hạn. |
| status | string | NOT_STARTED | Trạng thái. Giá trị: NOT_STARTED, ONGOING, NO_LEFT_COUNT, PLAN_EXCEPTION. Giá trị bổ sung: EXPIRED. |
| available_quantity | int | 1 | Khả dụng số lượng. |
| start_time | int | 1790812800 | Thời điểm bắt đầu. Mốc Unix giây. |
| end_time | int | 1790899200 | Thời điểm kết thúc. Mốc Unix giây. |
| thresholds | object | Ngưỡng. | |
| minimum_follower_count | int | 1 | Tối thiểu người theo dõi số lượng. |
| minimum_gmv | int | 10000 | Tối thiểu gmv. |
| avg_ec_video_views | int | 1 | Trung bình thương mại điện tử video lượt xem. |
| category_ids | []string | ["100000000000000101"] | Danh sách mã ngành hàng. |
| predicted_fulfillment_rank | string | LIVE | Dự đoán thực hiện nghĩa vụ xếp hạng. Giá trị: LIVE, ALL, LOW, MEDIUM, HIGH. |
Response sample
{
"code": 0,
"message": "Success",
"request_id": "DEMO_AFFILIATE_REQUEST",
"data": {
"sample_rules": [
{
"product_id": "100000000000000101",
"sample_quota": 1,
"is_sample_time_unlimited": false,
"status": "NOT_STARTED",
"available_quantity": 1,
"start_time": 1790812800,
"end_time": 1790899200,
"thresholds": {
"minimum_follower_count": 1,
"minimum_gmv": 10000,
"avg_ec_video_views": 1,
"category_ids": [
"100000000000000101"
],
"predicted_fulfillment_rank": "LIVE"
}
}
]
}
}
Get started
- Sign up for Partner
- Enable a data type of the Affiliate group on the platform page
- Create an API key (tick the TikTok Shop channel)
- Call it as in the examples above