Inventory Transactions

Inventory stock movement data.

Fields

Field Type Required Version Description
id guid Yes 1.1.2 Unique transaction identifier
itemId guid Yes 1.1.2 Reference to InventoryItem
amount float Yes 1.1.2 Transaction amount (positive=in, negative=out)
type string No 1.1.2 Transaction type
locationId guid No 1.1.2 Reference to InventoryLocation
supplierId guid No 1.1.2 Reference to InventorySupplier
customerId integer Yes 1.1.2 Reference to Customer
reference string No 1.1.2 External reference (PO, invoice, etc.)
notes string No 1.1.2 Transaction notes
created_at date Yes 1.1.2 Transaction timestamp
createdBy string No 1.1.2 User who created transaction

Transaction Types

Type Description
purchase Purchase/receiving from supplier
sale Sale/consumption
transfer_in Transfer in from another location
transfer_out Transfer out to another location
adjustment Stock adjustment
waste Waste/spoilage
count Count adjustment

Example - Purchase

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "itemId": "item-salmon-id",
  "amount": 25.0,
  "type": "purchase",
  "locationId": "location-kitchen-id",
  "supplierId": "supplier-fish-id",
  "customerId": 12345,
  "reference": "PO-2024-001234",
  "notes": "Weekly delivery",
  "created_at": "2024-12-03T08:00:00Z",
  "createdBy": "chef.john"
}

Example - Sale/Consumption

{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "itemId": "item-salmon-id",
  "amount": -0.250,
  "type": "sale",
  "locationId": "location-kitchen-id",
  "supplierId": null,
  "customerId": 12345,
  "reference": "ORDER-12345",
  "notes": null,
  "created_at": "2024-12-03T19:30:00Z",
  "createdBy": "system"
}

Example - Waste

{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "itemId": "item-salmon-id",
  "amount": -2.5,
  "type": "waste",
  "locationId": "location-kitchen-id",
  "supplierId": null,
  "customerId": 12345,
  "reference": null,
  "notes": "Expired - delivery delay",
  "created_at": "2024-12-03T08:30:00Z",
  "createdBy": "chef.john"
}