VI | EN
Message us on Messenger
Developer resources

Create Target Collaboration — TikTok Shop API

tiktok.affiliate_seller.202508.target_collaborations · 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.202508.target_collaborations

POST/affiliate_seller/202508/target_collaborationsVia 360: POST https://partner.quantri360.com/v1/tiktok/affiliate_seller/202508/target_collaborations
Write endpoint — changes data on TikTok Shop. The key must be created with "Allow write API calls" ticked, otherwise you get 403 write_not_allowed. Every call is logged.
Description

Tạo hợp tác mục tiêu: gửi lời mời riêng tới tối đa 50 creator chọn sẵn cho tối đa 100 sản phẩm, kèm tỉ lệ hoa hồng, hoa hồng quảng cáo, chính sách gửi mẫu và liên hệ người bán. Lời mời không hiện công khai trên chợ creator — chỉ creator được mời thấy.

  • Gọi qua /v1/tiktok/affiliate_seller/202508/target_collaborations 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.
  • Là API GHI — thay đổi dữ liệu thật trên TikTok Shop (gửi lời mời tới creator); key cần quyền ghi.
  • Kiểm target_collaboration_conflicts, invalid_open_id_list, invalid_product_id_list kể cả khi code = 0.
  • Tỉ lệ hoa hồng là SỐ NGUYÊN đơn vị 1/100 % (khác API đơn affiliate trả chuỗi).
  • API GHI: thay đổi dữ liệu thật trên TikTok Shop; cần key có quyền ghi (can_write) và gói mở module affiliate. Tạo lời mời hợp tác riêng với creator đã chọn.
  • HTTP 200 vẫn có thể có lỗi nghiệp vụ; kiểm code trước khi dùng kết quả.

Request

Endpoint

POST https://partner.quantri360.com/v1/tiktok/affiliate_seller/202508/target_collaborations

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
namebodystringYesKOC tháng 11Tên hợp tác.
messagebodystringNoLời nhắn gửi creator.
end_timebodystringYes1795000000Kết thúc lúc (Unix giây, gửi dạng chuỗi).
productsbodyobject[]Yes[{"id":"1735199033378506520","target_commission_rate":1000}]Tối đa 100. Mỗi phần tử: id (mã sản phẩm, bắt buộc), target_commission_rate (bắt buộc, đơn vị 1/100 %, tối thiểu 100 — 1000 = 10%), shop_ads_commission_rate (tỉ lệ cho đơn từ quảng cáo dùng video creator, cùng đơn vị).
creator_user_open_idsbodystring[]Yes["Ll7RbAAAAAA1yXmb…"]Tối đa 50 creator_open_id (lấy từ creator_content_details / chi tiết hợp tác).
seller_contact_infobodyobjectYes{"email":"cskh@example.com","phone_number":"0901234567"}Liên hệ người bán: email, phone_number, whatsapp, telegram, line.
free_sample_rulebodyobjectYes{"has_free_sample":false,"is_sample_approval_exempt":false}has_free_sample (gửi mẫu miễn phí) + is_sample_approval_exempt (tự duyệt yêu cầu mẫu; vô hiệu khi không gửi mẫu) — cả hai bắt buộc.
preferred_content_typebodystringNoVIDEOLoại nội dung mong muốn: LIVE · VIDEO.

Request examples

curl -s -X POST "https://partner.quantri360.com/v1/tiktok/affiliate_seller/202508/target_collaborations?platform_shop_id=7494000000000000000" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"KOC tháng 11","end_time":"1795000000","products":[{"id":"1735199033378506520","target_commission_rate":1000,"shop_ads_commission_rate":300}],"creator_user_open_ids":["Ll7RbAAAAAA1yXmbclpzNzf8…"],"seller_contact_info":{"email":"cskh@example.com","phone_number":"0901234567"},"free_sample_rule":{"has_free_sample":false,"is_sample_approval_exempt":false},"preferred_content_type":"VIDEO"}'
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.post(
    "https://partner.quantri360.com/v1/tiktok/affiliate_seller/202508/target_collaborations",
    params={
        "platform_shop_id": "7494000000000000000"
    },
    json={
        "name": "KOC tháng 11",
        "end_time": "1795000000",
        "products": [
            {
                "id": "1735199033378506520",
                "target_commission_rate": 1000,
                "shop_ads_commission_rate": 300
            }
        ],
        "creator_user_open_ids": [
            "Ll7RbAAAAAA1yXmbclpzNzf8…"
        ],
        "seller_contact_info": {
            "email": "cskh@example.com",
            "phone_number": "0901234567"
        },
        "free_sample_rule": {
            "has_free_sample": False,
            "is_sample_approval_exempt": False
        },
        "preferred_content_type": "VIDEO"
    },
    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/202508/target_collaborations');
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: 'POST',
  headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"name":"KOC tháng 11","end_time":"1795000000","products":[{"id":"1735199033378506520","target_commission_rate":1000,"shop_ads_commission_rate":300}],"creator_user_open_ids":["Ll7RbAAAAAA1yXmbclpzNzf8…"],"seller_contact_info":{"email":"cskh@example.com","phone_number":"0901234567"},"free_sample_rule":{"has_free_sample":false,"is_sample_approval_exempt":false},"preferred_content_type":"VIDEO"}),
});
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/202508/target_collaborations' . '?' . 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, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"name":"KOC tháng 11","end_time":"1795000000","products":[{"id":"1735199033378506520","target_commission_rate":1000,"shop_ads_commission_rate":300}],"creator_user_open_ids":["Ll7RbAAAAAA1yXmbclpzNzf8…"],"seller_contact_info":{"email":"cskh@example.com","phone_number":"0901234567"},"free_sample_rule":{"has_free_sample":false,"is_sample_approval_exempt":false},"preferred_content_type":"VIDEO"}');
$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
codeint00 = thành công; khác 0 xem message (105001–105003 = token, 360 đã tự làm mới một lần).
messagestringSuccessThông điệp của TikTok.
request_idstring2025101900000000000000000000Mã request TikTok.
dataobjectDữ liệu.
target_collaborationobject
idstring7365861555575916210Mã hợp tác vừa tạo.
create_timeint1715654330Unix giây.
target_collaboration_conflictsobject[]Cặp creator × sản phẩm bị xung đột (đã nằm trong hợp tác mục tiêu khác) khiến tạo không thành: [{creator_user_open_id, product_id}].
invalid_open_id_liststring[]Creator không hợp lệ.
invalid_product_id_liststring[]Sản phẩm không hợp lệ.

Response sample

{
  "code": 0,
  "message": "Success",
  "request_id": "202203070749000101…",
  "data": {
    "target_collaboration": {
      "id": "7365861555575916210"
    },
    "create_time": 1715654330,
    "target_collaboration_conflicts": [],
    "invalid_open_id_list": [],
    "invalid_product_id_list": []
  }
}

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