Migrate accountstatuses to Aggregate Product Statuses

The way you retrieve aggregated product statistics and issues has changed. The functionality previously available in the accountstatuses resource in the Content API for Shopping is now split into dedicated resources in the Merchant API. This guide explains how to migrate your integration to use the new aggregateProductStatuses resource.

Note: In Merchant API, account-level issues and aggregate product statuses are split. Also review our guide to migrate from accountstatuses to account issues.

Key differences

Here are the key differences between the product status features in Content API for Shopping and Merchant API:

  • Dedicated resources: The accountstatuses resource from Content API for Shopping is now split. In Merchant API, account-level issues are available through the accountissues resource, while aggregated product statistics and item-level issues are available through the new aggregateProductStatuses resource.
  • 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.
  • 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.
  • Channel field removal: The channel field is no longer used. This information is now implicitly part of the reportingContext.

Requests

Merchant API uses a GET request with a filter parameter to retrieve aggregated product statuses.

GET https://merchantapi.googleapis.com/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses

Request URL format

Request description Content API for Shopping Merchant API
Get product statistics and issues GET /content/v2.1/{merchantId}/accountstatuses/{accountId} GET /issueresolution/v1/accounts/{accountId}/aggregateProductStatuses

Identifiers

The way resources are identified has changed to support the new structure.

Identifier format

Identifier description Content API for Shopping Merchant API
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}.

Methods

The method for retrieving product statuses has been updated to a list method that supports filtering.

Content API for Shopping method Merchant API method Availability & notes
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.

Detailed field changes

The fields for product statistics and issues have been updated and restructured in the new AggregateProductStatus resource.

Content API for Shopping Merchant API Description
products aggregate_product_statuses The products array is replaced by the aggregate_product_statuses repeated field in the list response.
destination reporting_context The destination field is replaced by reporting_context, which specifies the program context for the stats.
channel (no equivalent field) The channel field is removed. This information is now part of the reporting_context.
statistics stats The statistics object is renamed to stats. Field names within are converted to snake_case, for example, activeCount is now active_count.
itemLevelIssues.servability item_level_issues.severity The servability enum is replaced by the severity enum to describe the impact of an issue.
itemLevelIssues.attributeName item_level_issues.attribute The field attributeName is renamed to attribute.
itemLevelIssues.documentation item_level_issues.documentation_uri The field documentation is renamed to documentation_uri.
itemLevelIssues.numItems item_level_issues.product_count The field numItems is renamed to product_count.