迁移产品目录管理系统

您可以使用 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 中的 LocalInventoryRegionalInventory 资源。Content API for Shopping 通过 storeCodeproductId 识别本地商品目录,并通过 regionIdproductId 识别区域性商品目录。
不支持 account:string 添加了新字段,用于标识 productLocalInventory 所属的 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 添加了新字段,用于标识 productregionalInventory 所属的 Merchant Center 账号。
"regionId": string "region": string regionID 现在称为 region,用于区域性广告资源。
具有已定义值集的 string 类型字段 具有已定义值集的 enum 类型字段 具有已定义值集的目录属性(例如 availabilitypickupMethod)中的字段现在为 enum 类型。