從 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
ID {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 對應至已定義必填欄位或欄位組合的資源更新要求。