Migrate inventory management

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

Requests

Use the following request URL format for the Merchant Inventories API:

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

{PARENT} will have the format: accounts/{ACCOUNT_ID}/products/ {PRODUCT_ID}.

Here's a sample comparison for local inventory requests:

Item 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/v1beta/{PARENT}/localInventories
Identifiers {MERCHANT_ID}/products/{PRODUCT_ID} {NAME}

Methods

The Merchant API introduces two new methods for inventory management:

  • list: Lets you list local and regional inventory for your products.
  • delete: Lets you delete local and regional inventory for your products.

Here's a comparison of the available methods to manage inventories:

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

Resources

Here's what's changed for local and regional inventories:

Content API for Shopping Merchant API Description
Not supported name:string The field differentiates LocalInventory and RegionalInventory resources within a product. The Content API for Shopping identifies local inventory by storeCode and productId, and regional inventory by regionId and productId.
Not supported account:string The field identifies the merchant account the product, LocalInventory, and RegionalInventory 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 object in the Merchant Inventories API.
kind:string Not supported The API doesn't support kind.
quantity:string quantity:integer quantity takes an integer instead of string in the local inventory.
Not supported localShippingLabel:string The field labels local shipping services for the local inventory.
"regionId": string "region": string regionID is now called region for the regional inventory.