MageSmith
GETInventoryApi · Magento 2.4.9 Admin · Magento_InventoryApi::stock

GET /V1/inventory/stocks/:stockId

GET /V1/inventory/stocks/:stockId is a Magento 2 REST endpoint in the InventoryApi module. Get Stock data by given stockId. If you want to create plugin on get method, also you need to create separate. Requires an admin Bearer token with ACL Magento_InventoryApi::stock.

Plugin on getList method, because entity loading way is different for these methods

Last verified: against Magento 2.4.9.

Returns

Magento\InventoryApi\Api\Data\StockInterface

Service contract

Magento\InventoryApi\Api\StockRepositoryInterface::get

Authorization

Admin Bearer token with ACL:

  • Magento_InventoryApi::stock

Path parameters

stockId int Required

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Authorization
Bearer <ACCESS_TOKEN> admin token with ACL: Magento_InventoryApi::stock

Path

/V1/inventory/stocks/{stockId}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.