Esegui la migrazione di accountstatuses ad Aggregate Product Statuses
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
È cambiato il modo in cui recuperi le statistiche e i problemi aggregati dei prodotti. La funzionalità
precedentemente disponibile nella risorsa accountstatuses
dell'API
Content per Shopping è ora suddivisa in risorse dedicate nell'API
Merchant. Questa guida spiega come eseguire la migrazione dell'integrazione per utilizzare la nuova risorsa
aggregateProductStatuses
.
Nota: nell'API Merchant, i problemi a livello di account e gli stati aggregati dei prodotti
sono suddivisi. Consulta anche la nostra guida per la migrazione da accountstatuses
a
problemi relativi all'account.
Differenze principali
Di seguito sono riportate le principali differenze tra le funzionalità di stato del prodotto nell'API Content
for Shopping e nell'API Merchant:
- Risorse dedicate: la risorsa
accountstatuses
dell'API Content for Shopping è ora suddivisa. Nell'API Merchant, i problemi a livello di account sono
disponibili tramite la risorsa
accountissues
, mentre le statistiche aggregate sui prodotti e i problemi a livello di articolo sono
disponibili tramite la nuova risorsa
aggregateProductStatuses
.
- Nuova struttura delle risorse:
AggregateProductStatus
è una nuova risorsa che
rappresenta le statistiche e i problemi per una combinazione specifica di un
contesto di reporting e un paese.
- Meccanismo di filtraggio: anziché utilizzare parametri di query come
destinations
per selezionare i dati, l'API Merchant utilizza un metodo list
con una
stringa filter
per eseguire query per paesi e contesti di reporting specifici.
- Rimozione del campo Canale: il campo
channel
non viene più utilizzato. Queste
informazioni ora fanno parte implicitamente di reportingContext
.
Richieste
L'API Merchant utilizza una richiesta GET
con un parametro filter
per recuperare
gli stati dei prodotti aggregati.
GET
https://merchantapi.googleapis.com/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses
Descrizione della richiesta |
API Content per Shopping |
API Merchant |
Visualizzare statistiche e problemi relativi ai prodotti |
GET /content/v2.1/{merchantId}/accountstatuses/{accountId} |
GET /issueresolution/v1/accounts/{accountId}/aggregateProductStatuses |
Identificatori
Il modo in cui vengono identificate le risorse è cambiato per supportare la nuova struttura.
Descrizione dell'identificatore |
API Content per Shopping |
API Merchant |
Identificatore di risorse |
La risorsa è stata identificata da accountId . Sono state selezionate sezioni di dati specifiche con i parametri della query. |
Il nome della risorsa identifica in modo univoco i dati per un contesto di reporting e un paese specifici: accounts/{account}/aggregateProductStatuses/{reportingContext}~{country} . |
Metodi
Il metodo per recuperare gli stati dei prodotti è stato aggiornato a un metodo list
che supporta il filtraggio.
Metodo API Content for Shopping |
Metodo API Merchant |
Disponibilità e note |
accountstatuses.get |
aggregateProductStatuses.list |
Il metodo accountstatuses.get ha restituito una singola risorsa contenente tutte le statistiche sul prodotto. Il nuovo metodo aggregateProductStatuses.list restituisce un elenco di risorse, una per ogni combinazione di contesto e paese del report. Utilizza il parametro filter per recuperare dati specifici. Per i problemi a livello di account, utilizza accountissues.list . |
Modifiche dettagliate ai campi
I campi per le statistiche e i problemi relativi ai prodotti sono stati aggiornati e ristrutturati
nella nuova risorsa AggregateProductStatus
.
API Content per Shopping |
API Merchant |
Descrizione |
products |
aggregate_product_statuses |
L'array products viene sostituito dal campo ripetuto aggregate_product_statuses nella risposta dell'elenco. |
destination |
reporting_context |
Il campo destination è sostituito da reporting_context , che specifica il contesto del programma per le statistiche. |
channel |
(nessun campo equivalente) |
Il campo channel viene rimosso. Queste informazioni ora fanno parte di reporting_context . |
statistics |
stats |
L'oggetto statistics viene rinominato in stats . I nomi dei campi all'interno vengono convertiti in snake_case, ad esempio activeCount ora è active_count . |
itemLevelIssues.servability |
item_level_issues.severity |
L'enumerazione servability viene sostituita dall'enumerazione severity per descrivere l'impatto di un problema. |
itemLevelIssues.attributeName |
item_level_issues.attribute |
Il campo attributeName viene rinominato in attribute . |
itemLevelIssues.documentation |
item_level_issues.documentation_uri |
Il campo documentation viene rinominato in documentation_uri . |
itemLevelIssues.numItems |
item_level_issues.product_count |
Il campo numItems viene rinominato in product_count . |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-08 UTC.
[null,null,["Ultimo aggiornamento 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`. |"]]