All endpoints require an
Authorization: Bearer <token> header.Endpoint
Request body
UUID of the product the movement applies to.
Direction of the movement. Must be
"IN" (stock received) or "OUT" (stock dispatched).Number of units to move.
Human-readable explanation for the movement (e.g.,
"received from supplier", "sold to customer").The
reason field is optional but recommended. It is stored on the movement record and is useful for auditing inventory changes over time.Response
Returns the created stock movement record.Unique identifier for the stock movement (UUID).
UUID of the product this movement applies to.
Direction of the movement:
"IN" or "OUT".Number of units moved.
Explanation for the movement.
null if not provided.UUID of the tenant this movement belongs to.
ISO 8601 timestamp of when the movement was recorded.
ISO 8601 timestamp of when the movement was last updated.
Side effects: inventory update
Recording a movement also updates the corresponding inventory quantity automatically. The response only contains the movement record — queryGET /api/inventory to see the updated quantity.
| Movement type | Effect on inventory.quantity |
|---|---|
IN | inventory.quantity += quantity |
OUT | inventory.quantity -= quantity |
stock-movements.ts: