ใช้เมธอด aggregateProductStatuses.list เพื่อดูภาพรวมระดับสูงของสถานะสินค้าในบัญชี Merchant Center ซึ่งจะเป็นประโยชน์สำหรับการตรวจสอบประสิทธิภาพโดยรวมของข้อมูลผลิตภัณฑ์โดยไม่ต้องดึงข้อมูลผลิตภัณฑ์แต่ละรายการ เมธอดนี้จะแสดงจำนวนสินค้าทั้งหมดที่คุณมี โดยแบ่งตามสถานะ (อนุมัติแล้ว รอดำเนินการ ไม่ได้รับอนุมัติ) และยังแสดงปัญหาที่ส่งผลต่อสินค้าด้วย
สิ่งที่ควรพิจารณาเป็นพิเศษ
มีข้อควรพิจารณาพิเศษเมื่อใช้เมธอด aggregateProductStatuses.list
- ความพร้อมใช้งานของข้อมูล: คาดว่าจะมีเวลาหน่วงมากกว่า 30 นาทีระหว่างเวลาที่แทรกหรืออัปเดตผลิตภัณฑ์กับเวลาที่สถานะของผลิตภัณฑ์แสดงในการตอบกลับ
aggregateProductStatuses - ความสอดคล้องของปัญหา: ชื่อและคำอธิบายปัญหาที่แสดงผลโดยเมธอด
aggregateProductStatuses.listมีไว้เพื่อให้สอดคล้องกับปัญหาที่แสดงผลโดย Products API อย่างไรก็ตาม คำอธิบายปัญหาอาจแตกต่างจากคำอธิบายปัญหาที่แสดงในอินเทอร์เฟซผู้ใช้ของ Merchant Center
ดูภาพรวมของสถานะสินค้าทั้งหมด
ตัวอย่างนี้แสดงวิธีดึงข้อมูลรายการทรัพยากร AggregateProductStatus
ทรัพยากรแต่ละรายการแสดงสถานะของผลิตภัณฑ์สำหรับปลายทางและประเทศที่รวมกันอย่างเจาะจง การเรียก aggregateProductStatuses.list โดยไม่มีพารามิเตอร์ใดๆ จะแสดงสถานะทั้งหมดที่ใช้ได้สำหรับบัญชีของคุณ
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/aggregateProductStatuses
ตัวอย่างการตอบกลับจากการเรียกที่สำเร็จมีดังนี้
{
"aggregateProductStatuses": [
{
"name": "accounts/{ACCOUNT_ID}/aggregateProductStatuses/SHOPPING_ADS~US",
"reportingContext": "SHOPPING_ADS",
"countryCode": "US",
"statistics": {
"approvedCount": "1500",
"pendingCount": "50",
"disapprovedCount": "25"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/en~US~SKU003"
]
}
]
},
{
"name": "accounts/{ACCOUNT_ID}/aggregateProductStatuses/FREE_LISTINGS~US",
"reportingContext": "FREE_LISTINGS",
"countryCode": "US",
"statistics": {
"approvedCount": "1510",
"pendingCount": "50",
"disapprovedCount": "15"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/en~US~SKU002"
]
}
]
}
]
}
ดูสถานะผลิตภัณฑ์สำหรับประเทศและปลายทางที่เฉพาะเจาะจง
กรองผลลัพธ์เพื่อดูสถานะของประเทศและปลายทางที่เฉพาะเจาะจงโดยใช้พารามิเตอร์การค้นหา filter กับเมธอด aggregateProductStatuses.list ตัวอย่างเช่น
country = "US" AND reportingContext = "SHOPPING_ADS"
ดูข้อมูลโดยละเอียดเพิ่มเติมเกี่ยวกับไวยากรณ์ของตัวกรองได้ที่ไวยากรณ์ของตัวกรอง
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/aggregateProductStatuses?filter=countryCode%3D"US"%20AND%20reportingContext%3D"SHOPPING_ADS"
ตัวอย่างการตอบกลับจากการเรียกที่สำเร็จมีดังนี้
{
"aggregateProductStatuses": [
{
"name": "accounts/{ACCOUNT_ID}/aggregateProductStatuses/SHOPPING_ADS~US",
"reportingContext": "SHOPPING_ADS",
"countryCode": "US",
"statistics": {
"approvedCount": "1500",
"pendingCount": "50",
"disapprovedCount": "25"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/en~US~SKU003"
]
}
]
}
]
}