发送反馈
迁移账号关联
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
账号关系的管理已从 Content API for Shopping 中的单一 link
方法发展为 Merchant API 中更精细且更明确的系统。新 API 使用 AccountRelationship
和 AccountService
等专用资源来定义一个账号向另一个账号提供的特定服务。如需了解详情,请参阅账号之间的关系 。
主要差异
用于表示关系和服务关系的专用资源 :在 Merchant API 中,AccountRelationship
资源用于定义服务提供商与商家之间的连接,而 AccountService
资源用于指定所提供的确切服务(例如 accountAggregation
)。这取代了 Content API for Shopping 中的通用 linkType
和 services
字段。
显式操作方法 :Merchant API 不使用带 action
参数的单个 link
方法,而是使用不同的方法来管理服务,例如 propose
、approve
和 reject
。
专用 Google 商家资料关联 :关联到 Google 商家资料之前是通过设置 googleMyBusinessLink
字段来处理的,现在有了一个专用方法 gbpAccounts.linkGbpAccount
。
将创建客户账号作为一项服务 :现在,在高级账号下创建客户账号会被视为使用 accounts.createAndConfigure
方法提议 accountAggregation
服务。如需详细了解账号,请参阅商家账号 API 页面。由于用户有权访问高级账号和客户账号,因此无需进行握手。
请求
Merchant API 提供了用于管理不同类型的账号关联和服务的一些特定端点:
商家 API 请求网址
建议新服务 :POST
https://merchantapi.googleapis.com/accounts/v1/
{parent=accounts/*}/services:propose
批准服务 :POST
https://merchantapi.googleapis.com/accounts/v1/
{name=accounts/*/services/*}:approve
拒绝服务 :POST
https://merchantapi.googleapis.com/accounts/v1/
{name=accounts/*/services/*}:reject
链接到 Google 商家资料 :POST
https://merchantapi.googleapis.com/accounts/v1/
{parent=accounts/*}/gbpAccounts:linkGbpAccount
创建客户账号(账号汇总链接) :POST
https://merchantapi.googleapis.com/accounts/v1/
accounts:createAndConfigure
请求网址比较
请求说明
Content API for Shopping
Merchant API
关联账号(例如,第三方平台)
POST .../v2.1/{merchantId}/accounts/{accountId}/link
POST .../v1/{parent=accounts/*}/services:propose
关联到 Google 商家资料
PUT .../v2.1/{merchantId}/accounts/{accountId}
(带有 googleMyBusinessLink
字段)
POST .../v1/{parent=accounts/*}/gbpAccounts:linkGbpAccount
创建客户账号
POST .../v2.1/{merchantId}/accounts
POST .../v1/accounts:createAndConfigure
方法
Content API for Shopping 方法
Merchant API 方法
适用范围和备注
accounts.link
accountServices.propose
使用此方法可使用其他账号启动新服务。
accounts.link
(带 action: "approve"
)
accountServices.approve
使用此方法可批准待处理的服务提案。
accounts.link
(带 action: "remove"
)
accountServices.reject
使用此方法可拒绝待处理或已建立的服务。
accounts.insert
(适用于客户账号)
accounts.createAndConfigure
将此方法与 accountAggregation
服务搭配使用,以在高级账号下创建新的客户账号。
accounts.update
(带 googleMyBusinessLink
)
gbpAccounts.linkGbpAccount
使用此专用方法将 Merchant Center 账号与 Google 商家资料相关联。
accounts.update
(带 adsLinks
)
AccountRelationship
项资源
与 Google Ads 的关联是在 Google Ads 界面中进行管理的。生成的链接在 Merchant API 中表示为 AccountRelationship
,可以查看但无法直接创建。
详细的字段更改
Content API for Shopping
Merchant API
说明
AccountsLinkRequest.action
propose
、approve
、reject
方法
单个 action
字段已替换为用于处理服务生命周期中每种状态变化的专用 API 方法。
AccountsLinkRequest.linkType
AccountService.service_type
通用 linkType
字符串被 AccountService
资源中的结构化 service_type
oneof 字段(例如 productsManagement
或 accountAggregation
)取代
AccountsLinkRequest.services
AccountService.service_type
基于字符串的服务的列表现在由 AccountService
资源中选择的特定 service_type
表示。
AccountsLinkRequest.linkedAccountId
ProposeAccountServiceRequest.provider
提供服务的账号的 ID 现在已在 propose
请求的 provider
字段中指定。
Account.googleMyBusinessLink
LinkGbpAccountRequest
包含 GBP 链接详细信息的对象已替换为 linkGbpAccount
方法的专用请求消息。
Account.adsLinks
AccountRelationship
Google Ads 链接表示为 AccountRelationship
资源,其中 provider
为 providers/GOOGLE_ADS
。此关系通常通过 Google Ads 界面进行管理。
发送反馈
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可 获得了许可,并且代码示例已根据 Apache 2.0 许可 获得了许可。有关详情,请参阅 Google 开发者网站政策 。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
需要向我们提供更多信息?
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-08。"],[],[]]