accountstatuses を Aggregate Product Statuses に移行
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
集計された商品に関する統計情報と問題を取得する方法が変更されました。これまで Content API for Shopping の accountstatuses
リソースで利用可能だった機能は、Merchant API の専用リソースに分割されました。このガイドでは、新しい aggregateProductStatuses
リソースを使用するように統合を移行する方法について説明します。
注: Merchant API では、アカウント レベルの問題と商品のステータスの集計が分割されています。accountstatuses
からアカウントの問題に移行するためのガイドもご覧ください。
主な違い
Content API for Shopping と Merchant API の商品ステータス機能の主な違いは次のとおりです。
- 専用リソース: Content API for Shopping の
accountstatuses
リソースが分割されました。Merchant API では、アカウント レベルの問題は accountissues
リソースから取得できます。一方、商品の統計情報と商品アイテム レベルの問題は、新しい aggregateProductStatuses
リソースから取得できます。
- 新しいリソース構造:
AggregateProductStatus
は、レポート コンテキストと国の特定の組み合わせの統計情報と問題を表現する新しいリソースです。
- フィルタリング メカニズム: Merchant API では、
destinations
などのクエリ パラメータを使用してデータを選択する代わりに、filter
文字列を含む list
メソッドを使用して、特定のレポート コンテキストと国をクエリします。
- チャネル フィールドの削除:
channel
フィールドは使用されなくなりました。この情報は、reportingContext
の一部として暗黙的に含まれるようになりました。
リクエスト
Merchant API は、filter
パラメータを含む GET
リクエストを使用して、集計された商品ステータスを取得します。
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 |
リソース ID |
リソースは 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`. |"]]