צפייה בנתונים סטטיסטיים ובבעיות במוצרים

אפשר להשתמש בשיטה 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/12345/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/12345/products/online~en~US~SKU001",
            "accounts/12345/products/online~en~US~SKU002"
          ]
        },
        {
          "issueType": "invalid_price",
          "severity": "CRITICAL",
          "numProducts": "10",
          "sampleProducts": [
            "accounts/12345/products/online~en~US~SKU003"
          ]
        }
      ]
    },
    {
      "name": "accounts/12345/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/12345/products/online~en~US~SKU001",
            "accounts/12345/products/online~en~US~SKU002"
          ]
        }
      ]
    }
  ]
}

איך מקבלים סטטוסים של מוצרים במדינה וביעדים ספציפיים

כדי לסנן את התוצאות ולהציג את הסטטוס של מדינה ויעד ספציפיים, משתמשים בפרמטר השאילתה filter עם ה-method ‏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/12345/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/12345/products/online~en~US~SKU001",
            "accounts/12345/products/online~en~US~SKU002"
          ]
        },
        {
          "issueType": "invalid_price",
          "severity": "CRITICAL",
          "numProducts": "10",
          "sampleProducts": [
            "accounts/12345/products/online~en~US~SKU003"
          ]
        }
      ]
    }
  ]
}