v2.ams.get_validation_report
GET/api/v2/ams/get_validation_reportGọi qua 360: GET https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_report
Mô tả API
Chi tiết một BILL hoa hồng tháng (lấy từ get_validation_list): danh sách đơn affiliate thuộc bill — trạng thái, xác thực, affiliate, hoa hồng đơn, từng sản phẩm với tỷ lệ / tiền hoa hồng. Dùng đối soát bill hoa hồng tháng tới từng đơn.
- Bill tháng 202610 (đã kiểm) ứng với đơn đặt tới hết 30/09/2026: end 01/10 →
error_param"place_order_time_end too late"; start 01/08 chạy, start 01/07 → "place_order_time_start too early". - Lấy validation_id / validation_month / campaign_source từ get_validation_list; campaign_source phải khớp bill.
- Tiền, tỷ lệ là CHUỖI; tỷ lệ có ký tự %.
Request
Địa chỉ
GET https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_report
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ả |
|---|---|---|---|---|---|
| page_no | query | int | Có | 1 | Trang, từ 1. |
| page_size | query | int | Có | 500 | 1–500; page_no × page_size ≤ 10.000. |
| validation_id | query | string | Có | 10000000015 | Mã bill (get_validation_list). |
| validation_month | query | int | Có | 202610 | Tháng bill YYYYMM. |
| campaign_source | query | string | Có | Seller | Seller · ShopeeManaged — khớp bill. |
| place_order_time_start | query | timestamp | Có | 1788195600 | Đặt hàng từ (giây). |
| place_order_time_end | query | timestamp | Có | 1790787599 | Đặt hàng đến (giây) — không được sau cuối tháng TRƯỚC validation_month. |
| order_sn | query | string | Không | Một mã đơn. | |
| item_id | query | int | Không | Một sản phẩm. | |
| item_name | query | string | Không | Tên sản phẩm. | |
| verified_status | query | string | Không | Valid | Valid · Invalid. |
| attr_campaign_id | query | int | Không | Mã chiến dịch. | |
| l1_category_id | query | int | Không | Ngành cấp 1 (l2_, l3_ tương tự). |
Phân trang
Tăng page_no khi response.has_more = true.
Ví dụ request
curl -s "https://partner.quantri360.com/v1/shopee_ams/api/v2/ams/get_validation_report?page_no=1&page_size=500&validation_id=10000000015&validation_month=202610&campaign_source=Seller&place_order_time_start=1788195600&place_order_time_end=1790787599" \ -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_report",
params={
"page_no": 1,
"page_size": 500,
"validation_id": "10000000015",
"validation_month": 202610,
"campaign_source": "Seller",
"place_order_time_start": 1788195600,
"place_order_time_end": 1790787599
},
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_report');
for (const [k, v] of Object.entries({"page_no":1,"page_size":500,"validation_id":"10000000015","validation_month":202610,"campaign_source":"Seller","place_order_time_start":1788195600,"place_order_time_end":1790787599})) 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_report' . '?' . http_build_query(['page_no' => 1, 'page_size' => 500, 'validation_id' => '10000000015', 'validation_month' => 202610, 'campaign_source' => 'Seller', 'place_order_time_start' => 1788195600, 'place_order_time_end' => 1790787599]); $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 | ||
| total_count | int | 51 | Tổng đơn khớp. |
| has_more | bool | true | |
| list | object[] | Mỗi phần tử một đơn — cấu trúc như list của get_conversion_report (order_sn, order_status, verified_status, place_order_time, order_completed_time, conversion_completed_time, affiliate_*, linked_mcn, order_brand_commission, channel, order_type, buyer_status, campaign_partner, items[]). | |
| order_sn | string | 26092997ARPABCD | Mã đơn. |
| place_order_time | string | 2026-09-29 00:51:56 | Chuỗi giờ Việt Nam. |
| order_brand_commission | string | 1894.3 | Hoa hồng đơn (VND, chuỗi). |
| items | object[] | item_id, model_id, price (chuỗi), qty, purchase_value, item_brand_commission, item_brand_commission_rate_to_affiliate ("1.00%"), seller_service_fee … | |
| item_id | int64 | Mã sản phẩm. | |
| item_name | string | Tên sản phẩm. | |
| model_id | int64 | Mã phân loại sản phẩm. | |
| l1_category_id | int64 | Mã ngành hàng cấp 1. | |
| l2_category_id | int64 | Mã ngành hàng cấp 2. | |
| l3_category_id | int64 | Mã ngành hàng cấp 3. | |
| promotion_id | string | Mã chương trình khuyến mãi. | |
| price | int64 | Giá theo đơn vị tiền tệ nhỏ nhất. | |
| qty | int64 | Số lượng mua. | |
| seller_campaign_type | string | Loại chiến dịch: Seller Open Campaign (mở) hoặc Seller Target Campaign (chọn affiliate). | |
| attr_campaign_id | int64 | Mã quy tắc chiến dịch được áp dụng. | |
| purchase_value | int64 | Tổng giá trị mua theo đơn vị tiền tệ nhỏ nhất. | |
| refund_amount | string | Số tiền hoàn cho sản phẩm. | |
| item_brand_commission | string | Hoa hồng sản phẩm do người bán trả. | |
| item_brand_commission_rate_to_affiliate | string | Tỷ lệ hoa hồng dành cho affiliate. | |
| item_brand_commission_to_affiliate | string | Số tiền hoa hồng dành cho affiliate. | |
| item_brand_commission_rate_to_mcn | string | Tỷ lệ hoa hồng dành cho MCN. | |
| item_brand_commission_to_mcn | string | Số tiền hoa hồng dành cho MCN. | |
| seller_service_fee_rate | string | Tỷ lệ phí dịch vụ người bán. | |
| seller_service_fee | string | Phí dịch vụ = item_brand_commission × seller_service_fee_rate. | |
| order_status | string | Trạng thái đơn: Pending · Completed · Cancelled. | |
| verified_status | string | Trạng thái xác minh: Unverified · Verified. | |
| order_completed_time | string | Thời điểm đơn hoàn tất. | |
| conversion_completed_time | string | Thời điểm chuyển đổi hoàn tất. | |
| affiliate_name | string | Tên hiển thị affiliate. | |
| affiliate_username | string | Tên đăng nhập affiliate. | |
| linked_mcn | string | MCN liên kết với affiliate, nếu có. | |
| campaign_partner | string | Mã đối tác chiến dịch. | |
| order_type | string | Loại đơn: trực tiếp hoặc gián tiếp. | |
| channel | string | Kênh phát sinh tiếp thị. | |
| affiliate_id | int64 | Mã affiliate; dùng query_affiliate_list để tra chi tiết. | |
| buyer_status | string | Trạng thái người mua: New · Existing. |
Mẫu phản hồi
{
"error": "",
"message": "",
"request_id": "e3e3e7f35ef7b060…",
"response": {
"has_more": true,
"total_count": 51,
"list": [
{
"order_sn": "26092997ARPABCD",
"order_status": "Completed",
"verified_status": "Valid",
"place_order_time": "2026-09-29 00:51:56",
"order_completed_time": "2026-09-30 21:18:57",
"conversion_completed_time": "2026-09-30 21:18:57",
"affiliate_id": 10000000016,
"affiliate_name": "koc_mau",
"affiliate_username": "koc_mau",
"linked_mcn": "",
"order_brand_commission": "1894.3",
"channel": "Facebook",
"order_type": "Indirect Order",
"buyer_status": "Existing",
"campaign_partner": "",
"items": [
{
"item_id": 10000000017,
"item_name": "Quần suông công sở ống đứng Thương hiệu mẫu … SQDBC3020",
"model_id": 10000000018,
"l1_category_id": 100017,
"l2_category_id": 100100,
"l3_category_id": 100358,
"promotion_id": "",
"price": "219000",
"qty": 1,
"seller_campaign_type": "Seller Open Campaign",
"attr_campaign_id": 10000000019,
"purchase_value": "189430",
"refund_amount": "0",
"item_brand_commission": "1894.3",
"item_brand_commission_rate_to_affiliate": "1.00%",
"item_brand_commission_to_affiliate": "1894.3",
"item_brand_commission_rate_to_mcn": "0.00%",
"item_brand_commission_to_mcn": "0",
"seller_service_fee_rate": "0.00%",
"seller_service_fee": "0"
}
]
}
]
}
}
Mã lỗi của Shopee AMS (6)
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_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