Appearance
Stocks
Stock management tracks inventory quantities per product per warehouse.
List Stocks
GET/stocks🔒 Session — can viewAny
Paginated list of stocks with filtering.
Supports filtering via StockQueryFilterService. Includes warehouse data.
Create Stock
POST/stocks/store🔒 Session — can create
Create a stock entry for a product in a warehouse. Initial quantity is always set to 0.
| Field | Type | Required | Description |
|---|---|---|---|
product_id | string | Yes | Product ID (must exist) |
warehouse_id | string | Yes | Warehouse ID (must exist) |
warning_quantity | number | Yes | Low stock warning threshold |
status | string | Yes | Stock status (enum value) |
INFO
Stock quantity always starts at 0. Use the increment/decrement endpoints to adjust quantities.
Show Stock
GET/stocks/{stock}/show🔒 Session — can view
View stock details including current quantity and history.
Update Stock
PATCH/stocks/{stock}/update🔒 Session — can update
Update stock metadata.
| Field | Type | Required | Description |
|---|---|---|---|
product_id | string | Yes | Product ID |
warehouse_id | string | Yes | Warehouse ID |
warning_quantity | number | Yes | Low stock warning threshold |
status | string | Yes | Stock status |
Delete Stocks (Bulk)
DELETE/stocks/delete🔒 Session — can delete
Bulk delete stock entries.
| Field | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | Array of stock IDs |
Increment Stock
PUT/stocks/{stock}/increment🔒 Session — can increment
Add quantity to a stock entry. Creates a stock history record.
| Field | Type | Required | Description |
|---|---|---|---|
quantity | number | Yes | Quantity to add |
Decrement Stock
PUT/stocks/{stock}/decrement🔒 Session — can decrement
Remove quantity from a stock entry. Creates a stock history record.
| Field | Type | Required | Description |
|---|---|---|---|
quantity | number | Yes | Quantity to subtract |
Stock Histories
GET/stocks-histories🔒 Session
View paginated stock change history across all stocks.
