你可以使用 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: {
|
Price 定義已變更。
|
salePrice: {
|
salePrice: {
|
Price 定義已變更。
|
salePriceEffectiveDate: string
|
salePriceEffectiveDate: {
|
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 型別。
|