يمكنك استخدام الـ
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"
]
}
]
}
]
}