迁移商家支持
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 Content API for Shopping,您可以使用 merchantsupport 资源为商家创建应用内诊断页面。Merchant API 提供问题解决功能,支持相同的功能。
概览
从 Content API 迁移时,请注意服务和方法名称及结构发生了以下变化:
- API 响应中最显著的变化是将
AccountIssue
和 ProductIssue
对象整合为单个 RenderedIssue
对象。这应能为所有类型的问题提供一致的结构,从而简化您的代码。
- Merchant API 将
issues
字段重命名为 rendered_issues
。
标识符
针对 Merchant API,按如下方式更改 Content API 标识符。
方法 |
Content API for Shopping |
Merchant API |
renderaccountissues |
{merchant_id} |
accounts/{ACCOUNT_ID} |
renderproductissues |
{PRODUCT_ID} |
accounts/{ACCOUNT_ID}/products/{PRODUCT_ID} |
TriggerAction |
{merchant_id} |
accounts/{ACCOUNT_ID} |
请求
将 Content API 请求更改为 Merchant API 请求,如下所示。
操作 |
Content API for Shopping |
Merchant API |
为账号呈现账号级问题 |
POST https://shoppingcontent.googleapis.com/content/v2.1/MERCHANT_ID/merchantsupport/renderaccountissues
|
POST https://merchantapi.googleapis.com/issueresolution/v1/accounts/ACCOUNT_ID:renderaccountissues
|
商品的呈现问题 |
POST https://shoppingcontent.googleapis.com/content/v2.1/MERCHANT_ID/merchantsupport/renderproductissues/PRODUCT_ID
|
POST https://merchantapi.googleapis.com/issueresolution/v1/accounts/ACCOUNT_ID/products/PRODUCT_ID:renderproductissues
|
触发操作 |
POST https://shoppingcontent.googleapis.com/content/v2.1/MERCHANT_ID/merchantsupport/triggeraction
|
https://merchantapi.googleapis.com/issueresolution/v1/accounts/ACCOUNT_ID:triggeraction
|
API 响应中最显著的变化是将 AccountIssue
和 ProductIssue
对象整合为单个 RenderedIssue
对象。这应能为所有类型的问题提供一致的结构,从而简化您的代码。
重命名的字段
响应中顶级 issues
字段的新名称为 renderedIssues
。它包含 RenderedIssue
对象的列表。
Content API for Shopping |
Merchant API |
issues |
renderedIssues |
重命名了模型
Content API for Shopping |
Merchant API |
|
RenderedIssue |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
[null,null,["最后更新时间 (UTC):2025-08-08。"],[],[],null,["# Migrate merchant support\n\nWith Content API for Shopping, you can use the\n[merchantsupport](/shopping-content/reference/rest/v2.1/merchantsupport)\nresource to create an in-app diagnostics page for your merchants. Merchant API\noffers Issue resolution, which supports the same functionality.\n\nOverview\n--------\n\nWhen migrating from Content API, observe the following that there are changes to\nthe service and method names and structures:\n\n- The most significant change in the API response is the consolidation of the `AccountIssue` and `ProductIssue` objects into a single `RenderedIssue` object. This should simplify your code by providing a consistent structure for all types of issues.\n- Merchant API renames the `issues` field as `rendered_issues`.\n\nIdentifiers\n-----------\n\nChange your Content API identifiers as follows for Merchant API.\n\n| Method | Content API for Shopping | Merchant API |\n|-----------------------|--------------------------|-----------------------------------------------|\n| `renderaccountissues` | `{merchant_id}` | `accounts/{ACCOUNT_ID}` |\n| `renderproductissues` | `{PRODUCT_ID}` | `accounts/{ACCOUNT_ID}/products/{PRODUCT_ID}` |\n| `TriggerAction` | `{merchant_id}` | `accounts/{ACCOUNT_ID}` |\n\nRequests\n--------\n\nChange your Content API requests as follows for Merchant API.\n\n| Action | Content API for Shopping | Merchant API |\n|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Render account level issues for an account | ` POST https://shoppingcontent.googleapis.com/content/v2.1/`\u003cvar translate=\"no\"\u003eMERCHANT_ID\u003c/var\u003e`/merchantsupport/renderaccountissues ` | ` POST https://merchantapi.googleapis.com/issueresolution/v1/accounts/`\u003cvar translate=\"no\"\u003eACCOUNT_ID\u003c/var\u003e`:renderaccountissues ` |\n| Render issues for a product | ` POST https://shoppingcontent.googleapis.com/content/v2.1/`\u003cvar translate=\"no\"\u003eMERCHANT_ID\u003c/var\u003e`/merchantsupport/renderproductissues/`\u003cvar translate=\"no\"\u003ePRODUCT_ID\u003c/var\u003e` ` | ` POST https://merchantapi.googleapis.com/issueresolution/v1/accounts/`\u003cvar translate=\"no\"\u003eACCOUNT_ID\u003c/var\u003e`/products/`\u003cvar translate=\"no\"\u003ePRODUCT_ID\u003c/var\u003e`:renderproductissues ` |\n| Trigger action | ` POST https://shoppingcontent.googleapis.com/content/v2.1/`\u003cvar translate=\"no\"\u003eMERCHANT_ID\u003c/var\u003e`/merchantsupport/triggeraction ` | ` https://merchantapi.googleapis.com/issueresolution/v1/accounts/`\u003cvar translate=\"no\"\u003eACCOUNT_ID\u003c/var\u003e`:triggeraction ` |\n\nThe most significant change in the API response is the consolidation of\n`AccountIssue` and `ProductIssue` objects into a single `RenderedIssue` object.\nThis should simplify your code by providing a consistent structure for all types\nof issues.\n\nRenamed fields\n--------------\n\nThe new name for the top-level `issues` field in the response is\n`renderedIssues`. It contains a list of `RenderedIssue` objects.\n\n| Content API for Shopping | Merchant API |\n|--------------------------|------------------|\n| `issues` | `renderedIssues` |\n\nRenamed models\n--------------\n\n| Content API for Shopping | Merchant API |\n|-----------------------------------|-----------------|\n| - `AccountIssue` - `ProductIssue` | `RenderedIssue` |"]]