Stock Item Service

Back

Overview

Stock Items represent the current stock state of a product in a specific warehouse.

Each Stock Item defines:

Stock items are unique per (ProductId, WarehouseId) pair and are used by Inventory to power availability checks, allocation logic and replenishment planning.

All stock item operations are tenant-aware and fully audited.


Endpoints

Back to Inventory

GET

/api/v1/StockItem/GetAllStockItemByProductId/{productId}

Returns all stock items for a given product across warehouses.

Behavior:

Response:

Authorization:


GET

/api/v1/StockItem/GetAllStockItemByWarehouseId/{warehouseId}

Returns all stock items stored in a specific warehouse.

Behavior:

Response:

Authorization:


POST

/api/v1/StockItem/AddNewStockItem

Creates a new stock item (product stock in a warehouse).

Request body (StockItemModel):

Behavior:

Errors:

Authorization:


PUT

/api/v1/StockItem/UpdateStockItemByProductId/{productId}

Updates an existing stock item for a given product and warehouse.

Route parameters:

Request body (StockItemModel):

Behavior:

Errors:

Authorization:


DELETE

/api/v1/StockItem/DeleteStockItemByProductIdAndWarehouseId/{productId}/{warehouseId}

Deletes a stock item by (ProductId, WarehouseId).

Route parameters:

Behavior:

Errors:

Authorization:


Notes