Skip to content

Inventory Transactions

Inventory stock movement data.

Fields

FieldTypeRequiredVersionDescription
idguidYes1.1.2Unique transaction identifier
itemIdguidYes1.1.2Reference to InventoryItem
amountfloatYes1.1.2Transaction amount (positive=in, negative=out)
typestringNo1.1.2Transaction type
locationIdguidNo1.1.2Reference to InventoryLocation
supplierIdguidNo1.1.2Reference to InventorySupplier
customerIdintegerYes1.1.2Reference to Customer
referencestringNo1.1.2External reference (PO, invoice, etc.)
notesstringNo1.1.2Transaction notes
created_atdateYes1.1.2Transaction timestamp
createdBystringNo1.1.2User who created transaction

Transaction Types

TypeDescription
purchasePurchase/receiving from supplier
saleSale/consumption
transfer_inTransfer in from another location
transfer_outTransfer out to another location
adjustmentStock adjustment
wasteWaste/spoilage
countCount adjustment

Example - Purchase

json
{
  "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

json
{
  "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

json
{
  "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"
}
  • Customer - Parent customer/tenant
  • InventoryItem - Item reference
  • InventoryLocation - Location reference
  • InventorySupplier - Supplier reference (for purchases)

Technical documentation for partners and integrators