アカウント リンクを移行する

アカウント関係の管理は、Content API for Shopping の単一の link メソッドから、Merchant API のより詳細で明示的なシステムへと進化しました。新しい API では、AccountRelationshipAccountService などの専用リソースを使用して、あるアカウントが別のアカウントに提供する特定のサービスを定義します。詳しくは、 アカウント間の関係をご覧ください。

主な違い

リクエスト

Merchant API には、さまざまなタイプのアカウント リンクとサービスを管理するための特定のエンドポイントが用意されています。

Merchant API リクエスト URL

  • 新しいサービスを提案する: 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

リクエスト URL の比較

リクエストの説明 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.linkaction: "approve" を含む) accountServices.approve このメソッドを使用して、保留中のサービス提案を承認します。
accounts.linkaction: "remove" を含む) accountServices.reject このメソッドを使用して、保留中または確立済みのサービスを拒否します。
accounts.insert(クライアント アカウントの場合) accounts.createAndConfigure このメソッドを accountAggregation サービスで使用して、アドバンス アカウントに新しいクライアント アカウントを作成します。
accounts.updategoogleMyBusinessLink を含む) gbpAccounts.linkGbpAccount この専用メソッドを使用して、Merchant Center アカウントを Google ビジネス プロフィールにリンクします。
accounts.updateadsLinks を含む) AccountRelationship リソース Google 広告へのリンクは、Google 広告の管理画面から管理されます。結果として得られるリンクは、Merchant API で AccountRelationship として表されます。これは表示できますが、直接作成することはできません。

フィールドの詳細な変更点

Content API for Shopping Merchant API 説明
AccountsLinkRequest.action proposeapprovereject メソッド 単一の action フィールドは、サービス ライフサイクルの状態変更ごとに専用の API メソッドに置き換えられます。
AccountsLinkRequest.linkType AccountService.service_type 汎用的な linkType 文字列は、AccountService リソース内の構造化された service_type oneof フィールド(productsManagementaccountAggregation など)に置き換えられます。
AccountsLinkRequest.services AccountService.service_type 文字列ベースのサービスのリストは、AccountService リソース内で選択された特定の service_type で表されるようになりました。
AccountsLinkRequest.linkedAccountId ProposeAccountServiceRequest.provider サービスを提供するアカウントの ID は、propose リクエストの provider フィールドで指定されるようになりました。
Account.googleMyBusinessLink LinkGbpAccountRequest GBP リンクの詳細を含むオブジェクトは、linkGbpAccount メソッドの専用リクエスト メッセージに置き換えられます。
Account.adsLinks AccountRelationship Google 広告のリンクは、AccountRelationship リソースとして表されます。ここで、providerproviders/GOOGLE_ADS です。通常、この関係は Google 広告の管理画面から管理されます。