迁移商品管理

您可以使用 Merchant API 以编程方式上传和管理商品。借助 accounts.products 资源,您可以创建网店商品目录,即商品和优惠列表。如需详细了解如何使用 Merchant API 上传和管理商品,请参阅 Merchant Products API 概览

下面是 Content API for Shopping 与 Merchant Products API 的对比示例:

Content API for Shopping Merchant Products API 说明
网址 https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/products/ https://merchantapi.googleapis.com/products/v1beta/{PARENT}/productInputs:insert Merchant API 请求网址中的 {PARENT} 变量代表账号的唯一标识符。
标识符 {ID} {NAME}

方法

下面对比了 Content API for Shopping 和 Merchant Products API 中的商品方法:

方法 Content API for Shopping Merchant Products API
customBatch
insert
get
update 不可用
delete
list

下面是 Content API for Shopping 和 Merchant Products API 的 GET 方法的示例比较:

Content API for Shopping Merchant API
GET https://shoppingcontent.googleapis.com/content/v2.1/{ACCOUNT_ID}/products/{PRODUCT_ID} GET https://merchantapi.googleapis.com/products/v1beta/{name=accounts/*/products/*}

请求

方法 Content API for Shopping 中的网址 Merchant Products API 中的网址 Content API 中的标识符 Merchant Products API 中的标识符
insert POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/products POST https://merchantapi.googleapis.com/products/v1beta/{PARENT}/productsInputs:insert?dataSource=accounts/{MERCHANT_ID}/dataSources/{DATASOURCE_ID} {MERCHANT_ID} {PARENT}
update PATCH https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/products/{PRODUCT_ID} 不可用
delete DELETE https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/products/{PRODUCT_ID} DELETE https://merchantapi.googleapis.com/products/v1beta/{name=accounts/*/productInputs/*}?dataSource=accounts/{MERCHANT_ID}/dataSources/{DATASOURCE_ID} {MERCHANT_ID}/datafeeds/{PRODUCT_ID} {name=accounts/*/productInputs/*}
get GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/products/{PRODUCT_ID} GET https://merchantapi.googleapis.com/products/v1beta/{name=accounts/*/products/*} {MERCHANT_ID}/datafeeds/{PRODUCT_ID} {name=accounts/*/products/*}
list GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/products GET https://merchantapi.googleapis.com/products/v1beta/{parent=accounts/*}/products {MERCHANT_ID} {parent=accounts/*}

资源

Content API for Shopping Merchant Products API 说明
  • 产品
  • ProductStatus
  • 产品
  • ProductInput
Content API for Shopping 的 Product 资源中的多个字段已移至 Merchant Products API 的 ProductInput 资源中的 Attribute 字段下。