VI | EN
Message us on Messenger
Developer resources

Get Open Collaboration Sample Rules — TikTok Shop API

tiktok.affiliate_seller.202410.open_collaborations.sample_rules · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

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

NameInTypeSampleDescription
AuthorizationheaderheaderBearer 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_idquerystring100001Gian 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

NameInTypeRequiredSampleDescription
product_idsquery[]stringYes["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)

NameTypeSampleDescription
codeint0Mã kết quả; 0 là thành công.
messagestringSuccessThông báo kết quả.
request_idstringDEMO_AFFILIATE_REQUESTMã truy vết yêu cầu.
dataobjectDữ liệu phản hồi.
sample_rulesobject[]Danh sách quy tắc nhận mẫu.
product_idstring100000000000000101Mã sản phẩm.
sample_quotaint1Số mẫu có thể cấp.
is_sample_time_unlimitedboolfalseLà mẫu thời điểm không giới hạn.
statusstringNOT_STARTEDTrạng thái. Giá trị: NOT_STARTED, ONGOING, NO_LEFT_COUNT, PLAN_EXCEPTION. Giá trị bổ sung: EXPIRED.
available_quantityint1Khả dụng số lượng.
start_timeint1790812800Thời điểm bắt đầu. Mốc Unix giây.
end_timeint1790899200Thời điểm kết thúc. Mốc Unix giây.
thresholdsobjectNgưỡng.
minimum_follower_countint1Tối thiểu người theo dõi số lượng.
minimum_gmvint10000Tối thiểu gmv.
avg_ec_video_viewsint1Trung 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_rankstringLIVEDự đ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

  1. Sign up for Partner
  2. Enable a data type of the Affiliate group on the platform page
  3. Create an API key (tick the TikTok Shop channel)
  4. Call it as in the examples above