从 Content API for Shopping 迁移账号管理

您可以使用 accounts 资源创建和管理您的商家帐号。如需了解详情,请参阅 Merchant Accounts API 概览

本页面介绍了如何将帐号管理从 Content API 迁移到 Merchant API。

请求

对于 Merchant Accounts API,请使用以下请求网址格式:

POST https://merchantapi.googleapis.com/accounts/v1beta/{accountId}/accounts

以下是针对帐号创建和管理请求的 Content API for Shopping 与 Merchant Accounts API 的示例比较:

Content API for Shopping 商家帐号 API
网址 https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId}/ https://merchantapi.googleapis.com/accounts/v1beta/{accountId}/accounts
标识符 {merchantId}/accounts/{accountId} {accountId}

资源

帐号数据使用 Content API for Shopping 中的 Account 资源传递。Merchant Accounts API 提供了多种资源来传递帐号数据。这些资源包括 AccountUserBusinessInfoBusinessIdentity 资源。

下表对比了 Content API for Shopping 中的 Account 资源与 Merchant Accounts API 中的 Account 资源。

Content API for Shopping 商家帐号 API
id account_id
name account_name
kind 不可用
websiteUrl homepage 资源中的 uri 字段
adultContent adult_content
sellerId 不可用
users User 资源中
youtubeChannelLinks 尚不可用
googleMyBusinessLink 尚不可用
businessInformation businessInfo 资源中
businessIdentity businessIdentity 资源中
automaticImprovements 尚不可用
adsLinks 尚不可用
cssId 仅适用于 CSS API
labelIds 仅适用于 CSS API
accountManagement 尚不可用
automaticLabelIds 仅适用于 CSS API
conversionSettings 尚不可用

下表对 Content API for Shopping 中的 AccountUser 资源与 Merchant Accounts API 中的 User 资源进行了比较。

Content API for Shopping 商家帐号 API
emailAddress emailname
(accounts/{account}/users/{email})的一部分。
admin user#access_rights.ADMIN
orderManager 不详
paymentsManager 不详
paymentsAnalyst 不详
reportingManager user#access_rights.PERFORMANCE_REPORTING

下表比较了 Content API for Shopping 中的 AccountBusinessInformation 资源与 Merchant Accounts API 中的等效资源 businessinfo

Content API for Shopping 商家帐号 API
businessInformation businessinfo
phoneNumber phone
phoneVerificationStatus phone_verification_state
customerService customer_service
koreanBusinessRegistrationNumber 不详

下表对比了 Content API for Shopping 中的 AccountBusinessIdentity 资源与 Merchant Accounts API 中的 businessIdentity 资源。

Content API for Shopping 商家帐号 API
blackOwned black_owned
womenOwned women_owned
veteranOwned veteran_owned
latinoOwned latino_owned
smallBusiness small_business
includeForPromotions promotions_consent
true 表示 PROMOTION_CONSENT_GIVEN
false 表示 PROMOTION_CONSENT_DENIED

下表对 Content API for Shopping 中的 AccountIdentityType 资源与 Merchant Accounts API 中的 identityAttribute 资源进行了比较。

Content API for Shopping 商家帐号 API
self_identified identity_declaration
true 表示 SELF_IDENTIFIES_AS
false 表示 DOES_NOT_SELF_IDENTIFY_AS

方法

Merchant Accounts API 中引入了以下方法:

Content API for Shopping 商家帐号 API
accounts.authinfo GET https://merchantapi.googleapis.com/accounts/v1beta/accounts,无过滤条件
accounts.claimwebsite POST https://merchantapi.googleapis.com/accounts/v1beta/accounts/accountId/homepage:claim
如需了解详情,请参阅方法:accounts.v1beta.accounts.homepage.claim
accounts.custombatch 不可用。Merchant API 不支持自定义批次。
accounts.delete DELETE https://merchantapi.googleapis.com/accounts/v1beta/accounts/accountId
accounts.get 映射到定义了必需字段或字段集的资源的 GET 请求。
accounts.insert POST https://merchantapi.googleapis.com/accounts/v1beta/accounts:createAndConfigure
如需了解详情,请参阅创建和配置商家帐号
accounts.link 尚不支持
accounts.list GET https://merchantapi.googleapis.com/accounts/v1beta/accountId:listSubaccounts
accounts.listlinks 尚不支持
accounts.update 映射到定义了必需字段或字段集的资源的更新请求。