Migrate data sources management

Data sources let you upload your products to Google. Automated data sources make it easier to send your product data to Google. For more information, see Overview of Merchant Data sources API.

Here's a sample comparison of the requests in Content API for Shopping to the Merchant Data sources API:

Content API for Shopping Merchant Data sources API
URL https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeeds https://merchantapi.googleapis.com/datasources/v1beta/{PARENT}/dataSources
Identifiers {ID} {NAME}

Methods

Here's a comparison of the data feeds methods in the Content API for Shopping and the Merchant Data sources API:

Method Content API for Shopping Merchant Data sources API
customBatch Yes No
insert Yes Yes
get Yes Yes
update Yes Yes
delete Yes Yes
list Yes Yes
fetchNow Yes Yes

Identifiers

Contrary to other resources, the name of the data source cannot be constructed from the Content API ID as the ID values have changed. You can call the list method to get the new IDs of the Data Sources.

Alternatively, you can call the accounts.products.get method and get the new Data Source ID from the product resource.

Methods

Here's what has changed for data feeds in the Merchant Data sources API:

Method URL in Content API for Shopping URL in Merchant Data sources API Identifier in Content API for Shopping Identifier in Merchant Data sources API Description
create POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeeds POST https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources {MERCHANT_ID} {PARENT} In Content API for Shopping, the only create scenario is the create primary file feed. All other create scenarios have been newly introduced in Merchant Data sources API.
update PUT https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeeds/{DATAFEED_ID} PATCH https://merchantapi.googleapis.com/datasources/v1beta/{dataSource.name=accounts/*/dataSources/*} {MERCHANT_ID}/datafeeds/{DATAFEED_ID} {dataSource.name=accounts/*/dataSources/*}
delete DELETE https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeeds/{DATAFEED_ID} DELETE https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*} {MERCHANT_ID}/datafeeds/{DATAFEED_ID} {name=accounts/*/dataSources/*}
get GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeeds/{DATAFEED_ID} GET https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*} {MERCHANT_ID}/datafeeds/{DATAFEED_ID} {name=accounts/*/dataSources/*}
list GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeeds GET https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources {MERCHANT_ID} {PARENT}
fetchnow POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeeds/{DATAFEED_ID}/fetchNow POST https://merchantapi.googleapis.com/datasources/v1beta/{name=accounts/*/dataSources/*}:fetch {MERCHANT_ID}/datafeeds/{DATAFEED_ID} {name=accounts/*/dataSources/*}
datafeedstatuses.get GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/datafeedstatuses/{DATAFEED_ID} GET https://merchantapi.googleapis.com/accounts/v1beta/{MERCHANT_ID}/datasources/{DATAFEED_ID}/fileUploads/latest {MERCHANT_ID}/datafeeds/{DATAFEED_ID} {MERCHANT_ID}/datasources/{DATAFEED_ID}

The identifier in the API request for retrieving product status is the same for both Content API for Shopping and Merchant API.

You can replicate the behavior of the datafeedstatuses.list request by gathering the data source IDs and calling fileUploads.get method for those IDs.