tiktok.product.202604.opportunities.query
POST/product/202604/opportunities/queryVia 360: POST https://partner.quantri360.com/v1/tiktok/product/202604/opportunities/query
Description
Tìm danh sách cơ hội bán hàng của người bán đã ủy quyền, có phân trang và bộ lọc loại, ngành hàng, thời gian; thứ tự do hệ thống xếp hạng.
- Gọi qua /v1/tiktok/product/202604/opportunities/query 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
POST https://partner.quantri360.com/v1/tiktok/product/202604/opportunities/query
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 |
|---|---|---|---|---|---|
| page_size | query | int | Yes | 10 | Số kết quả mỗi trang. |
| page_token | query | string | No | Con trỏ phân trang; lần đầu có thể bỏ. | |
| locale | query | string | No | vi-VN | Mã ngôn ngữ hiển thị; mặc định theo gian hàng. |
| opportunity_type | body | string | Yes | PRODUCT | Loại cơ hội bán hàng; giá trị liên quan: PRODUCT, KEYWORD, CATEGORY. |
| category_ids | body | string[] | No | ["900000000000000001"] | Danh sách mã ngành hàng. |
| create_time_ge | body | int | No | 1793494800 | Tạo từ mốc này, bao gồm; Unix giây. |
| create_time_lt | body | int | No | 1793494800 | Tạo trước mốc này, không bao gồm; Unix giây. |
| tag_codes | body | string[] | No | ["Minh họa"] | Tối đa 20 mã nhãn, viết thường. core_product và top_product chỉ dùng cho opportunity_type=PRODUCT; khả năng dùng còn phụ thuộc cấu hình người bán và thị trường; giá trị liên quan: PRODUCT. |
Request examples
curl -s -X POST "https://partner.quantri360.com/v1/tiktok/product/202604/opportunities/query?page_size=10&page_token=&locale=vi-VN" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"opportunity_type":"PRODUCT","category_ids":["900000000000000001"],"create_time_ge":1793494800,"create_time_lt":1793494800,"tag_codes":["Minh họa"]}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/tiktok/product/202604/opportunities/query",
params={
"page_size": 10,
"page_token": "",
"locale": "vi-VN"
},
json={
"opportunity_type": "PRODUCT",
"category_ids": [
"900000000000000001"
],
"create_time_ge": 1793494800,
"create_time_lt": 1793494800,
"tag_codes": [
"Minh họa"
]
},
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/product/202604/opportunities/query');
for (const [k, v] of Object.entries({"page_size":10,"page_token":"","locale":"vi-VN"})) 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({"opportunity_type":"PRODUCT","category_ids":["900000000000000001"],"create_time_ge":1793494800,"create_time_lt":1793494800,"tag_codes":["Minh họa"]}),
});
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/product/202604/opportunities/query' . '?' . http_build_query(['page_size' => 10, 'page_token' => '', 'locale' => 'vi-VN']);
$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, '{"opportunity_type":"PRODUCT","category_ids":["900000000000000001"],"create_time_ge":1793494800,"create_time_lt":1793494800,"tag_codes":["Minh họa"]}');
$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 | YEU_CAU_MINH_HOA | Mã yêu cầu để tra cứu lỗi. |
| data | object | Dữ liệu. | |
| data | object | Dữ liệu. | |
| opportunities | object[] | Danh sách cơ hội bán hàng. | |
| id | string | 900000000000000001 | Mã định danh. |
| title | string | Áo thun cotton cổ tròn minh họa | Tiêu đề. |
| reference_images | string[] | Các ảnh tham chiếu. | |
| category_id_level_1 | string | Minh họa | Mã ngành hàng cấp 1. |
| category_id_level_2 | string | Minh họa | Mã ngành hàng cấp 2. |
| category_id_level_3 | string | Minh họa | Mã ngành hàng cấp 3. |
| category_name_level_1 | string | Minh họa | Tên ngành hàng cấp 1. |
| category_name_level_2 | string | Minh họa | Tên ngành hàng cấp 2. |
| category_name_level_3 | string | Minh họa | Tên ngành hàng cấp 3. |
| is_collected | bool | false | Đã được lưu. |
| query_words | string | Minh họa | Các từ khóa truy vấn. |
| opportunity_type | string | PRODUCT | Loại cơ hội bán hàng. |
| brand_name | string | Thương hiệu minh họa | Tên thương hiệu để lọc. |
| create_time | int | 1793494800 | Thời gian tạo; Unix giây. |
| expire_time | int | 1793494800 | Thời điểm hết hạn. |
| est_market_sales_volume | string | Minh họa | Sản lượng thị trường ước tính. |
| est_market_gmv | string | Minh họa | GMV thị trường ước tính. |
| search_volume | string | Minh họa | Lượng tìm kiếm. |
| competitor_product_count | string | Minh họa | Số sản phẩm cạnh tranh. |
| video_view_pv | string | Minh họa | Lượt xem video. |
| tags | string | Minh họa | Các nhãn. |
| tag_codes | string[] | Các mã nhãn. | |
| reward_info | string | Minh họa | Thông tin phần thưởng. |
| external_product_id | string | 900000000000000001 | Mã sản phẩm trong hệ thống bên ngoài. |
| reference_source | string | Minh họa | Nguồn tham chiếu; giá trị liên quan: UNIVERSAL_PRODUCT, NEXUS_SHOPIFY, SHOPIFY_NON_1P, MERCADO_LIBRE, SHOPEE, AMAZON, LOOKFANTASTIC, WALMART, TTS, ASOS, DTCNEXUS, TEMU, SHOPIFY, SHEIN, PIXEL, MIRAVIA, RAKUTEN, EBAY, ONBUY, ALLEGRO, BOL, DTC. |
| next_page_token | string | Con trỏ trang tiếp theo; rỗng là hết trang. | |
| total_count | int | 1 | Tổng số kết quả. |
Response sample
{
"code": 0,
"message": "Success",
"request_id": "YEU_CAU_MINH_HOA",
"data": {
"data": {
"opportunities": [
{
"id": "900000000000000001",
"title": "Áo thun cotton cổ tròn minh họa",
"reference_images": [
"Minh họa"
],
"category_id_level_1": "Minh họa",
"category_id_level_2": "Minh họa",
"category_id_level_3": "Minh họa",
"category_name_level_1": "Minh họa",
"category_name_level_2": "Minh họa",
"category_name_level_3": "Minh họa",
"is_collected": false,
"query_words": "Minh họa",
"opportunity_type": "PRODUCT",
"brand_name": "Thương hiệu minh họa",
"create_time": 1793494800,
"expire_time": 1793494800,
"est_market_sales_volume": "Minh họa",
"est_market_gmv": "Minh họa",
"search_volume": "Minh họa",
"competitor_product_count": "Minh họa",
"video_view_pv": "Minh họa",
"tags": "Minh họa",
"tag_codes": [
"Minh họa"
],
"reward_info": "Minh họa",
"external_product_id": "900000000000000001",
"reference_source": "Minh họa"
}
],
"next_page_token": "",
"total_count": 1
}
}
}
Get started
- Sign up for Partner
- Enable a data type of the Sản phẩm group on the platform page
- Create an API key (tick the TikTok Shop channel)
- Call it as in the examples above