Merchant API を使用して、ローカル(店舗)と地域の在庫を管理できます。
リクエスト
インベントリ サブ API には、次のリクエスト URL 形式を使用します。
POST https://merchantapi.googleapis.com/inventories/v1beta/{parent}/regionalInventories
Merchant API では、Inventories のサブ API と関連エンドポイントのことを複数形の「inventories」と呼びます。
ローカル在庫リクエストに関して、Content API for Shopping と Merchant Inventories API を比較した例を次に示します。
Content API | 販売者 API | |
---|---|---|
URL | https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId}/localinventory | https://merchantapi.googleapis.com/inventories/v1beta/{parent}/localInventories |
識別子 | {merchantId}/products/{productId} |
{name}
|
Methods
Merchant API には、広告在庫管理用に新しい 2 つの方法が導入されています。
- 商品のローカル在庫と地域別の在庫をリストしてください
- 商品からローカル在庫と地域別の在庫を削除してください
以下に、Content API for Shopping と Merchant Inventories API の在庫メソッドの比較を示します。
メソッド | Content API for Shopping | 販売者 API |
---|---|---|
customBatch |
○ | × |
insert |
○ | ○ |
list |
× | ○ |
delete |
× | ○ |
ローカル在庫
Merchant Inventories API のローカル在庫の変更点は次のとおりです。
Content API for Shopping | Merchant API | 説明 |
---|---|---|
サポート対象外 | name:string
|
product 内の LocalInventory リソースを区別するための新しいフィールドを追加しました。Content API for Shopping は、storeCode と productId でローカル在庫を識別します。 |
サポート対象外 | account:string
|
product と LocalInventory が属する販売アカウントを識別する新しいフィールドを追加しました。
|
price: {
|
price: {
|
Price の定義が変更されました。 |
salePrice: {
|
salePrice: {
|
Price の定義が変更されました。 |
salePriceEffectiveDate: string
|
salePriceEffectiveDate: {
|
salePriceEffectiveDate は、Merchant Inventories API の新しい TimePeriod タイプを使用します。 |
quantity:string,
|
quantity:integer
|
Merchant Inventories API で、quantity は文字列ではなく整数を取ります。 |
kind:string
|
サポート対象外 | kind は Merchant Inventories API ではサポートされていません。 |
サポート対象外 | localShippingLabel:string
|
Merchant Inventories API に、ローカル配送サービスにラベルを付けるための新しいフィールドを追加しました。 |
地域別の在庫
Merchant Inventories API における地域別の在庫の変更点は次のとおりです。
Content API for Shopping | Merchant API | 説明 |
---|---|---|
サポート対象外 | name:string
|
product 内の regionalInventory リソースを区別するための新しいフィールドを追加しました。Content API for Shopping では、地域の広告枠を regionId と productId で識別します。 |
サポート対象外 | account:string
|
product と regionalInventory が属する販売アカウントを識別する新しいフィールドを追加しました。
|
"regionId": string
|
"region": string
|
regionID は、Merchant Inventories API では region と呼ばれます。 |
price: {
|
price: {
|
Price の定義が変更されました。 |
salePrice: {
|
salePrice: {
|
Price の定義が変更されました。 |
salePriceEffectiveDate: string
|
salePriceEffectiveDate: {
|
salePriceEffectiveDate は、Merchant Inventories API の新しい TimePeriod タイプを使用します。 |
kind:string
|
サポート対象外 | kind は Merchant Inventories API ではサポートされていません。 |