v2.ams.get_validation_list
GET/api/v2/ams/get_validation_listGọi qua 360: GET https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_list
Mô tả API
Hóa đơn hoa hồng Tiếp thị liên kết theo THÁNG (bill xác nhận hoa hồng): tổng hoa hồng phải trả, đã trừ, còn chờ, trạng thái thanh toán — tách theo nguồn chiến dịch (shop tạo / Shopee quản lý) và hình thức (trừ trực tuyến / thanh toán ngoài). Dùng đối soát chi phí affiliate theo tháng.
- Không có tham số: trả toàn bộ các tháng có bill, mỗi tháng có thể nhiều bill theo nguồn chiến dịch / hình thức.
- Hoa hồng affiliate cấp đơn xem ở
order_ams_commission_feecủa get_escrow_detail; ví người bán có giao dịch trừ AMS_COMMISSION_FEE_DEDUCT (get_wallet_transaction_list).
Request
Địa chỉ
GET https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_list
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
Không có tham số riêng (ngoài tham số chung).
Ví dụ request
curl -s "https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_list" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_list",
params={},
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/shopee_ams/api/v2/ams/get_validation_list');
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: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_list' . '?' . http_build_query([]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $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 Shopee AMS)
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| request_id | string | d52ca43b277a4f9292fb8be658bfd33d | Mã request của Shopee để tra lỗi. |
| error | string | Mã lỗi Shopee; rỗng = thành công. | |
| message | string | Mô tả lỗi. | |
| response | object | ||
| validation_list | object[] | Mỗi phần tử một bill (tháng × nguồn chiến dịch × hình thức). | |
| validation_id | string | 10000000015 | Mã bill. |
| validation_month | int | 202610 | Tháng bill (YYYYMM). |
| payment_method | int | 1 | 1 = trực tuyến (Online) · 2 = ngoài hệ thống (Offline). |
| campaign_source | string | Seller | `Seller` · `ShopeeManaged`. |
| online_bill | object | Khi payment_method = 1 (null nếu = 2). | |
| total_amount | float | 100000 | Tổng hoa hồng tháng (VND). |
| deducted_amount | float | 100000 | Đã trừ. |
| ams_credit_deducted_amount | float | 0 | Trả bằng AMS Credit. |
| pending_amount | float | 0 | Còn chờ trừ. |
| bill_status | int | 2 | 1 = chờ · 2 = hoàn tất · 3 = đang xử lý · 4 = chờ thanh toán qua link · 5 = hoàn tất thủ công · 6 = chờ thanh toán ngoài. |
| offline_bills | object[] | Khi payment_method = 2, chia theo tháng đặt hàng. | |
| order_place_month | int | 202609 | Tháng đặt hàng (YYYYMM). |
| total_amount | float | 0 | = commission_amount_after_tax + ams_credit_deducted_amount. |
| commission_amount | float | 0 | Hoa hồng trước thuế. |
| commission_amount_after_tax | float | 0 | Hoa hồng gồm thuế. |
| ams_credit_deducted_amount | float | 0 | Đã trả bằng AMS Credit. |
Mẫu phản hồi
{
"error": "",
"message": "",
"request_id": "e3e3e7f35ef6d3d8…",
"response": {
"validation_list": [
{
"validation_id": "10000000056",
"validation_month": 202610,
"payment_method": 2,
"campaign_source": "ShopeeManaged",
"online_bill": null,
"offline_bills": [
{
"order_place_month": 202609,
"total_amount": 0,
"commission_amount": 0,
"commission_amount_after_tax": 0,
"ams_credit_deducted_amount": 0
}
]
},
{
"validation_id": "10000000015",
"validation_month": 202610,
"payment_method": 1,
"campaign_source": "Seller",
"online_bill": {
"total_amount": 100000,
"deducted_amount": 100000,
"pending_amount": 0,
"bill_status": 2,
"ams_credit_deducted_amount": 0
},
"offline_bills": []
}
]
}
}
Mã lỗi của Shopee AMS (7)
Bấm để xem
| Mã | Ý nghĩa |
|---|---|
| error_param | Tham số sai / thiếu / sai kiểu — xem `message` để biết tham số nào. |
| error_server | Lỗi hệ thống Shopee — thử lại sau ít phút. |
| error_auth | Ủy quyền gian hàng cho 360 đã hết hạn hoặc bị thu hồi (360 đã tự làm mới token một lần) — chủ gian hàng kết nối lại Shopee trong Partner. |
| error_limit | Chạm hạn mức gọi Shopee trong ngày của kết nối — 360 trả kèm thời điểm thử lại; giảm tần suất gọi. |
| error_rate_limit | Gọi quá nhanh — chờ vài giây rồi gọi lại (360 cũng giới hạn theo key: 429 + Retry-After). |
| shop_banned | Gian hàng đang bị Shopee khóa — mọi API tạm ngưng tới khi gỡ khóa. |
| error_kyc_auth | Gian hàng chưa hoàn tất đăng ký người bán trên Kênh Người Bán. |
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Affiliate ở trang nền tảng
- Tạo API key (tick kênh Shopee AMS)
- Gọi theo ví dụ ở trên