從 Content API for Shopping 遷移商品目錄管理功能

您可以使用 Merchant API 管理店面 (店內) 和區域商品目錄。

要求數量

請針對 Inventories sub-API 使用以下要求網址格式:

POST https://merchantapi.googleapis.com/inventories/v1beta/{parent}/regionalInventories

在 Merchant API 中,Inventories 子 API 和相關端點稱為複數「目錄」。

以下提供 Content API for Shopping 與 Merchant Inventories API 的店面商品目錄要求比較範例:

Content API 商家 API
網址 https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId}/localinventory https://merchantapi.googleapis.com/inventoryories/v1beta/{parent}/localInventories
ID {merchantId}/products/{productId} {name}

方法

Merchant API 提供兩種商品目錄管理新方法:

  • 列出產品的店面和區域商品目錄
  • 從產品中移除店面和區域商品目錄資料

以下比較 Content API for Shopping 和 Merchant Inventories API 的商品目錄方法:

方法 Content API for Shopping 商家 API
customBatch
insert
list
delete

店面商品目錄資料

以下是 Merchant Inventories API 中的店面商品目錄資料異動:

Content API for Shopping 商家 API 說明
不支援 name:string 新增欄位以區分 product 中的 LocalInventory 資源。Content API for Shopping 會依據 storeCodeproductId 識別店面商品目錄資料。
不支援 account:string 新增欄位,用於識別 productLocalInventory 所屬的商家帳戶。
price: {

object (Price)

}

price: {

object (Price)

}

Price 定義已變更。
salePrice: {

object (Price)

}

salePrice: {

object (Price)

}

Price 定義已變更。
salePriceEffectiveDate: string salePriceEffectiveDate: {

object (TimePeriod)

},

salePriceEffectiveDate 會在 Merchant Inventories API 中使用新的 TimePeriod 類型。
quantity:string, quantity:integer quantity 採用整數而非 Merchant Inventories API 中的字串。
kind:string 不支援 Merchant Inventories API 不支援 kind
不支援 localShippingLabel:string 新增欄位,在 Merchant Inventories API 中為本地運送服務加上標籤。

區域性商品目錄資料

以下是 Merchant Inventories API 中的區域商品目錄資料異動:

Content API for Shopping 商家 API 說明
不支援 name:string 新增欄位以區分 product 中的 regionalInventory 資源。Content API for Shopping 依據 regionIdproductId 識別區域性商品目錄。
不支援 account:string 新增欄位,用於識別 productregionalInventory 所屬的商家帳戶。
"regionId": string "region": string regionID 在 Merchant Inventories API 中稱為 region
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 不支援 Merchant Inventories API 不支援 kind