Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zmieniliśmy sposób pobierania zbiorczych statystyk i problemów dotyczących produktów. Funkcja dostępna wcześniej w zasobie accountstatuses w Content API for Shopping jest teraz podzielona na osobne zasoby w Merchant API. Z tego przewodnika dowiesz się, jak przenieść integrację, aby korzystać z nowego zasobu aggregateProductStatuses.
Uwaga: w Merchant API problemy na poziomie konta i zbiorcze stany produktów są rozdzielone. Zapoznaj się też z naszym przewodnikiem dotyczącym przenoszenia danych z accountstatuses na konto.
Najważniejsze różnice
Oto główne różnice między funkcjami stanu produktu w interfejsie Content API for Shopping a interfejsie Merchant API:
Osobne zasoby: zasób accountstatuses z Content API for Shopping został podzielony. W Merchant API problemy na poziomie konta są dostępne w zasobie accountissues, a zagregowane statystyki produktów i problemy na poziomie produktu są dostępne w nowym zasobie aggregateProductStatuses.
Nowa struktura zasobów:AggregateProductStatus to nowy zasób, który reprezentuje statystyki i problemy dotyczące konkretnej kombinacji kontekstu raportowania i kraju.
Mechanizm filtrowania: zamiast używać parametrów zapytania, takich jak
destinations do wybierania danych, Merchant API używa metody list z ciągiem znaków
filter do wysyłania zapytań o konkretne konteksty raportowania i kraje.
Usunięcie pola kanału: pole channel nie jest już używane. Te informacje są teraz niejawnie częścią reportingContext.
Żądania
Interfejs Merchant API używa żądania GET z parametrem filter do pobierania zbiorczych stanów produktów.
GET
https://merchantapi.googleapis.com/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses
Format adresu URL żądania
Opis prośby
Content API for Shopping
Merchant API
Pobieranie statystyk i informacji o problemach z produktami
GET /content/v2.1/{merchantId}/accountstatuses/{accountId}
GET /issueresolution/v1/accounts/{accountId}/aggregateProductStatuses
Identyfikatory
Sposób identyfikowania zasobów został zmieniony, aby obsługiwać nową strukturę.
Format identyfikatora
Opis identyfikatora
Content API for Shopping
Merchant API
Identyfikator zasobu
Zasób został zidentyfikowany przez accountId. Za pomocą parametrów zapytania wybrano konkretne wycinki danych.
Nazwa zasobu jednoznacznie identyfikuje dane w określonym kontekście raportowania i kraju: accounts/{account}/aggregateProductStatuses/{reportingContext}~{country}.
Metody
Metoda pobierania stanów produktów została zaktualizowana do metody list, która obsługuje filtrowanie.
Metoda Content API for Shopping
Metoda Merchant API
Dostępność i uwagi
accountstatuses.get
aggregateProductStatuses.list
Metoda accountstatuses.get zwracała pojedynczy zasób zawierający wszystkie statystyki produktów. Nowa metoda aggregateProductStatuses.list zwraca listę zasobów, po jednym dla każdej kombinacji kontekstu raportowania i kraju. Aby pobrać konkretne dane, użyj parametru filter. W przypadku problemów na poziomie konta użyj ikony accountissues.list.
Szczegółowe zmiany w polach
Pola statystyk i problemów z produktami zostały zaktualizowane i przekształcone w nowym zasobie AggregateProductStatus.
Content API for Shopping
Merchant API
Opis
products
aggregate_product_statuses
Tablica products jest zastępowana powtarzanym polem aggregate_product_statuses w odpowiedzi listy.
destination
reporting_context
Pole destination jest zastąpione polem reporting_context, które określa kontekst programu dla statystyk.
channel
(brak odpowiedniego pola)
Pole channel zostanie usunięte. Te informacje są teraz częścią reporting_context.
statistics
stats
Obiekt statistics zmienia nazwę na stats. Nazwy pól w nich są przekształcane na format snake_case, np. activeCount to teraz active_count.
itemLevelIssues.servability
item_level_issues.severity
Wyliczenie servability zostało zastąpione wyliczeniem severity, aby opisywać wpływ problemu.
itemLevelIssues.attributeName
item_level_issues.attribute
Pole attributeName zostało zmienione na attribute.
itemLevelIssues.documentation
item_level_issues.documentation_uri
Pole documentation zostało zmienione na documentation_uri.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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`. |"]]