tiktok.return_refund.202609.aftersales.review
POST/return_refund/202609/aftersales/reviewGọi qua 360: POST https://partner.quantri360.com/v1/tiktok/return_refund/202609/aftersales/review
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
Xét duyệt các yêu cầu hậu mãi.
- Gọi qua /v1/tiktok/return_refund/202609/aftersales/review 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. Xét duyệt các yêu cầu hậu mãi.
- HTTP 200 vẫn có thể có lỗi nghiệp vụ; kiểm code trước khi dùng kết quả.
- Quyết định áp dụng riêng cho từng dòng; số tiền hoàn một phần cũng tính cho từng dòng. Các dòng cùng SKU phải nằm trong cùng đối tượng quyết định. Lấy lý do từ GET /return_refund/202606/review_decision cho cùng yêu cầu trước khi xét duyệt.
Request
Địa chỉ
POST https://partner.quantri360.com/v1/tiktok/return_refund/202609/aftersales/review
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ả |
|---|---|---|---|---|---|
| aftersales_request_decisions | body | object[] | Không | Hậu mãi yêu cầu các quyết định. | |
| aftersales_request_decisions[].request_id | body | string | Có | DEMO_REQUEST_0001 | Mã truy vết yêu cầu. |
| aftersales_request_decisions[].request_id_type | body | string | Không | AFTERSALES | Yêu cầu mã loại. Giá trị / trường liên quan: AFTERSALES, RMA. |
| aftersales_request_decisions[].line_item_decisions | body | object[] | Có | Dòng mặt hàng các quyết định. | |
| aftersales_request_decisions[].line_item_decisions[].line_items | body | object[] | Có | Các dòng hàng. | |
| aftersales_request_decisions[].line_item_decisions[].line_items[].return_line_item_id | body | string | Có | 100000000000000001 | Mã trả hàng dòng mặt hàng. |
| aftersales_request_decisions[].line_item_decisions[].line_items[].sub_return_line_item_id | body | string | Không | 100000000000000001 | Mã con trả hàng dòng mặt hàng. |
| aftersales_request_decisions[].line_item_decisions[].action | body | string | Có | APPROVE_REQUEST | Hành động. Giá trị / trường liên quan: APPROVE_REQUEST, APPROVE_RETURN_PACKAGE, REJECT_REQUEST, REJECT_RETURN_PACKAGE, REFUND_INSTEAD, OFFER_PARTIAL_REFUND, OFFER_PARTIAL_REFUND_AFTER_RECEIVING_PKG. |
| aftersales_request_decisions[].line_item_decisions[].alternative_solution_details | body | object | Không | Thay thế giải pháp chi tiết. | |
| aftersales_request_decisions[].line_item_decisions[].alternative_solution_details.partial_refund_amount | body | string | Không | 10000 | Một phần hoàn tiền số tiền. |
| aftersales_request_decisions[].line_item_decisions[].alternative_solution_details.currency | body | string | Không | VND | Mã tiền tệ. |
| aftersales_request_decisions[].line_item_decisions[].reason | body | object | Không | Lý do. | |
| aftersales_request_decisions[].line_item_decisions[].reason.reason_id | body | string | Không | 100000000000000001 | Mã lý do. |
| aftersales_request_decisions[].line_item_decisions[].reason.text | body | string | Không | minh-hoa | Nội dung. |
| aftersales_request_decisions[].line_item_decisions[].reason.media | body | object | Không | Tệp đa phương tiện. | |
| aftersales_request_decisions[].line_item_decisions[].reason.media.uri | body | string | Không | minh-hoa | Uri. |
| aftersales_request_decisions[].line_item_decisions[].reason.media.mime_type | body | string | Không | image/png | Mime loại. |
| aftersales_request_decisions[].action_unix_time | body | int | Không | 1792650000 | Hành động unix thời gian. Mốc Unix giây. |
| aftersales_request_decisions[].idempotency_key | body | string | Không | demo-yeu-cau-0001 | Khóa chống xử lý lặp do bên gọi tạo; dùng lại cùng khóa khi thử lại cùng yêu cầu. Tối đa 255 ký tự. |
Ví dụ request
curl -s -X POST "https://partner.quantri360.com/v1/tiktok/return_refund/202609/aftersales/review" \
-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/202609/aftersales/review",
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/return_refund/202609/aftersales/review');
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/return_refund/202609/aftersales/review' . '?' . 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ê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. | |
| errors | object[] | Các lỗi. | |
| code | string | 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ý. |
Mẫu phản hồi
{
"code": 0,
"message": "Success",
"request_id": "DEMO_REQUEST_0001",
"data": {
"errors": []
}
}
Mã lỗi của TikTok Shop (2)
Bấm để xem
| Mã | Ý nghĩa |
|---|---|
| ReverseOrderExistNegotiate | 25011010 request has been transferred to platform operator 25011012 reverse status cannot approve application 25011013 reverse status cannot approve receive 25011023 forbid process authentic guarantee order 25011026 forbid process receive for FBT order 25011032 |
| ReverseInvalidStatusPartialRefund | 25020004 decision not match reverse type 25020005 No permission to process this order 25020008 Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. 25020009 reverse already cancelled |
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