Migrate inventory management from the Content API for Shopping

You can use the Merchant API to manage local (in-store) and regional inventory.

Requests

Use the following request URL format for the Inventories sub-API:

POST https://merchantapi.googleapis.com/inventories/v1beta/{parent}/regionalInventories

In the Merchant API, the Inventories sub-API and related endpoint is referred to as the plural, "inventories".

Here's a sample comparison of the Content API for Shopping to the Merchant Inventories API for local inventory requests:

Content API Merchant API
URL https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId}/localinventory https://merchantapi.googleapis.com/inventories/v1beta/{parent}/localInventories
Identifiers {merchantId}/products/{productId} {name}

Methods

The Merchant API introduces two new methods for inventory management:

  • List the local and regional inventories for your products
  • Remove local and regional inventory from your products

Here's a comparison of the inventories methods in the Content API for Shopping and the Merchant Inventories API:

Method Content API for Shopping Merchant API
customBatch Yes No
insert Yes Yes
list No Yes
delete No Yes

Local inventory

Here's what's changed for local inventory in the Merchant Inventories API:

Content API for Shopping Merchant API Description
Not supported name:string Added new field to differentiate LocalInventory resources within a product. The Content API for Shopping identifies local inventory by storeCode and productId.
Not supported account:string Added new field to identify the merchant account the product and LocalInventory belong to.
price: {

object (Price)

}

price: {

object (Price)

}

Price definition has changed.
salePrice: {

object (Price)

}

salePrice: {

object (Price)

}

Price definition has changed.
salePriceEffectiveDate: string salePriceEffectiveDate: {

object (TimePeriod)

},

salePriceEffectiveDate uses the new TimePeriod type in the Merchant Inventories API.
quantity:string, quantity:integer quantity takes an integer instead of string in the Merchant Inventories API.
kind:string Not supported kind isn't supported in the Merchant Inventories API.
Not supported localShippingLabel:string Added new field to label local shipping services in the Merchant Inventories API.

Regional inventory

Here's what's changed for regional inventory in the Merchant Inventories API:

Content API for Shopping Merchant API Description
Not supported name:string Added new field to differentiate regionalInventory resources within a product. The Content API for Shopping identifies regional inventory by regionId and productId.
Not supported account:string Added new field to identify the merchant account the product and regionalInventory belong to.
"regionId": string "region": string regionID is called region in the Merchant Inventories API.
price: {

object (Price)

}

price: {

object (Price)

}

Price definition has changed.
salePrice: {

object (Price)

}

salePrice: {

object (Price)

}

Price definition has changed.
salePriceEffectiveDate: string salePriceEffectiveDate: {

object (TimePeriod)

},

salePriceEffectiveDate uses the new TimePeriod type in the Merchant Inventories API.
kind:string Not supported kind isn't supported in the Merchant Inventories API.