広告在庫管理を移行する

Merchant API を使用すると、ローカル(実店舗)在庫と地域在庫を管理できます。

リクエスト

Merchant Inventories API のリクエスト URL の形式は次のとおりです。

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
URL 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 には、在庫管理用の 2 つの新しいメソッドが導入されています。

  • 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 では、ローカル在庫は 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 地域在庫の regionIDregion に変更されました。
string 型のフィールドで、定義済みの値のセットを持つ enum 型のフィールドで、定義済みの値のセットを持つ 定義済みの値のセットを持つ在庫属性内のフィールド(availabilitypickupMethod など)が enum 型になりました。