Merchant API, envanter yönetimi için iki yeni yöntem sunar:
list: Ürünlerinizin yerel ve bölgesel envanterini listelemenize olanak tanır.
delete: Ürünlerinizin yerel ve bölgesel envanterini silmenize olanak tanır.
Envanterleri yönetmek için kullanılabilen yöntemlerin karşılaştırmasını aşağıda bulabilirsiniz:
Yöntem
Content API for Shopping
Merchant API
customBatch
Evet
Hayır
insert
Evet
Evet
list
Hayır
Evet
delete
Hayır
Evet
Kaynaklar
Yerel ve bölgesel envanterlerde yapılan değişiklikler:
Content API for Shopping
Merchant API
Açıklama
Desteklenmiyor
name:string
Bu alan, product içindeki LocalInventory ve RegionalInventory kaynaklarını ayırt eder. Content API for Shopping, yerel envanteri storeCode ve productId ile, bölgesel envanteri ise regionId ve productId ile tanımlar.
Desteklenmiyor
account:string
product ve LocalInventory öğelerinin ait olduğu Merchant Center hesabını tanımlamak için yeni alan eklendi.
[null,null,["Son güncelleme tarihi: 2025-08-11 UTC."],[[["\u003cp\u003eThe Merchant API allows management of both local (in-store) and regional inventory for products.\u003c/p\u003e\n"],["\u003cp\u003eIt introduces new methods for inventory management like listing and removing local and regional inventory, replacing the Content API for Shopping for these operations.\u003c/p\u003e\n"],["\u003cp\u003eThere 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.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e field is introduced to uniquely identify inventory resources, and \u003ccode\u003eaccount\u003c/code\u003e is added to link products and inventory to the merchant account.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eprice\u003c/code\u003e, \u003ccode\u003esalePrice\u003c/code\u003e, and \u003ccode\u003esalePriceEffectiveDate\u003c/code\u003e fields have been updated with new data types and structures in the Merchant Inventories API.\u003c/p\u003e\n"]]],["The Merchant API manages local and regional inventory, using the Inventories sub-API. Key actions include listing and removing both local and regional inventories. The API uses `POST` requests with a specific URL format. New fields like `name` and `account` were added for local and regional inventory. The `price` definition has been modified. `salePriceEffectiveDate` now uses the `TimePeriod` type and `quantity` is now an integer. Methods such as `list` and `delete` are now supported. The `customBatch` method is not.\n"],null,["# Migrate inventory management\n\nYou can use the Merchant API to manage local (in-store) and regional inventory.\n\nRequests\n--------\n\nUse the following request URL format for the [Merchant Inventories API](/merchant/api/guides/inventories/overview): \n\n POST https://merchantapi.googleapis.com/inventories/v1/\u003cvar translate=\"no\"\u003e{PARENT}\u003c/var\u003e/regionalInventories\n\n POST https://merchantapi.googleapis.com/inventories/v1/\u003cvar translate=\"no\"\u003e{PARENT}\u003c/var\u003e/localInventories\n\n\u003cvar translate=\"no\"\u003e{PARENT}\u003c/var\u003e will have the format:\naccounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/products/\u003cvar translate=\"no\"\u003e {PRODUCT_ID}\u003c/var\u003e.\n| **Note:** In Merchant API, the Merchant Inventories API and its related endpoints are referred using the plural form \"inventories\".\n\nHere's a sample comparison for local inventory requests:\n\n| Item | Content API for Shopping | Merchant API |\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| **URL** | https://shoppingcontent.googleapis.com/content/v2.1/\u003cvar translate=\"no\"\u003e{MERCHANT_ID}\u003c/var\u003e/products/\u003cvar translate=\"no\"\u003e{PRODUCT_ID}\u003c/var\u003e/localinventory | https://merchantapi.googleapis.com/inventories/v1/\u003cvar translate=\"no\"\u003e{PARENT}\u003c/var\u003e/localInventories |\n| **Identifiers** | `{MERCHANT_ID}/products/{PRODUCT_ID}` | `{NAME}` |\n\nMethods\n-------\n\nThe Merchant API introduces two new methods for inventory management:\n\n- `list`: Lets you list local and regional inventory for your products.\n- `delete`: Lets you delete local and regional inventory for your products.\n\nHere's a comparison of the available methods to manage inventories:\n\n| Method | Content API for Shopping | Merchant API |\n| `customBatch` | Yes | No |\n| `insert` | Yes | Yes |\n| `list` | No | Yes |\n| `delete` | No | Yes |\n|---------------|:------------------------:|:------------:|\n\nResources\n---------\n\nHere's what's changed for local and regional inventories:\n\n| Content API for Shopping | Merchant API | Description |\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 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`. |\n| Not supported | `account:string` | Added new field to identify the Merchant Center account the `product` and `LocalInventory` belong to. |\n| ` price: { `[object (Price)](/merchant/api/guides/compatibility/overview#price)` } ` | `price: {` ` `[object (Price)](/merchant/api/guides/compatibility/overview#price) `}` | [Price](/merchant/api/guides/compatibility/overview#price) definition has changed. |\n| `salePrice: {` ` `[object (Price)](/merchant/api/guides/compatibility/overview#price) `}` | `salePrice: {` ` `[object (Price)](/merchant/api/guides/compatibility/overview#price) `}` | [Price](/merchant/api/guides/compatibility/overview#price) definition has changed. |\n| `salePriceEffectiveDate: string` | `salePriceEffectiveDate: {` ` object (TimePeriod)` ` }` | `salePriceEffectiveDate` uses the new `TimePeriod` object in the Merchant Inventories API. |\n| `kind:string` | Not supported | The API doesn't support `kind`. |\n| `quantity:string` | `quantity:integer` | `quantity` takes an integer instead of string in the local inventory. |\n| Not supported | `localShippingLabel:string` | Added new field to identify the merchant center account the `product` and `regionalInventory` belong to. |\n| `\"regionId\": string` | `\"region\": string` | `regionID` is now called `region` for the regional inventory. |\n| `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. |\n\n| **Note:** The `channel` field within product identifier is no longer present in Merchant API. Products with `LOCAL` channel in Content API for Shopping should instead set the `legacy_local` field to true."]]