データソースを使用すると、商品を Google にアップロードできます。自動化されたデータソースを使用すると、商品データを Google に簡単に送信できます。詳しくは、Merchant Data Sources API の概要をご覧ください。
以下に、Content API for Shopping のリクエストと Merchant Data Sources API のリクエストのサンプルの比較を示します。
Content API for Shopping | 販売者データソース API | |
---|---|---|
URL | https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds | https://merchantapi.googleapis.com/datasources/v1beta/{parent}/dataSources |
識別子 | {id} | {name} |
メソッド
以下に、Content API for Shopping と Merchant Data Sources API のデータフィード メソッドを比較します。
メソッド | Content API for Shopping | 販売者データソース API |
---|---|---|
customBatch |
○ | × |
insert |
○ | ○ |
get |
○ | ○ |
update |
○ | ○ |
delete |
○ | ○ |
list |
○ | ○ |
fetchNow |
○ | ○ |
識別子
他のリソースとは異なり、Content API ID は変更されているため、データソースの名前を Content API ID から作成することはできません。list メソッドを呼び出して、データソースの新しい ID を取得できます。
または、accounts.products.get
メソッドを呼び出して、product
リソースから新しいデータソース ID を取得することもできます。
メソッド
Merchant Data source API のデータフィードでは、以下の点が変更されています。
メソッド | Content API for Shopping の URL | Merchant Data Sources API の URL | Content API for Shopping の識別子 | Merchant Data source API での識別子 | 説明 |
---|---|---|---|---|---|
create |
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds |
POST https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources |
{merchantId} | {parent} |
Content API for Shopping における create のシナリオは、メイン ファイル フィードの作成のみです。他のすべての create シナリオは、Merchant Data source API に新たに導入されました。
|
update |
PUT https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds/{datafeedId} |
PATCH https://merchantapi.googleapis.com/datasources/v1beta/{dataSource.name=accounts/*/dataSources/*} |
{merchantId}/datafeeds/ {datafeedId} |
{dataSource.name=accounts/*/dataSources/*} |
|
delete |
DELETE https://shoppingcontent.googleapis.com/content/v2.1/ {merchantId}/datafeeds/ {datafeedId} |
DELETE https://merchantapi.googleapis.com/datasources/v1beta/ {name=accounts/*/dataSources/*} |
{merchantId}/datafeeds/{datafeedId} | {name=accounts/*/dataSources/*} | |
get |
GET https://shoppingcontent.googleapis.com/content/v2.1/ {merchantId}/datafeeds/ {datafeedId} |
GET https://merchantapi.googleapis.com/datasources/v1beta/ {name=accounts/*/dataSources/*} |
{merchantId}/datafeeds/ {datafeedId} |
{name=accounts/*/dataSources/*} | |
list |
GET https://shoppingcontent.googleapis.com/content/v2.1/ {merchantId}/datafeeds |
GET https://merchantapi.googleapis.com/datasources/v1beta/ {parent=accounts/*}/dataSources |
{merchantId} | {parent} | |
fetchnow |
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds/{datafeedId}/fetchNow | POST https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*}:fetch | {merchantId}/datafeeds/{datafeedId} | {name=accounts/*/dataSources/*} |