迁移产品目录管理系统

您可以使用 Merchant API 管理本地(实体店内)和地区性商品目录。

请求

对 Merchant Inventories API 使用以下请求网址格式:

POST https://merchantapi.googleapis.com/inventories/v1/{PARENT}/regionalInventories
POST https://merchantapi.googleapis.com/inventories/v1/{PARENT}/localInventories

{PARENT} 的格式为:accounts/{ACCOUNT_ID}/products/ {PRODUCT_ID}。

以下是本地商品目录请求的对比示例:

项 Content API for Shopping Merchant API
网址 https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/products/{PRODUCT_ID}/localinventory https://merchantapi.googleapis.com/inventories/v1/{PARENT}/localInventories
标识符 {MERCHANT_ID}/products/{PRODUCT_ID} {NAME}

方法

Merchant API 引入了两种新的商品目录管理方法:

  • list:让您可以列出商品的本地和地区性商品目录。
  • delete:让您能够删除商品的本地和地区性商品目录。

以下是各种广告资源管理方法的对比:

方法 Content API for Shopping Merchant API
customBatch 是 否
insert 是 是
list 否 是
delete 否 是

资源

本地和地区性商品目录的变化如下:

Content API for Shopping Merchant API 说明
不支持 name:string 该字段用于区分 product 中的 LocalInventory 和 RegionalInventory 资源。Content API for Shopping 通过 storeCode 和 productId 标识本地商品目录,通过 regionId 和 productId 标识地区性商品目录。
不支持 account:string 添加了新字段,用于标识 product 和 LocalInventory 所属的 Merchant Center 账号。
price: { object (Price) } price: {

object (Price)

}

Price 定义已更改。
salePrice: {

object (Price)

}

salePrice: {

object (Price)

}

Price 定义已更改。
salePriceEffectiveDate: string salePriceEffectiveDate: {

object (TimePeriod)

}

salePriceEffectiveDate 使用 Merchant Inventories API 中的新 TimePeriod 对象。
kind:string 不支持 该 API 不支持 kind。
quantity:string quantity:integer quantity 在本地商品目录中接受整数,而不是字符串。
不支持 localShippingLabel:string 添加了新字段,用于标识 product 和 regionalInventory 所属的 Merchant Center 账号。
"regionId": string "region": string 对于地区性商品目录,regionID 现在称为 region。
具有一组已定义值的 string 类型字段 具有一组已定义值的 enum 类型字段 具有一组已定义值(例如 availability、pickupMethod)的商品目录属性中的字段现在为 enum 类型。