Inventory (MSI)
magento-2Multi-Source Inventory: sources, stocks, source items, stock items, reservations.
/rest/V1/inventory
Bearer
MSI — Multi Source Inventory overview
MSI — Multi Source Inventory
A partir do Magento 2.3 o estoque tradicional (cataloginventory_stock_item) deu lugar ao MSI, baseado em 4 conceitos:
- Source — local físico (depósito, loja).
- Stock — agrupamento de sources vinculado a um sales channel (website).
- SourceItem — relação SKU × Source com
quantityestatus. - Reservation — redução "virtual" de quantity (criada ao colocar um pedido, descontada ao invoice).
Para compatibilidade, o endpoint legado /V1/stockItems continua funcionando — mas só reflete o default stock.
/rest/V1/inventory/sources
Bearer
Create a source
Create a source.
/rest/V1/inventory/sources/:sourceCode
Bearer
Update a source
Update a source.
/rest/V1/inventory/sources/:sourceCode
Bearer
Get a source
Get a source.
/rest/V1/inventory/sources
Bearer
List sources (searchCriteria)
List sources (searchCriteria).
/rest/V1/inventory/stocks
Bearer
Create a stock
Create a stock.
/rest/V1/inventory/stocks/:stockId
Bearer
Update a stock
Update a stock.
/rest/V1/inventory/stocks/:stockId
Bearer
Get a stock
Get a stock.
/rest/V1/inventory/stocks/:stockId
Bearer
Delete a stock
Delete a stock.
/rest/V1/inventory/stocks
Bearer
List stocks
List stocks.
/rest/V1/inventory/stock-source-links
Bearer
Assign source(s) to stock
Assign source(s) to stock.
/rest/V1/inventory/stock-source-links-delete
Bearer
Unassign source(s) from stock
Unassign source(s) from stock.
/rest/V1/inventory/stock-source-links
Bearer
List links
List links.
/rest/V1/inventory/source-items
Bearer
Save source items (bulk qty/status)
Save source items (bulk qty/status).
Array de { sku, source_code, quantity, status }.
/rest/V1/inventory/source-items-delete
Bearer
Delete source items
Delete source items.
/rest/V1/inventory/source-items
Bearer
List source items (searchCriteria)
List source items (searchCriteria).
/rest/V1/inventory/is-product-salable/:sku/:stockId
Bearer
Check if SKU is salable
Check if SKU is salable.
/rest/V1/inventory/is-product-salable-for-requested-qty/:sku/:stockId
Bearer
Check salability for qty
Check salability for qty.
/rest/V1/inventory/get-product-salable-quantity/:sku/:stockId
Bearer
Get salable qty per stock
Get salable qty per stock.
Salable = sum(source qty) − reservations.
/rest/V1/inventory/source-selection-algorithm-result
Bearer
Run source selection algorithm
Run source selection algorithm.
/rest/V1/stockItems/:productSku
Bearer
Get stock item (legacy)
Get stock item (legacy).
Funciona mas só reflete default stock.
/rest/V1/stockItems/lowStock/
Bearer
List low stock items
List low stock items.
/rest/V1/products/:sku/stockItems/:itemId
Bearer
Update stock item (legacy)
Update stock item (legacy).
Deprecated; use source-items.