คุณสามารถใช้วิธี 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/online~en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/online~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/online~en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/online~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/online~en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU003"
]
}
]
}
]
}