Memigrasikan accountstatuses ke Aggregate Product Statuses
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Cara Anda mengambil statistik dan masalah produk gabungan telah berubah. Fungsi yang sebelumnya tersedia di resource accountstatuses
di Content API for Shopping kini dibagi menjadi resource khusus di Merchant API. Panduan ini menjelaskan cara memigrasikan integrasi Anda untuk menggunakan resource
aggregateProductStatuses
baru.
Catatan: Di Merchant API, masalah tingkat akun dan status produk gabungan dipisahkan. Tinjau juga panduan kami untuk bermigrasi dari accountstatuses
ke
masalah akun.
Perbedaan utama
Berikut perbedaan utama antara fitur status produk di Content API for Shopping dan Merchant API:
- Resource khusus: Resource
accountstatuses
dari Content API for Shopping kini dibagi. Di Merchant API, masalah tingkat akun tersedia melalui resource accountissues
, sedangkan statistik produk gabungan dan masalah tingkat item tersedia melalui resource aggregateProductStatuses
baru.
- Struktur resource baru:
AggregateProductStatus
adalah resource baru yang
mewakili statistik dan masalah untuk kombinasi tertentu dari
konteks pelaporan dan negara.
- Mekanisme pemfilteran: Alih-alih menggunakan parameter kueri seperti
destinations
untuk memilih data, Merchant API menggunakan metode list
dengan string
filter
untuk membuat kueri konteks dan negara pelaporan tertentu.
- Penghapusan kolom channel: Kolom
channel
tidak digunakan lagi. Informasi
ini sekarang secara implisit menjadi bagian dari reportingContext
.
Permintaan
Merchant API menggunakan permintaan GET
dengan parameter filter
untuk mengambil status produk gabungan.
GET
https://merchantapi.googleapis.com/issueresolution/v1/{parent=accounts/*}/aggregateProductStatuses
Deskripsi permintaan |
Content API for Shopping |
Merchant API |
Mendapatkan statistik dan masalah produk |
GET /content/v2.1/{merchantId}/accountstatuses/{accountId} |
GET /issueresolution/v1/accounts/{accountId}/aggregateProductStatuses |
Pengenal
Cara mengidentifikasi resource telah berubah untuk mendukung struktur baru.
Deskripsi ID |
Content API for Shopping |
Merchant API |
ID Resource |
Resource diidentifikasi oleh accountId . Slice data tertentu dipilih dengan parameter kueri. |
Nama resource mengidentifikasi data secara unik untuk konteks pelaporan dan negara tertentu: accounts/{account}/aggregateProductStatuses/{reportingContext}~{country} . |
Metode
Metode untuk mengambil status produk telah diupdate ke metode list
yang mendukung pemfilteran.
Metode Content API for Shopping |
Metode Merchant API |
Ketersediaan & catatan |
accountstatuses.get |
aggregateProductStatuses.list |
Metode accountstatuses.get menampilkan satu resource yang berisi semua statistik produk. Metode aggregateProductStatuses.list yang baru menampilkan daftar resource, satu untuk setiap kombinasi negara dan konteks pelaporan. Gunakan parameter filter untuk mengambil data tertentu. Untuk masalah tingkat akun, gunakan accountissues.list . |
Perubahan kolom mendetail
Kolom untuk statistik dan masalah produk telah diperbarui dan disusun ulang
dalam resource AggregateProductStatus
baru.
Content API for Shopping |
Merchant API |
Deskripsi |
products |
aggregate_product_statuses |
Array products digantikan oleh kolom berulang aggregate_product_statuses dalam respons daftar. |
destination |
reporting_context |
Kolom destination diganti dengan reporting_context , yang menentukan konteks program untuk statistik. |
channel |
(tidak ada kolom yang setara) |
Kolom channel dihapus. Informasi ini sekarang menjadi bagian dari reporting_context . |
statistics |
stats |
Objek statistics diganti namanya menjadi stats . Nama kolom di dalamnya dikonversi menjadi snake_case, misalnya, activeCount kini menjadi active_count . |
itemLevelIssues.servability |
item_level_issues.severity |
Enum servability digantikan oleh enum severity untuk mendeskripsikan dampak masalah. |
itemLevelIssues.attributeName |
item_level_issues.attribute |
Kolom attributeName diganti namanya menjadi attribute . |
itemLevelIssues.documentation |
item_level_issues.documentation_uri |
Kolom documentation diganti namanya menjadi documentation_uri . |
itemLevelIssues.numItems |
item_level_issues.product_count |
Kolom numItems diganti namanya menjadi product_count . |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-08 UTC.
[null,null,["Terakhir diperbarui pada 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`. |"]]