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

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 の設定、user.verificationMailSettings.verificationMailMode フィールドを使用したメール確認の抑制がサポートされるようになりました。これにより、新しい accounts.verifySelf メソッドを使用した API ベースの確認が優先されます。
  • エイリアスによるアカウント アクセス: 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 返されるアカウントの最大数。