Di chuyển accountstatuses sang Aggregate Product Statuses
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cách bạn truy xuất số liệu thống kê và vấn đề tổng hợp về sản phẩm đã thay đổi. Chức năng trước đây có trong tài nguyên accountstatuses trong Content API for Shopping hiện được chia thành các tài nguyên chuyên dụng trong Merchant API. Hướng dẫn này giải thích cách di chuyển hoạt động tích hợp để sử dụng tài nguyên aggregateProductStatuses mới.
Lưu ý: Trong Merchant API, các vấn đề ở cấp tài khoản và trạng thái tổng hợp của sản phẩm sẽ được tách riêng. Bạn cũng nên tham khảo hướng dẫn của chúng tôi về cách di chuyển từ accountstatuses sang các vấn đề về tài khoản.
Những điểm khác biệt chính
Sau đây là những điểm khác biệt chính giữa các tính năng trạng thái sản phẩm trong Content API for Shopping và Merchant API:
Tài nguyên chuyên dụng: Tài nguyên accountstatuses trong Content API for Shopping hiện đã được tách ra. Trong Merchant API, các vấn đề ở cấp tài khoản có sẵn thông qua tài nguyên accountissues, trong khi số liệu thống kê tổng hợp về sản phẩm và các vấn đề ở cấp mặt hàng có sẵn thông qua tài nguyên aggregateProductStatuses mới.
Cấu trúc tài nguyên mới: AggregateProductStatus là một tài nguyên mới, thể hiện số liệu thống kê và vấn đề cho một tổ hợp cụ thể của bối cảnh báo cáo và một quốc gia.
Cơ chế lọc: Thay vì sử dụng các tham số truy vấn như destinations để chọn dữ liệu, Merchant API sử dụng phương thức list với chuỗi filter để truy vấn các quốc gia và bối cảnh báo cáo cụ thể.
Xoá trường kênh: Trường channel không còn được dùng nữa. Thông tin này hiện là một phần ngầm định của reportingContext.
Yêu cầu
Merchant API sử dụng yêu cầu GET có tham số filter để truy xuất trạng thái tổng hợp của sản phẩm.
GET
https://merchantapi.googleapis.com/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses
Định dạng URL yêu cầu
Nội dung mô tả yêu cầu
Content API for Shopping
Merchant API
Nhận số liệu thống kê và vấn đề về sản phẩm
GET /content/v2.1/{merchantId}/accountstatuses/{accountId}
GET /issueresolution/v1/accounts/{accountId}/aggregateProductStatuses
Giá trị nhận dạng
Cách xác định tài nguyên đã thay đổi để hỗ trợ cấu trúc mới.
Định dạng giá trị nhận dạng
Thông tin mô tả về giá trị nhận dạng
Content API for Shopping
Merchant API
Giá trị nhận dạng tài nguyên
Tài nguyên này được xác định bằng accountId. Các lát dữ liệu cụ thể được chọn bằng các tham số truy vấn.
Tên tài nguyên xác định duy nhất dữ liệu cho một bối cảnh báo cáo và quốc gia cụ thể: accounts/{account}/aggregateProductStatuses/{reportingContext}~{country}.
Phương thức
Phương thức truy xuất trạng thái sản phẩm đã được cập nhật thành phương thức list hỗ trợ lọc.
Phương thức Content API for Shopping
Phương thức Merchant API
Phạm vi cung cấp và lưu ý
accountstatuses.get
aggregateProductStatuses.list
Phương thức accountstatuses.get trả về một tài nguyên duy nhất chứa tất cả số liệu thống kê về sản phẩm. Phương thức aggregateProductStatuses.list mới trả về một danh sách tài nguyên, mỗi tài nguyên cho một tổ hợp ngữ cảnh báo cáo và quốc gia. Sử dụng tham số filter để truy xuất dữ liệu cụ thể. Đối với các vấn đề ở cấp tài khoản, hãy sử dụng accountissues.list.
Thông tin chi tiết về các thay đổi đối với trường
Các trường về số liệu thống kê và vấn đề của sản phẩm đã được cập nhật và tái cấu trúc trong tài nguyên AggregateProductStatus mới.
Content API for Shopping
Merchant API
Mô tả
products
aggregate_product_statuses
Mảng products được thay thế bằng trường lặp lại aggregate_product_statuses trong phản hồi danh sách.
destination
reporting_context
Trường destination được thay thế bằng reporting_context. Trường này chỉ định bối cảnh chương trình cho số liệu thống kê.
channel
(không có trường tương đương)
Trường channel sẽ bị xoá. Thông tin này hiện thuộc reporting_context.
statistics
stats
Đối tượng statistics được đổi tên thành stats. Tên trường trong đó được chuyển đổi thành snake_case, ví dụ: activeCount giờ đây là active_count.
itemLevelIssues.servability
item_level_issues.severity
Enum servability được thay thế bằng enum severity để mô tả mức độ ảnh hưởng của một vấn đề.
itemLevelIssues.attributeName
item_level_issues.attribute
Trường attributeName được đổi tên thành attribute.
itemLevelIssues.documentation
item_level_issues.documentation_uri
Trường documentation được đổi tên thành documentation_uri.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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`. |"]]