Pular para o conteúdo
Documentação API Reference FAQ Changelog Status

Inventory (MSI)

magento-2

Multi-Source Inventory: sources, stocks, source items, stock items, reservations.

GET /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 quantity e status.
  • 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.

POST /rest/V1/inventory/sources Bearer

Create a source

Create a source.

PUT /rest/V1/inventory/sources/:sourceCode Bearer

Update a source

Update a source.

GET /rest/V1/inventory/sources/:sourceCode Bearer

Get a source

GET /rest/V1/inventory/sources Bearer

List sources (searchCriteria)

List sources (searchCriteria).

POST /rest/V1/inventory/stocks Bearer

Create a stock

Create a stock.

PUT /rest/V1/inventory/stocks/:stockId Bearer

Update a stock

Update a stock.

GET /rest/V1/inventory/stocks/:stockId Bearer

Get a stock

DELETE /rest/V1/inventory/stocks/:stockId Bearer

Delete a stock

Delete a stock.

GET /rest/V1/inventory/stocks Bearer

List stocks

POST /rest/V1/inventory/stock-source-links Bearer

Assign source(s) to stock

Assign source(s) to stock.

POST /rest/V1/inventory/stock-source-links-delete Bearer

Unassign source(s) from stock

Unassign source(s) from stock.

GET /rest/V1/inventory/stock-source-links Bearer

List links

POST /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 }.

POST /rest/V1/inventory/source-items-delete Bearer

Delete source items

Delete source items.

GET /rest/V1/inventory/source-items Bearer

List source items (searchCriteria)

List source items (searchCriteria).

GET /rest/V1/inventory/is-product-salable/:sku/:stockId Bearer

Check if SKU is salable

Check if SKU is salable.

POST /rest/V1/inventory/is-product-salable-for-requested-qty/:sku/:stockId Bearer

Check salability for qty

Check salability for qty.

GET /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.

POST /rest/V1/inventory/source-selection-algorithm-result Bearer

Run source selection algorithm

Run source selection algorithm.

GET /rest/V1/stockItems/:productSku Bearer

Get stock item (legacy)

Get stock item (legacy).

Funciona mas só reflete default stock.

GET /rest/V1/stockItems/lowStock/ Bearer

List low stock items

List low stock items.

PUT /rest/V1/products/:sku/stockItems/:itemId Bearer

Update stock item (legacy)

Update stock item (legacy).

Deprecated; use source-items.