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

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 では利用できなかったアカウント管理の新機能も導入されています。

リクエスト

次の表に、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

アカウントの基本情報を管理する

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

リクエストの比較

リクエストの説明 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 name(形式: accounts/{account}/users/{email} ユーザーのメールアドレスがリソース名の一部になりました。
adminorder_managerreporting_manager など access_rights アクセス権が繰り返し列挙型フィールドに統合されました。
利用不可 state ユーザーが PENDINGVERIFIED かを示す新しい出力専用フィールド。

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

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

リクエストの比較

リクエストの説明 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 providerAccountService 内) サービスを提供するアカウントの ID。
service service_typeAccountService 内) 提供されるサービスのタイプ(ACCOUNT_AGGREGATION など)。
status handshake.approval_stateAccountService 内) リンクのステータス(PENDINGESTABLISHED など)。

アカウントの税金設定

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

ビジネス ID を管理する

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

リクエストの比較

リクエストの説明 Content API for Shopping Merchant API
ビジネス ID を取得 GET /content/v2.1/{merchantId}/accounts/{accountId}business_identity 属性にアクセス) GET /accounts/v1/accounts/{account}/businessIdentity
ビジネス ID を更新 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(boolean) black_owned.identity_declaration(列挙型) ブール値が列挙型(SELF_IDENTIFIES_ASDOES_NOT_SELF_IDENTIFY_AS)に置き換えられ、より明示的な宣言が可能になりました。これは、すべての ID 属性に適用されます。
include_for_promotions(boolean) 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 返されるアカウントの最大数。