Merchant API v1beta 已于 2026 年 2 月 28 日停用并关停。如需了解迁移到最新稳定版的步骤,请参阅
从 v1beta 迁移到 v1 。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
发送反馈
迁移账号关联
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
账号关系的管理已从 Content API for Shopping 中的单个 link 方法演变为 Merchant API 中更精细、更明确的系统。新 API 使用专用资源(例如 AccountRelationship 和 AccountService)来定义一个账号向另一个账号提供的特定服务。如需了解详情,请参阅
账号之间的关系 。
主要区别
用于关系和服务专用资源 :在 Merchant API 中,
AccountRelationship 资源定义了服务
提供商与商家之间的连接,而 AccountService 资源则指定了
所提供的确切服务(例如 accountAggregation)。这
取代了 Content API
for Shopping 中的通用 linkType 和 services 字段。
明确的操作方法 :Merchant API 没有使用带有link参数的单个
action方法,而是使用不同的方法来管理
服务,例如propose、approve和reject。
专用 Google 商家资料关联 :以前通过设置 googleMyBusinessLink 字段来处理与 Google 商家资料的关联,现在有一个专用方法 gbpAccounts.linkGbpAccount 。
将客户账号创建作为一项服务 :在
高级账号下创建客户账号现在被视为提出一项 accountAggregation 服务
,
使用
accounts.createAndConfigure
方法。如需详细了解账号,请参阅
Merchant Accounts API
页面。由于用户可以访问高级账号和客户账号,因此无需握手。
请求
Merchant API 提供了用于管理不同类型的账号关联和服务专用端点:
Merchant 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):2026-05-11。
需要向我们提供更多信息?
[[["易于理解","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):2026-05-11。"],[],[]]