迁移产品目录管理系统

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