ดูสถิติและปัญหาเกี่ยวกับผลิตภัณฑ์

คุณสามารถใช้เมธอด 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"
          ]
        }
      ]
    }
  ]
}