アカウント管理を移行する

Accounts API はリソースのコレクションに分割されており、アカウントのさまざまな側面をより正確に制御することで、Merchant Center アカウントをより効率的に管理できます。

このガイドでは、主な変更点について説明し、既存のアカウント管理統合を Content API for Shopping から Merchant API に移行する手順について説明します。

1 つのリソースから複数のリソースへ

Content API for Shopping では、Account リソースは、アカウント名やウェブサイトの URL からユーザーリストやビジネス情報まで、すべてを含むモノリシック オブジェクトでした。

Merchant API では、これを複数の小さなリソースに分割しています。この変更により、より的確で効率的な API 呼び出しが可能になります。たとえば、ビジネスの住所のみを更新するには、Account オブジェクト全体を更新するのではなく、BusinessInfo リソースに PATCH リクエストを送信します。

Content API for Shopping の Account リソースのコンセプトが Merchant API の新しいリソースにどのようにマッピングされるかの概要は次のとおりです。

新機能

Merchant API では、Content API for Shopping では利用できなかったアカウント管理の新機能も導入されています。

  • 利用規約: TermsOfService リソースと TermsOfServiceAgreementState リソースを使用して、利用規約をプログラムで取得して同意します。
  • アカウントの作成: accounts.createAndConfigure メソッドで、関係(accountManagement など)を持つアカウントの作成、alias の設定、新しい accounts.verifySelf メソッドを使用した API ベースの検証に代わる user.verificationMailSettings.verificationMailMode フィールドを使用したメール検証の抑制がサポートされるようになりました。
  • エイリアスによるアカウント アクセス: providerId~accountAlias 形式を使用してアカウントにアクセスします。複数のアカウントを管理する企業が、独自のアカウント ID を一貫して使用できるようにします。

リクエスト

次の表に、Content API for Shopping と Merchant API の間で、一般的なアカウント管理タスクのリクエスト URL を比較してまとめます。

リクエストの説明 Content API for Shopping Merchant API
アカウントを取得 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId} GET https://merchantapi.googleapis.com/accounts/v1/accounts/{account}
エイリアスでアカウントを取得する 直接利用できない GET https://merchantapi.googleapis.com/accounts/v1/accounts/{provider}~{alias}
サブアカウントの一覧表示 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts GET https://merchantapi.googleapis.com/accounts/v1/accounts/{provider}:listSubaccounts
サブアカウントの作成 POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts POST https://merchantapi.googleapis.com/accounts/v1/accounts:createAndConfigure
アカウント データを更新する PUT https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId} 該当するリソースに対する PATCH。たとえば、アカウント名を更新するには、次のようにします。PATCH https://merchantapi.googleapis.com/accounts/v1/accounts/{account}
サブアカウントを削除する DELETE https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId} DELETE https://merchantapi.googleapis.com/accounts/v1/accounts/{account}
ウェブサイトを申請する POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId}/claimwebsite POST https://merchantapi.googleapis.com/accounts/v1/accounts/{account}/homepage:claim
アカウントをリンク POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId}/link POST https://merchantapi.googleapis.com/accounts/v1/accounts/{account}/services:propose

コア アカウント情報を管理する

Merchant API の Account リソースには、名前、ID、基本設定など、Merchant Center アカウントの重要な詳細情報が含まれています。

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
アカウントの詳細を取得 GET /content/v2.1/{merchantId}/accounts/{accountId}(name、adult_content などのコア属性にアクセス) GET /accounts/v1/accounts/{account}
サブアカウントを作成する POST /content/v2.1/{merchantId}/accounts POST /accounts/v1/accounts:createAndConfigure
アカウントの詳細を更新する PUT /content/v2.1/{merchantId}/accounts/{accountId}(コア属性の更新) PATCH /accounts/v1/accounts/{account}
サブアカウントを削除する DELETE /content/v2.1/{merchantId}/accounts/{accountId} DELETE /accounts/v1/accounts/{account}

フィールドの詳細な比較

Content API for Shopping(Account) Merchant API(Account) メモ
id account_id 数値 ID は出力専用のフィールドになりました。プライマリ識別子はリソース name です。
name account_name 人が読める形式のアカウント名。
language language_code フィールド名が language_code になりました。

ビジネス情報を管理する

BusinessInfo リソースを使用して、住所やカスタマー サービスの連絡先など、ビジネスに関する公開情報を管理します。これは、Content API for Shopping の businessInformation オブジェクトに代わるものです。

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
ビジネス情報を取得する GET /content/v2.1/{merchantId}/accounts/{accountId}(business_information 属性へのアクセス) GET /accounts/v1/accounts/{account}/businessInfo
ビジネス情報を更新する PUT /content/v2.1/{merchantId}/accounts/{accountId}(business_information 属性を更新) PATCH /accounts/v1/accounts/{account}/businessInfo

フィールドの詳細な比較

Content API for Shopping(business_information) Merchant API(BusinessInfo) メモ
phone_number phone フィールドが phone になり、google.type.PhoneNumber を使用するようになりました。
customer_service.url customer_service.uri フィールド名が uri になりました。

ホームページを管理する

ショップのウェブサイトの URL を管理し、所有権の確認と申請を行うには、Homepage リソースを使用します。これは、Content API for Shopping の websiteUrl フィールドと accounts.claimwebsite メソッドに代わるものです。

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
ホームページの URL を取得する GET /content/v2.1/{merchantId}/accounts/{accountId}(website_url 属性へのアクセス) GET /accounts/v1/accounts/{account}/homepage
ホームページの URL を更新する PUT /content/v2.1/{merchantId}/accounts/{accountId}(website_url 属性を更新) PATCH /accounts/v1/accounts/{account}/homepage
申し立てのホームページ POST /content/v2.1/{merchantId}/accounts/{accountId}/claimwebsite POST /accounts/v1/accounts/{account}/homepage:claim
ホームページの申請を解除する 利用不可 POST /accounts/v1/accounts/{account}/homepage:unclaim

フィールドの詳細な比較

Content API for Shopping(Account) Merchant API(Homepage) メモ
website_url uri ストアのホームページの URL。
直接利用できない claimed ホームページが所有権を主張している場合は true のブール値フィールド。

ユーザーを管理

User リソースを使用すると、Merchant Center アカウントにアクセスできるユーザーを管理できます。これにより、Account リソース内の users 配列が置き換えられます。主な違いは、ユーザーの作成プロセスです。Merchant API では、ユーザーを追加すると招待状が送信されます。ユーザーがアカウントにアクセスするには、招待を承諾する必要があります。

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
ユーザーを一覧表示する GET /content/v2.1/{merchantId}/accounts/{accountId}(users 属性へのアクセス) GET /accounts/v1/accounts/{account}/users
ユーザーを作成する PUT /content/v2.1/{merchantId}/accounts/{accountId}(users 属性を更新) POST /accounts/v1/accounts/{account}/users
ユーザーを更新する PUT /content/v2.1/{merchantId}/accounts/{accountId}(users 属性を更新) PATCH /accounts/v1/accounts/{account}/users/{email}
ユーザーを削除 PUT /content/v2.1/{merchantId}/accounts/{accountId}(users 属性を更新) DELETE /accounts/v1/accounts/{account}/users/{email}

フィールドの詳細な比較

Content API for Shopping(users 配列オブジェクト) Merchant API(User リソース) メモ
email_address name(accounts/{account}/users/{email} 形式) ユーザーのメールアドレスがリソース名の一部になりました。
admin、order_manager、reporting_manager など access_rights アクセス権が繰り返し列挙型フィールドに統合されました。
利用不可 state ユーザーが PENDING か VERIFIED かを示す新しい出力専用フィールド。

アカウントの関係とサービスを管理する

Content API for Shopping では、関係は accounts.link で管理されていました。Merchant API では、AccountService リソースと AccountRelationship リソースを使用して、より明示的なモデルが導入されています。このモデルでは、ハンドシェイク プロセス(提案と承認)が必要です。

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
アカウントをリンク POST /content/v2.1/{merchantId}/accounts/{accountId}/link POST /accounts/v1/accounts/{account}/services:propose
リンクされたアカウントを一覧表示する GET /content/v2.1/{merchantId}/accounts/{accountId}/listlinks GET /accounts/v1/accounts/{account}/relationships、GET /accounts/v1/accounts/{account}/services

フィールドの詳細な比較

Content API for Shopping(AccountLink) Merchant API(AccountService、AccountRelationship) メモ
linked_account_id (AccountService にある)provider サービスを提供するアカウントの ID。
service (AccountService にある)service_type 提供されるサービスのタイプ(ACCOUNT_AGGREGATION など)。
status (AccountService にある)handshake.approval_state リンクのステータス(PENDING、ESTABLISHED など)。

アカウントの税金設定

Content API for Shopping の accounttax サービスは Merchant API では利用できません。米国の売上税を指定する必要がなくなりました。詳しくは、Merchant Center 商品データ仕様の更新のお知らせ(2025 年)をご覧ください。

ビジネス ID を管理する

BusinessIdentity リソースを使用して、ビジネスに関する属性を自己申告します。これは、Content API for Shopping の businessIdentity オブジェクトに代わるものです。

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
ビジネス アイデンティティを取得する GET /content/v2.1/{merchantId}/accounts/{accountId}(business_identity 属性へのアクセス) GET /accounts/v1/accounts/{account}/businessIdentity
ビジネス アイデンティティを更新する PUT /content/v2.1/{merchantId}/accounts/{accountId}(business_identity 属性を更新) PATCH /accounts/v1/accounts/{account}/businessIdentity

フィールドの詳細な比較

Content API for Shopping(business_identity) Merchant API(BusinessIdentity) メモ
black_owned.self_identified(ブール値) black_owned.identity_declaration(列挙型) ブール値は、より明示的な宣言のために列挙型(SELF_IDENTIFIES_AS、DOES_NOT_SELF_IDENTIFY_AS)に置き換えられます。これはすべての ID 属性に適用されます。
include_for_promotions(ブール値) promotions_consent(列挙型) グローバル ブール値が、より説明的な列挙型(PROMOTIONS_CONSENT_GIVEN、PROMOTIONS_CONSENT_DENIED)に置き換えられました。

アカウントの一覧表示

Content API for Shopping では、アドバンス アカウントのタイプは「マルチクライアント アカウント(MCA)」のみで、指定されたマルチクライアント アカウントのアカウントを一覧表示する accounts.list メソッドが公開されていました。Merchant API のアドバンス アカウントは、より強力で、幅広いアカウント タイプと関係を許可します。高度なアカウントの移行を簡単に行えるように、Merchant API では、Content API for Shopping の accounts.list に直接対応する accounts.listSubaccounts メソッドが用意されています。高度なアカウント フィルタリングを可能にする、より強力な新しい accounts.list メソッドを導入します。

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
アドバンス アカウントのアカウントを一覧表示する GET /content/v2.1/{merchantId}/accounts GET /accounts/v1/accounts/{providerId}:listSubaccounts
アクセス可能なすべてのアカウントを一覧表示する 利用不可 GET /accounts/v1/accounts

フィールドの詳細な比較(リクエスト パラメータ)

Content API for Shopping(accounts.list) Merchant API(accounts.listSubaccounts) メモ
merchant_id(パスパラメータ) provider(パスパラメータ) アドバンス アカウントの ID(accounts/{account} 形式)。
max_results page_size 返すアカウントの最大数。