ย้ายข้อมูลสถานะบัญชีไปยังสถานะผลิตภัณฑ์รวม
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
วิธีดึงสถิติและปัญหาเกี่ยวกับผลิตภัณฑ์ที่รวบรวมไว้ได้เปลี่ยนไปแล้ว
ฟังก์ชันที่ก่อนหน้านี้มีอยู่ในแหล่งข้อมูล accountstatuses
ใน Content API for Shopping ตอนนี้แยกออกเป็นแหล่งข้อมูลเฉพาะใน Merchant API แล้ว คำแนะนำนี้จะอธิบายวิธีย้ายข้อมูลการผสานรวมเพื่อใช้แหล่งข้อมูล aggregateProductStatuses
ใหม่
หมายเหตุ: ใน Merchant API ปัญหาที่ระดับบัญชีและสถานะผลิตภัณฑ์รวม
จะแยกกัน นอกจากนี้ โปรดอ่านคำแนะนำในการย้ายข้อมูลจาก accountstatuses
ไปยังปัญหาเกี่ยวกับบัญชี
ความแตกต่างที่สำคัญ
ความแตกต่างที่สำคัญระหว่างฟีเจอร์สถานะผลิตภัณฑ์ใน Content API for Shopping กับ Merchant API มีดังนี้
- แหล่งข้อมูลเฉพาะ: ตอนนี้เราได้แยกแหล่งข้อมูล
accountstatuses
จาก Content API
for Shopping แล้ว ใน Merchant API ปัญหาระดับบัญชีจะพร้อมใช้งานผ่านแหล่งข้อมูล accountissues
ขณะที่สถิติผลิตภัณฑ์ที่รวบรวมและปัญหาระดับสินค้าจะพร้อมใช้งานผ่านแหล่งข้อมูลใหม่ aggregateProductStatuses
- โครงสร้างทรัพยากรใหม่:
AggregateProductStatus
เป็นทรัพยากรใหม่ที่
แสดงสถิติและปัญหาสำหรับชุดค่าผสมที่เฉพาะเจาะจงของ
บริบทการรายงานและประเทศ
- กลไกการกรอง: แทนที่จะใช้พารามิเตอร์การค้นหา เช่น
destinations
เพื่อเลือกข้อมูล Merchant API จะใช้วิธีการ list
ที่มีสตริง
filter
เพื่อค้นหาบริบทการรายงานและประเทศที่เฉพาะเจาะจง
- การนำช่องออก: เราไม่ได้ใช้ฟิลด์
channel
อีกต่อไป ตอนนี้ข้อมูลนี้เป็นส่วนหนึ่งของ reportingContext
โดยปริยาย
คำขอ
Merchant API ใช้GET
คำขอที่มีพารามิเตอร์ filter
เพื่อดึงข้อมูล
สถานะผลิตภัณฑ์ที่รวบรวมแล้ว
GET
https://merchantapi.googleapis.com/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses
รายละเอียดสำหรับคำขอ |
Content API for Shopping |
Merchant API |
ดูสถิติและปัญหาเกี่ยวกับผลิตภัณฑ์ |
GET /content/v2.1/{merchantId}/accountstatuses/{accountId} |
GET /issueresolution/v1/accounts/{accountId}/aggregateProductStatuses |
รหัสระบุ
วิธีระบุทรัพยากรมีการเปลี่ยนแปลงเพื่อรองรับโครงสร้างใหม่
คำอธิบายตัวระบุ |
Content API for Shopping |
Merchant API |
ตัวระบุทรัพยากร |
accountId ระบุแหล่งที่มาของทรัพยากร ระบบเลือกชิ้นข้อมูลที่เฉพาะเจาะจงด้วยพารามิเตอร์การค้นหา |
ชื่อทรัพยากรจะระบุข้อมูลที่ไม่ซ้ำกันสำหรับบริบทการรายงานและประเทศที่เฉพาะเจาะจง: accounts/{account}/aggregateProductStatuses/{reportingContext}~{country} |
เมธอด
เราได้อัปเดตวิธีการดึงสถานะผลิตภัณฑ์เป็นวิธี list
ที่รองรับการกรอง
เมธอด Content API for Shopping |
เมธอดของ Merchant API |
ความพร้อมใช้งานและหมายเหตุ |
accountstatuses.get |
aggregateProductStatuses.list |
accountstatuses.get เมธอดจะแสดงทรัพยากรเดียวที่มีสถิติผลิตภัณฑ์ทั้งหมด aggregateProductStatuses.list วิธีการใหม่จะแสดงผลรายการทรัพยากร โดยมี 1 รายการสำหรับบริบทการรายงานและชุดค่าผสมประเทศแต่ละรายการ ใช้พารามิเตอร์ filter เพื่อดึงข้อมูลที่เฉพาะเจาะจง สำหรับปัญหาระดับบัญชี ให้ใช้ accountissues.list |
การเปลี่ยนแปลงช่องโดยละเอียด
ฟิลด์สำหรับสถิติและปัญหาเกี่ยวกับผลิตภัณฑ์ได้รับการอัปเดตและจัดโครงสร้างใหม่
ในแหล่งข้อมูล AggregateProductStatus
ใหม่
Content API for Shopping |
Merchant API |
คำอธิบาย |
products |
aggregate_product_statuses |
อาร์เรย์ products จะแทนที่ด้วยฟิลด์ aggregate_product_statuses ที่ซ้ำกันในการตอบกลับรายการ |
destination |
reporting_context |
ฟิลด์ destination จะแทนที่ด้วย reporting_context ซึ่งระบุบริบทของโปรแกรมสำหรับสถิติ |
channel |
(ไม่มีช่องที่เทียบเท่า) |
ระบบจะนำฟิลด์ channel ออก ตอนนี้ข้อมูลนี้เป็นส่วนหนึ่งของ reporting_context แล้ว |
statistics |
stats |
เปลี่ยนชื่อออบเจ็กต์ statistics เป็น stats ระบบจะแปลงชื่อช่องภายในเป็นรูปแบบ snake_case เช่น activeCount จะกลายเป็น active_count |
itemLevelIssues.servability |
item_level_issues.severity |
ระบบจะแทนที่การแจงนับ servability ด้วยการแจงนับ severity เพื่ออธิบายผลกระทบของปัญหา |
itemLevelIssues.attributeName |
item_level_issues.attribute |
เปลี่ยนชื่อฟิลด์ attributeName เป็น attribute |
itemLevelIssues.documentation |
item_level_issues.documentation_uri |
เปลี่ยนชื่อฟิลด์ documentation เป็น documentation_uri |
itemLevelIssues.numItems |
item_level_issues.product_count |
เปลี่ยนชื่อฟิลด์ numItems เป็น product_count |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-08 UTC
[null,null,["อัปเดตล่าสุด 2025-08-08 UTC"],[],[],null,["# Migrate accountstatuses to Aggregate Product Statuses\n\nThe way you retrieve aggregated product statistics and issues has changed. The\nfunctionality previously available in the `accountstatuses` resource in the\nContent API for Shopping is now split into dedicated resources in the Merchant\nAPI. This guide explains how to migrate your integration to use the new\n[`aggregateProductStatuses`](/merchant/api/reference/rest/issueresolution_v1/accounts.aggregateProductStatuses)\nresource.\n\n**Note** : In Merchant API, account-level issues and aggregate product statuses\nare split. Also review our guide to migrate from `accountstatuses` to\n[account issues](/merchant/api/guides/compatibility/migrate-view-issues).\n\nKey differences\n---------------\n\nHere are the key differences between the product status features in Content\nAPI for Shopping and Merchant API:\n\n- **Dedicated resources** : The `accountstatuses` resource from Content API for Shopping is now split. In Merchant API, account-level issues are available through the [`accountissues`](/merchant/api/reference/rest/accounts_v1/accounts.issues) resource, while aggregated product statistics and item-level issues are available through the new [`aggregateProductStatuses`](/merchant/api/reference/rest/issueresolution_v1/accounts.aggregateProductStatuses) resource.\n- **New resource structure** : `AggregateProductStatus` is a new resource that represents the statistics and issues for a specific combination of a reporting context and a country.\n- **Filtering mechanism** : Instead of using query parameters like `destinations` to select data, Merchant API uses a `list` method with a `filter` string to query for specific reporting contexts and countries.\n- **Channel field removal** : The `channel` field is no longer used. This information is now implicitly part of the `reportingContext`.\n\nRequests\n--------\n\nMerchant API uses a `GET` request with a `filter` parameter to retrieve\naggregated product statuses.\n\n`GET\nhttps://merchantapi.googleapis.com/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses`\n\n### Request URL format\n\n| Request description | Content API for Shopping | Merchant API |\n|-----------------------------------|--------------------------------------------------------------|-------------------------------------------------------------------------|\n| Get product statistics and issues | `GET /content/v2.1/{merchantId}/accountstatuses/{accountId}` | `GET /issueresolution/v1/accounts/{accountId}/aggregateProductStatuses` |\n\nIdentifiers\n-----------\n\nThe way resources are identified has changed to support the new structure.\n\n### Identifier format\n\n| Identifier description | Content API for Shopping | Merchant API |\n|------------------------|-------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Resource Identifier | The resource was identified by `accountId`. Specific data slices were selected with query parameters. | The resource name uniquely identifies the data for a specific reporting context and country: `accounts/{account}/aggregateProductStatuses/{reportingContext}~{country}`. |\n\nMethods\n-------\n\nThe method for retrieving product statuses has been updated to a `list` method\nthat supports filtering.\n\n| Content API for Shopping method | Merchant API method | Availability \\& notes |\n|---------------------------------|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `accountstatuses.get` | `aggregateProductStatuses.list` | The `accountstatuses.get` method returned a single resource containing all product statistics. The new `aggregateProductStatuses.list` method returns a list of resources, one for each reporting context and country combination. Use the `filter` parameter to retrieve specific data. For account-level issues, use `accountissues.list`. |\n\nDetailed field changes\n----------------------\n\nThe fields for product statistics and issues have been updated and restructured\nin the new `AggregateProductStatus` resource.\n\n| Content API for Shopping | Merchant API | Description |\n|---------------------------------|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| `products` | `aggregate_product_statuses` | The `products` array is replaced by the `aggregate_product_statuses` repeated field in the list response. |\n| `destination` | `reporting_context` | The `destination` field is replaced by `reporting_context`, which specifies the program context for the stats. |\n| `channel` | (no equivalent field) | The `channel` field is removed. This information is now part of the `reporting_context`. |\n| `statistics` | `stats` | The `statistics` object is renamed to `stats`. Field names within are converted to snake_case, for example, `activeCount` is now `active_count`. |\n| `itemLevelIssues.servability` | `item_level_issues.severity` | The `servability` enum is replaced by the `severity` enum to describe the impact of an issue. |\n| `itemLevelIssues.attributeName` | `item_level_issues.attribute` | The field `attributeName` is renamed to `attribute`. |\n| `itemLevelIssues.documentation` | `item_level_issues.documentation_uri` | The field `documentation` is renamed to `documentation_uri`. |\n| `itemLevelIssues.numItems` | `item_level_issues.product_count` | The field `numItems` is renamed to `product_count`. |"]]