Inventory Management API reference
Inventory Management provides new modules, interfaces, and classes to manage inventory quantities, sources, stocks, etc. This reference details deprecated modules and new services available for managing inventory for single and multi source merchants.
Deprecated modules
Inventory Management deprecates ScalableInventory
and CatalogInventory
modules.
The ScalableInventory
module is part of Adobe Commerce. Its original purpose was to perform inventory processing asynchronously, moving the computation of quantities to a worker that processed the calculations later. This functionality was limited in that the asynchronous processing could be performed on backordered products only.
Inventory Management creates reservations for all orders, not just those on backorder. All quantities are calculated asynchronously.
The CatalogInventory
module is part of Magento Open Source. Its original purpose was to retrieve and update stock attributes, including status, quantity, and backorders. Inventory Management architecture replaces and expands these capabilities to support multiple stocks and sources, salable quantities, stock quantities, etc.
The following interfaces and classes have been deprecated. They cannot be mapped to new interfaces. The Inventory Management architecture eliminates the need for this functionality.
ScalableInventory
interfaces:
ItemInterface
ItemsInterface
CatalogInventory
interfaces:
QueryProcessorInterface
RegisterProductSaleInterface
RevertProductSaleInterface
StockCollectionInterface
StockConfigurationInterface
StockCriteriaInterface
StockIndexInterface
StockInterface
(indexer)StockInterface
StockItemCollectionInterface
StockItemCriteriaInterface
StockItemInterface
StockItemRepositoryInterface
StockManagementInterface
StockRegistryInterface
StockRepositoryInterface
StockStateInterface
StockStatusCollectionInterface
StockStatusCriteriaInterface
StockStatusInterface
StockStatusRepositoryInterface
CatalogInventory
classes:
Backorders
DefaultStock
DefaultStockqty
Item
Minsaleqty
Qtyincrements
QuantityValidator
Status
Stock
(Helper)Stock
(model/source)Stock
StockFactory
Inventory Management API
The following services reside under the Magento/InventoryApi/Api
namespace, replacing deprecated services and APIs.
Service | Description | Deprecated API |
---|---|---|
Retrieves, saves or finds ( getList method) Source entities | - | |
Retrieves, saves, finds ( getList method) or deletes Stock entities) | - | |
Saves sources to stocks assignments | - | |
Removes sources to stocks assignments | - | |
Retrieves source to stock links according to provided SearchCriteria | - | |
Retrieves sources assigned to provided stock sorted by priority | - | |
Finds SourceItems (products assigned to sources with Quantity per Source) by provided SearchCriteria | ||
Saves SourceItems (quantites and stock statuses of products on sources) | ||
Deletes SourceItems (quantites and stock statuses of products on sources) |
Inventory Catalog API
The following services reside under the Magento/InventoryCatalogApi/Api
namespace.
Service | Description |
---|---|
Retrieves Default Source code | |
Retrieves Default Stock id | |
Bulk transfers the whole quantity of products from origin to destination source | |
Runs bulk partial inventory transfer for specified items |
Inventory Sales API
The following services reside under the Magento/InventorySalesApi/Api
namespace, replacing deprecated services and APIs.
Service | Description | Deprecated API |
---|---|---|
Resolves linked Stock by provided sales channel type and code | ||
Resolves linked stock to provided sales channel object | ||
Checks whether product salable | ||
Checks whether products in the list are salable | ||
Checks if the product is salable for the requested quantity (used for shopping cart and checkout) | ||
Gets product salable quantity (aggregated stock quantity including reservations) | ||
Places reservation in the scope some sales event (such as order placement, shipment creation, credit memo creation, order cancelation, etc) |
Inventory Configuration API
The following services reside under the Magento/InventoryConfigurationApi/Api
namespace, replacing deprecated services and APIs.
Service | Description | Deprecated API |
---|---|---|
Retrieves stock item configuration by SKU and stock id | Catalog inventory configuration stored in StockItem entity | |
Saves stock item configuration | Stock configuration saved using StockItemRepositoryInterface::save |
Inventory Source Selection Algorithm (SSA) API
The following services reside under the Magento/InventorySourceSelectionApi/Api
namespace.
Service | Description |
---|---|
Gets the default Source Selection Algorithm (SSA) code | |
Gets the entire Source Selection Algorithm (SSA) list | |
Runs a specified Source Selection Algorithm (SSA) based on provided Inventory Request object |
Inventory Export Aggregated Stock Data API
The following services reside under the Magento/InventoryExportStockApi/Api
namespace.
Service | Description |
---|---|
Returns salable quantities for a provided sales channel not including placed reservations for completed orders. The quantity amount is less precise and runs with high performance and speed. | |
Returns salable quantities for a provided sales channel including placed reservations (for completed orders). The quantity amount is precise and runs with reduced performance and slower speed. |