tiktok.return_refund.202602.cancellations.search
POST/return_refund/202602/cancellations/searchGọi qua 360: POST https://partner.quantri360.com/v1/tiktok/return_refund/202602/cancellations/search
Mô tả API
Tìm yêu cầu hủy đơn hàng.
- Gọi qua /v1/tiktok/return_refund/202602/cancellations/search 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
Địa chỉ
POST https://partner.quantri360.com/v1/tiktok/return_refund/202602/cancellations/search
Xác thực & gian hàng
| Tên | Vị trí | Kiểu | Mẫu | Mô tả |
|---|---|---|---|---|
| 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. |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| sort_field | query | string | Không | minh-hoa | Sắp xếp trường. Giá trị / trường liên quan: create_time, update_time. |
| sort_order | query | string | Không | ASC | Sắp xếp đơn. Giá trị / trường liên quan: ASC, DESC. |
| page_size | query | string | Không | minh-hoa | Số kết quả trên một trang. |
| page_token | query | string | Không | Mã trang nhận từ next_page_token của phản hồi trước. | |
| cancel_ids | body | string[] | Không | ["100000000000000001"] | Các mã hủy. |
| order_ids | body | string[] | Không | ["100000000000000001"] | Danh sách mã đơn hàng. |
| buyer_user_ids | body | string[] | Không | ["100000000000000001"] | Các mã người mua người dùng. |
| cancel_types | body | string[] | Không | ["CANCEL"] | Hủy các loại. Giá trị / trường liên quan: CANCEL, BUYER_CANCEL. |
| cancel_status | body | string[] | Không | ["CANCELLATION_REQUEST_PENDING"] | Hủy trạng thái. Giá trị / trường liên quan: CANCELLATION_REQUEST_PENDING, CANCELLATION_REQUEST_SUCCESS, CANCELLATION_REQUEST_CANCEL, CANCELLATION_REQUEST_COMPLETE. |
| create_time_ge | body | int | Không | 1792650000 | Tạo thời gian từ bao gồm. Mốc Unix giây. |
| create_time_lt | body | int | Không | 1792650000 | Tạo thời gian trước không gồm. Mốc Unix giây. |
| update_time_ge | body | int | Không | 1792650000 | Cập nhật thời gian từ bao gồm. Mốc Unix giây. |
| update_time_lt | body | int | Không | 1792650000 | Cập nhật thời gian trước không gồm. Mốc Unix giây. |
| locale | body | string | Không | vi-VN | Ngôn ngữ. |
Ví dụ request
curl -s -X POST "https://partner.quantri360.com/v1/tiktok/return_refund/202602/cancellations/search?page_size=minh-hoa" \
-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/return_refund/202602/cancellations/search",
params={
"page_size": "minh-hoa"
},
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/return_refund/202602/cancellations/search');
for (const [k, v] of Object.entries({"page_size":"minh-hoa"})) 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/return_refund/202602/cancellations/search' . '?' . http_build_query(['page_size' => 'minh-hoa']);
$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ên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| code | int | 0 | Mã kết quả; 0 là thành công. |
| message | string | Success | Thông báo kết quả; khi lỗi, đọc nội dung để xử lý. |
| request_id | string | DEMO_REQUEST_0001 | Mã truy vết yêu cầu. |
| data | object | Dữ liệu. | |
| cancellations | object[] | Các yêu cầu hủy. | |
| order_id | string | 100000000000000001 | Mã đơn hàng. |
| cancel_type | string | Hủy loại. Giá trị / trường liên quan: CANCEL, BUYER_CANCEL. | |
| cancel_status | string | Hủy trạng thái. Giá trị / trường liên quan: CANCELLATION_REQUEST_PENDING, CANCELLATION_REQUEST_SUCCESS, CANCELLATION_REQUEST_CANCEL, CANCELLATION_REQUEST_COMPLETE. | |
| role | string | Vai trò. Giá trị / trường liên quan: BUYER, SELLER, OPERATOR, SYSTEM. | |
| cancel_reason | string | Hủy lý do. | |
| cancel_reason_text | string | Hủy lý do nội dung. | |
| create_time | number | 1792650000 | Tạo thời gian. Mốc Unix giây. |
| update_time | number | 1792650000 | Cập nhật thời gian. Mốc Unix giây. |
| seller_next_action_response | object[] | Người bán tiếp theo hành động phản hồi. | |
| action | string | Hành động. Giá trị / trường liên quan: SELLER_RESPOND_BUYER_CANCEL. | |
| deadline | int | 1 | Hạn chót. Mốc Unix giây. |
| refund_amount | object | Hoàn tiền số tiền. | |
| currency | string | VND | Mã tiền tệ. |
| refund_total | string | 10000 | Hoàn tiền tổng. |
| refund_subtotal | string | 10000 | Hoàn tiền tạm tính. |
| refund_shipping_fee | string | 10000 | Hoàn tiền vận chuyển phí. |
| refund_tax | string | 10000 | Hoàn tiền thuế. |
| retail_delivery_fee | string | 10000 | Bán lẻ giao hàng phí. |
| buyer_service_fee | string | 10000 | Người mua dịch vụ phí. |
| cancel_line_items | object[] | Hủy dòng các mặt hàng. | |
| cancel_line_item_id | string | 100000000000000001 | Mã hủy dòng mặt hàng. |
| order_line_item_id | string | 100000000000000001 | Mã dòng hàng trong đơn. |
| sku_id | string | 100000000000000001 | Mã SKU. |
| sku_name | string | Mẫu minh họa | Sku tên. |
| product_image | object | Sản phẩm ảnh. | |
| url | string | https://example.com/tep-minh-hoa.pdf | Url. |
| width | number | 1 | Rộng. |
| height | number | 1 | Cao. |
| product_name | string | Mẫu minh họa | Sản phẩm tên. |
| seller_sku | string | Người bán sku. | |
| refund_amount | object | Hoàn tiền số tiền. | |
| currency | string | VND | Mã tiền tệ. |
| refund_total | string | 10000 | Hoàn tiền tổng. |
| refund_subtotal | string | 10000 | Hoàn tiền tạm tính. |
| refund_shipping_fee | string | 10000 | Hoàn tiền vận chuyển phí. |
| refund_tax | string | 10000 | Hoàn tiền thuế. |
| retail_delivery_fee | string | 10000 | Bán lẻ giao hàng phí. |
| buyer_service_fee | string | 10000 | Người mua dịch vụ phí. |
| cancel_sub_line_items | object[] | Hủy con dòng các mặt hàng. | |
| cancel_sub_line_item_id | string | 100000000000000001 | Mã hủy con dòng mặt hàng. |
| cancel_line_item_id | string | 100000000000000001 | Mã hủy dòng mặt hàng. |
| sub_order_line_item_id | string | 100000000000000001 | Mã con đơn dòng mặt hàng. |
| order_line_item_id | string | 100000000000000001 | Mã dòng hàng trong đơn. |
| sku_id | string | 100000000000000001 | Mã SKU. |
| sku_name | string | Mẫu minh họa | Sku tên. |
| product_image | object | Sản phẩm ảnh. | |
| url | string | https://example.com/tep-minh-hoa.pdf | Url. |
| width | int | 1 | Rộng. |
| height | int | 1 | Cao. |
| product_name | string | Mẫu minh họa | Sản phẩm tên. |
| seller_sku | string | Người bán sku. | |
| refund_amount | object | Hoàn tiền số tiền. | |
| currency | string | VND | Mã tiền tệ. |
| refund_total | string | 10000 | Hoàn tiền tổng. |
| refund_subtotal | string | 10000 | Hoàn tiền tạm tính. |
| refund_shipping_fee | string | 10000 | Hoàn tiền vận chuyển phí. |
| refund_tax | string | 10000 | Hoàn tiền thuế. |
| retail_delivery_fee | string | 10000 | Bán lẻ giao hàng phí. |
| buyer_service_fee | string | 10000 | Người mua dịch vụ phí. |
| cancel_id | string | 100000000000000001 | Mã yêu cầu hủy. |
| should_replenish_stock | boolean | false | Nên bổ sung tồn kho. |
| total_count | number | 1 | Tổng số kết quả khớp bộ lọc. |
| next_page_token | string | Mã trang tiếp theo; rỗng khi hết kết quả. Giá trị / trường liên quan: page_token. |
Mẫu phản hồi
{
"code": 0,
"message": "Success",
"request_id": "DEMO_REQUEST_0001",
"data": {
"cancellations": [
{
"order_id": "100000000000000001",
"cancel_type": "",
"cancel_status": "",
"role": "",
"cancel_reason": "",
"cancel_reason_text": "",
"create_time": 1792650000,
"update_time": 1792650000,
"seller_next_action_response": [
{
"action": "",
"deadline": 1
}
],
"refund_amount": {
"currency": "VND",
"refund_total": "10000",
"refund_subtotal": "10000",
"refund_shipping_fee": "10000",
"refund_tax": "10000",
"retail_delivery_fee": "10000",
"buyer_service_fee": "10000"
},
"cancel_line_items": [
{
"cancel_line_item_id": "100000000000000001",
"order_line_item_id": "100000000000000001",
"sku_id": "100000000000000001",
"sku_name": "Mẫu minh họa",
"product_image": {
"url": "https://example.com/tep-minh-hoa.pdf",
"width": 1,
"height": 1
},
"product_name": "Mẫu minh họa",
"seller_sku": "",
"refund_amount": {
"currency": "VND",
"refund_total": "10000",
"refund_subtotal": "10000",
"refund_shipping_fee": "10000",
"refund_tax": "10000",
"retail_delivery_fee": "10000",
"buyer_service_fee": "10000"
},
"cancel_sub_line_items": [
{
"cancel_sub_line_item_id": "100000000000000001",
"cancel_line_item_id": "100000000000000001",
"sub_order_line_item_id": "100000000000000001",
"order_line_item_id": "100000000000000001",
"sku_id": "100000000000000001",
"sku_name": "Mẫu minh họa",
"product_image": {
"url": "https://example.com/tep-minh-hoa.pdf",
"width": 1,
"height": 1
},
"product_name": "Mẫu minh họa",
"seller_sku": "",
"refund_amount": {
"currency": "VND",
"refund_total": "10000",
"refund_subtotal": "10000",
"refund_shipping_fee": "10000",
"refund_tax": "10000",
"retail_delivery_fee": "10000",
"buyer_service_fee": "10000"
}
}
]
}
],
"cancel_id": "100000000000000001",
"should_replenish_stock": false
}
],
"total_count": 1,
"next_page_token": ""
}
}
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Đơn hàng ở trang nền tảng
- Tạo API key (tick kênh TikTok Shop)
- Gọi theo ví dụ ở trên