Download OpenAPI specification:
Source OpenAPI spec (manually maintained). The CI bundles this file into openapi.yaml and builds api.html (ReDoc).
Returns daily stock value between two dates (inclusive), optionally filtered by supplier.
start required | string <date> Inclusive start date (yyyy-MM-dd). |
end required | string <date> Inclusive end date (yyyy-MM-dd). |
supplierId | string Optional supplier filter. |
[- {
- "date": "2025-07-15",
- "totalValue": 123456.78
}
]
Purchases, COGS, returns, write-offs, opening and ending inventory for a date range (inclusive). The server calculates using the configured costing method.
from required | string <date> Inclusive start date (yyyy-MM-dd). |
to required | string <date> Inclusive end date (yyyy-MM-dd). |
supplierId | string Optional supplier filter. |
{- "method": "WAC",
- "fromDate": "2025-07-01",
- "toDate": "2025-07-31",
- "openingQty": 12000,
- "openingValue": "345678.90",
- "purchasesQty": 4200,
- "purchasesCost": "83500.00",
- "returnsInQty": 150,
- "returnsInCost": "1200.00",
- "cogsQty": 3900,
- "cogsCost": "76000.00",
- "writeOffQty": 35,
- "writeOffCost": "550.00",
- "endingQty": 12415,
- "endingValue": "352828.90"
}
Historical unit purchase price for an item between two dates (inclusive).
itemId required | string Inventory item id. |
supplierId | string Optional supplier filter. |
start required | string <date> Inclusive start date (yyyy-MM-dd). |
end required | string <date> Inclusive end date (yyyy-MM-dd). |
[- {
- "timestamp": "2025-07-15",
- "price": "4.99"
}
]
Returns monthly stock movement (stockIn and stockOut) between two dates. Optionally filter by supplier.
start required | string <date> Inclusive start date (yyyy-MM-dd). |
end required | string <date> Inclusive end date (yyyy-MM-dd). |
supplierId | string Optional supplier filter. |
[- {
- "month": "2025-07",
- "stockIn": 1200,
- "stockOut": 800
}
]
Returns a dashboard-ready summary for the specified period and/or supplier. If dates are omitted, the service defaults to the last 30 days ending "now".
supplierId | string Optional supplier filter. |
startDate | string <date-time> Inclusive start timestamp (ISO-8601). Defaults to now-30 days if omitted. |
endDate | string <date-time> Inclusive end timestamp (ISO-8601). Defaults to now if omitted. |
{- "stockPerSupplier": [
- {
- "supplierName": "ACME Tools GmbH",
- "totalQuantity": 9876
}
], - "lowStockItems": [
- {
- "itemName": "M8 Hex Bolt",
- "quantity": 12,
- "minimumQuantity": 25
}
], - "monthlyStockMovement": [
- {
- "month": "2025-07",
- "stockIn": 1200,
- "stockOut": 800
}
], - "topUpdatedItems": [
- {
- "itemName": "M8 Hex Bolt",
- "updateCount": 17
}
]
}
Returns update counts for items belonging to the specified supplier.
supplierId required | string Supplier identifier. |
[- {
- "itemName": "M8 Hex Bolt",
- "updateCount": 17
}
]
Items below their configured minimum threshold for the specified supplier.
supplierId required | string Supplier identifier. |
[- {
- "itemName": "M8 Hex Bolt",
- "quantity": 12,
- "minimumQuantity": 25
}
]
For large datasets, prefer /api/inventory/search
.
[- {
- "id": "a7b6c4a0-12ef-4e3a-98d0-8c6a22f5c111",
- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "totalValue": 499.75,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "createdAt": "2025-08-20T14:25:00Z",
- "supplierName": "ACME Tools GmbH",
- "minimumQuantity": 5
}
]
name required | string non-empty Display name of the item. |
quantity required | integer <int32> >= 0 Quantity currently in stock (>= 0). |
price required | number <double> >= 0.01 Unit price (> 0). |
supplierId required | string Foreign key of supplier. |
createdBy | string or null Username/ID of creator (audit). |
minimumQuantity | integer <int32> Business-defined minimum threshold for low-stock checks. |
{- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "minimumQuantity": 5
}
{- "id": "a7b6c4a0-12ef-4e3a-98d0-8c6a22f5c111",
- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "totalValue": 499.75,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "createdAt": "2025-08-20T14:25:00Z",
- "supplierName": "ACME Tools GmbH",
- "minimumQuantity": 5
}
{- "id": "a7b6c4a0-12ef-4e3a-98d0-8c6a22f5c111",
- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "totalValue": 499.75,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "createdAt": "2025-08-20T14:25:00Z",
- "supplierName": "ACME Tools GmbH",
- "minimumQuantity": 5
}
Full update. Server ignores any body.id to avoid mismatches (controller sets body.id = null).
id required | string |
name required | string non-empty Display name of the item. |
quantity required | integer <int32> >= 0 Quantity currently in stock (>= 0). |
price required | number <double> >= 0.01 Unit price (> 0). |
supplierId required | string Foreign key of supplier. |
createdBy | string or null Username/ID of creator (audit). |
minimumQuantity | integer <int32> Business-defined minimum threshold for low-stock checks. |
{- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "minimumQuantity": 5
}
{- "id": "a7b6c4a0-12ef-4e3a-98d0-8c6a22f5c111",
- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "totalValue": 499.75,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "createdAt": "2025-08-20T14:25:00Z",
- "supplierName": "ACME Tools GmbH",
- "minimumQuantity": 5
}
id required | string |
reason required | string (StockChangeReason)
Example: reason=SOLD Audit reason for deletion. |
Case-insensitive substring match. Default size 20; default sort by price
.
name required | string non-empty Case-insensitive substring to search. |
page | integer >= 0 Default: 0 Zero-based page index. |
size | integer >= 1 Default: 20 Page size. |
sort | string Example: sort=price,asc Sort criteria, e.g. |
{- "content": [
- {
- "id": "a7b6c4a0-12ef-4e3a-98d0-8c6a22f5c111",
- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "totalValue": 499.75,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "createdAt": "2025-08-20T14:25:00Z",
- "supplierName": "ACME Tools GmbH",
- "minimumQuantity": 5
}
], - "totalElements": 0,
- "totalPages": 0,
- "size": 0,
- "number": 0,
- "sort": { },
- "first": true,
- "last": true,
- "numberOfElements": 0
}
id required | string |
delta required | integer Example: delta=-3 Positive to add stock; negative to remove. | ||||||||||||||||||||||||
reason required | string (StockChangeReason)
Example: reason=SOLD Business reason for stock changes. |
{- "id": "a7b6c4a0-12ef-4e3a-98d0-8c6a22f5c111",
- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "totalValue": 499.75,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "createdAt": "2025-08-20T14:25:00Z",
- "supplierName": "ACME Tools GmbH",
- "minimumQuantity": 5
}
id required | string |
price required | number <double> >= 0.01 Example: price=24.5 New unit price (> 0) |
{- "id": "a7b6c4a0-12ef-4e3a-98d0-8c6a22f5c111",
- "name": "Steel Wrench",
- "quantity": 25,
- "price": 19.99,
- "totalValue": 499.75,
- "supplierId": "sup-001",
- "createdBy": "carlos.k",
- "createdAt": "2025-08-20T14:25:00Z",
- "supplierName": "ACME Tools GmbH",
- "minimumQuantity": 5
}