AI-generated Key Takeaways
- 
          
The Merchant API allows management of both local (in-store) and regional inventory for products.
 - 
          
It introduces new methods for inventory management like listing and removing local and regional inventory, replacing the Content API for Shopping for these operations.
 - 
          
There are key differences in how local and regional inventory are handled in the Merchant API compared to the Content API, including new fields and data types.
 - 
          
The
namefield is introduced to uniquely identify inventory resources, andaccountis added to link products and inventory to the merchant account. - 
          
price,salePrice, andsalePriceEffectiveDatefields have been updated with new data types and structures in the Merchant Inventories API. 
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/v1/{PARENT}/regionalInventories
POST https://merchantapi.googleapis.com/inventories/v1/{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/v1/{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
    | 
   Added new field to identify the Merchant Center account the product and LocalInventory belong to.
    | 
  
   
       price: {
           object (Price)
       }
   
    | 
   price: {
  | 
   Price definition has changed.
    | 
  
salePrice: {
  | 
   salePrice: {
  | 
      Price definition has changed.
    | 
  
salePriceEffectiveDate: string
    | 
   salePriceEffectiveDate: {
 
  | 
   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
    | 
   Added new field to identify the merchant center account the product and regionalInventory belong to.
    | 
  
"regionId": string
    | 
   "region": string
    | 
   regionID is now called region for the regional inventory.
    | 
  
string type fields with defined set of values
    | 
   enum type fields with defined set of values
    | 
   Fields within inventory attributes with defined set of values (for example availability, pickupMethod) are now enum type.
    |