VI | EN
Nhắn Messenger
Dành cho developer

Update The Blind Box Opening Results — API TikTok Shop

tiktok.order.202605.orders.blind_box_result.callback · gọi qua Quantri360 bằng một API key cho chính tài khoản / tài sản bạn đã kết nối và ủy quyền — 360 lo việc ký request và làm mới phiên đăng nhập bạn đã cấp.

tiktok.order.202605.orders.blind_box_result.callback

POST/order/202605/orders/blind_box_result/callbackGọi qua 360: POST https://partner.quantri360.com/v1/tiktok/order/202605/orders/blind_box_result/callback
Endpoint ghi — thay đổi dữ liệu trên TikTok Shop. Key phải được tạo với tick "Cho phép gọi API ghi", nếu không sẽ nhận 403 write_not_allowed. Mỗi lần gọi được ghi nhật ký.
Mô tả API

Cập nhật kết quả mở hộp bí mật của đơn hàng.

  • Gọi qua /v1/tiktok/order/202605/orders/blind_box_result/callback 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 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 Đơn hàng. Cập nhật kết quả mở hộp bí mật của đơn hàng.
  • HTTP 200 vẫn có thể có lỗi nghiệp vụ; kiểm code trước khi dùng kết quả.

Request

Địa chỉ

POST https://partner.quantri360.com/v1/tiktok/order/202605/orders/blind_box_result/callback

Xác thực & gian hàng

TênVị tríKiểuMẫuMô tả
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.

Tham số request

TênVị tríKiểuBắt buộcMẫuMô tả
main_order_idbodystringKhông100000000000000001Mã đơn hàng gốc.
blind_box_resultsbodyobject[]KhôngBí mật hộp các kết quả.
blind_box_results[].order_line_idbodystringKhông100000000000000001Mã dòng hàng.
blind_box_results[].blind_result_product_idbodystringKhông100000000000000001Mã bí mật kết quả sản phẩm.
blind_box_results[].blind_result_sku_idbodystringKhông100000000000000001Mã bí mật kết quả sku.
blind_box_results[].blind_open_timebodyintKhông1792650000Bí mật mở thời gian. Mốc Unix mili giây.
blind_batch_box_resultsbodyobject[]KhôngBí mật hàng loạt hộp các kết quả.
blind_batch_box_results[].order_line_idbodystringKhông100000000000000001Mã dòng hàng.
blind_batch_box_results[].blind_box_order_line_listbodyobject[]KhôngBí mật hộp đơn dòng danh sách.
blind_batch_box_results[].blind_box_order_line_list[].blind_result_product_idbodystringKhông100000000000000001Mã bí mật kết quả sản phẩm.
blind_batch_box_results[].blind_box_order_line_list[].blind_result_sku_idbodystringKhông100000000000000001Mã bí mật kết quả sku.
blind_batch_box_results[].blind_box_order_line_list[].blind_open_timebodyintKhông1792650000Bí mật mở thời gian. Mốc Unix mili giây.
blind_batch_box_results[].blind_box_order_line_list[].product_typebodystringKhôngNORMALSản phẩm loại. Giá trị / trường liên quan: NORMAL, GIFT.

Ví dụ request

curl -s -X POST "https://partner.quantri360.com/v1/tiktok/order/202605/orders/blind_box_result/callback" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.post(
    "https://partner.quantri360.com/v1/tiktok/order/202605/orders/blind_box_result/callback",
    params={},
    json={},
    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/order/202605/orders/blind_box_result/callback');
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: 'POST',
  headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({}),
});
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/order/202605/orders/blind_box_result/callback' . '?' . http_build_query([]);
$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, '{}');
$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ênKiểuMẫuMô tả
codeint0Mã kết quả; 0 là thành công.
messagestringSuccessThông báo kết quả; khi lỗi, đọc nội dung để xử lý.
request_idstringDEMO_REQUEST_0001Mã truy vết yêu cầu.
dataobjectDữ liệu.

Mẫu phản hồi

{
  "code": 0,
  "message": "Success",
  "request_id": "DEMO_REQUEST_0001",
  "data": {}
}

Bắt đầu dùng

  1. Đăng ký tài khoản Partner
  2. Mở loại dữ liệu thuộc nhóm Đơn hàng ở trang nền tảng
  3. Tạo API key (tick kênh TikTok Shop)
  4. Gọi theo ví dụ ở trên