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

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

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

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

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

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

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

新機能

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

  • 利用規約: TermsOfService リソースと TermsOfServiceAgreementState リソースを使用して、利用規約をプログラムで取得して同意します。
  • エイリアスによるアカウント アクセス: 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}nameadult_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 nameaccounts/{account}/users/{email} 形式) ユーザーのメールアドレスがリソース名の一部になりました。
adminorder_managerreporting_manager など access_rights アクセス権が繰り返し列挙型フィールドに統合されました。
利用不可 state ユーザーが PENDINGVERIFIED かを示す新しい出力専用フィールド。

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

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}/relationshipsGET /accounts/v1/accounts/{account}/services

フィールドの詳細な比較

Content API for Shopping(AccountLink Merchant API(AccountServiceAccountRelationship メモ
linked_account_id AccountService にある)provider サービスを提供するアカウントの ID。
service AccountService にある)service_type 提供されるサービスの種類(ACCOUNT_AGGREGATION)。
status AccountService にある)handshake.approval_state リンクのステータス(PENDINGESTABLISHED)。

アカウントの税金設定

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_ASDOES_NOT_SELF_IDENTIFY_AS)に置き換えられ、より明示的な宣言になりました。これはすべての ID 属性に適用されます。
include_for_promotions(ブール値) promotions_consent(列挙型) グローバル ブール値が、より説明的な列挙型(PROMOTIONS_CONSENT_GIVENPROMOTIONS_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 返されるアカウントの最大数。