広告在庫管理を移行する

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 型になりました。