迁移产品目录管理系统

您可以使用 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 类型。