遷移商品目錄管理

你可以使用 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
ID {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 類型。