Skip to content

Magento MSI APIs

Stanislav Idolov edited this page Feb 10, 2020 · 20 revisions

List of Inventory APIs and their legacy matches if any

Inventory Management API

All the services which reside under Magento/InventoryApi/Api namespace.

Service Description Legacy analog
SourceRepositoryInterface Service to Retrieve, Save or Find (getList method) Source entity(-ies) -
StockRepositoryInterface Service to Retrieve, Save, Find (getList method) or delete Stock entity(-ies) -
StockSourceLinksSaveInterface Save Sources to Stocks assignments -
StockSourceLinksDeleteInterface Remove Sources to Stocks assignments -
GetStockSourceLinksInterface Service to retrieve Source to Stock links according to provided SearchCriteria -
GetSourcesAssignedTo StockOrderedByPriorityInterface Service to Retrieve Sources assigned to provided Stock sorted by priority -
SourceItemRepositoryInterface Service to Find SourceItems (products assigned to sources with Quantity per Source) by provided SearchCriteria StockItemRepositoryInterface::getList
SourceItemsSaveInterface Service to save SourceItems (quantites and stock statuses of products on Sources) StockItemRepositoryInterface::save
SourceItemsDeleteInterface Service to delete SourceItems (quantites and stock statuses of products on Sources) StockItemRepositoryInterface::delete or deleteById
GetSourceItemsBySkuInterface Service to retrieve all product to Sources assignments by provided SKU -

Inventory Catalog API

All the services which reside under Magento/InventoryCatalogApi/Api namespace.

Service Description Legacy analog
DefaultSourceProviderInterface Service to retrieve Default Source code -
DefaultStockProviderInterface Service to retrieve Default Stock Id -
BulkInventoryTransferInterface Service to fully transfer the whole quantity of products from Origin to Destination source -
BulkPartialInventoryTransferInterface Service to run bulk partial inventory transfer for specified items -

Inventory Sales API

All the services which reside under Magento/InventorySalesApi/Api namespace.

Service Description Legacy analog
StockResolverInterface Service to resolve linked Stock by provided sales channel type and code StockRegistryInterface::getStock
GetStockBySalesChannelInterface Service to resolve linked Stock to provided sales channel object StockRegistryInterface::getStock
IsProductSalableInterface Service to check whether product salable StockRegistryInterface::getProductStockStatus and StockRegistryInterface::getProductStockStatusBySku and StockRegistryInterface::getStockStatusBySku
IsProductSalable ForRequestedQtyInterface Service to check whether product salable for Requested Quantity (used for Shopping Cart and Checkout) StockStateInterface::checkQuoteItemQty and StockStateInterface::checkQty
GetProductSalableQtyInterface Get Product Salable Quantity (aggregated stock quantity including reservations) StockStateInterface::getStockQty or just retrieve Qty from StockStatus entity
PlaceReservations ForSalesEventInterface Place Reservation in the scope some sales event (i.e. Order Placement, Shipment creation, Credit Memo creation, Order Cancelation and so on) RegisterProductSaleInterface and RevertProductSaleInterface

Inventory Configuration API

All the services which reside under Magento/InventoryConfigurationApi/Api namespace.

Service Description Legacy analog
GetStockItemConfigurationInterface Service to retrieve Stock Item configuration by SKU and Stock Id Catalog Inventory configuration stored in StockItem entity
SaveStockItemConfigurationInterface Service to save Stock Item configuration Stock Configuration saved via StockItemRepositoryInterface::save

Inventory Source Selection Algorithm (SSA) API

All the services which reside under Magento/InventorySourceSelectionApi/Api namespace.

Service Description Legacy analog
GetDefaultSourceSelectionAlgorithmCodeInterface Service to Get Default Source Selection Algorithm (SSA) code -
GetSourceSelectionAlgorithmListInterface Service to get the whole Source Selection Algorithm (SSA) list -
SourceSelectionServiceInterface Service to run specified Source Selection Algorithm (SSA) based on provided Inventory Request object -

Inventory Export Aggregated Stock Data API

All the services which reside under Magento/InventoryExportStockApi/Api namespace.

Service Description Legacy analog
ExportStockIndexDataInterface Service to return Salable Quantities for provided Sales Channel NOT including placed reservations (for completed Orders). Less precise, but very quick like a rabbit -
ExportStockSalableQtyInterface Service to return Salable Quantities for provided Sales Channel Including placed reservations (for completed Orders). Precise, but very performance efficient like a turtle -

MSI Documentation:

  1. Technical Vision. Catalog Inventory
  2. Installation Guide
  3. List of Inventory APIs and their legacy analogs
  4. MSI Roadmap
  5. Known Issues in Order Lifecycle
  6. MSI User Guide
  7. DevDocs Documentation
  8. User Stories
  9. User Scenarios:
  10. Technical Designs:
  11. Admin UI
  12. MFTF Extension Tests
  13. Weekly MSI Demos
  14. Tutorials
Clone this wiki locally