遷移資料來源管理

你可以透過資料來源將產品上傳至 Google。自動資料來源可讓您更輕鬆地將產品資料傳送至 Google。詳情請參閱「Merchant Data Source API 總覽」一文。

以下舉例比較 Content API for Shopping 與 Merchant Data source API 中的要求:

Content API for Shopping 商家資料來源 API
網址 https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/datafeeds https://merchantapi.googleapis.com/datasources/v1beta/{parent}/dataSources
ID {id} {name}

方法

以下比較 Content API for Shopping 和 Merchant Data source API 中的資料動態饋給方法:

方法 Content API for Shopping 商家資料來源 API
customBatch
insert
get
update
delete
list
fetchNow

ID

與其他資源不同,ID 值有所變更,因此無法使用 Content API ID 建構資料來源的名稱。您可以呼叫 list 方法來取得資料來源的新 ID。

您也可以呼叫 accounts.products.get 方法,從 product 資源取得新的資料來源 ID。

方法

以下是 Merchant Data source API 中資料動態饋給的異動:

方法 Content API for Shopping 中的網址 Merchant Data source API 中的網址 Content API for Shopping 中的 ID Merchant Data source API 中的 ID 說明
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 貼文 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/*}