Skip to content

Inventory Transactions ​

Inventory movement ledger tracking all stock transactions and adjustments.

Storage Location ​

{customer_id}/inventory_trans/{year}/{month}/{yyyymmdd}.json

Day files are organized by transaction date. One file per calendar day, file replaced when the day is re-exported. A day with no movements has no file. JSON array of movement rows ordered by id.

Fields ​

FieldTypeRequiredDescription
idstringYesv1.3. Transaction id (stringified number).
typestringYesv1.3. Movement type: sale, manual, waste, receive, count_diff, supplement, expenditure, removal_comp or unknown.
customer_idnumberYesv1.3. Customer id.
item_idnumberNov1.3. Inventory item id.
item_namestringNov1.3. Inventory item name (denormalized).
datedatetimeYesv1.3. Transaction timestamp (ISO 8601).
qtynumberNov1.3. Quantity moved, in the item's base unit (negative for consumption/waste).
amountnumberNov1.3. Total amount for the movement.
unit_pricenumberNov1.3. Unit price used.
commentstringNov1.3. Free-text comment.
location_idnumberNov1.3. Inventory location id.
soidnumberNov1.3. Sales order id that caused the movement (type sale).

Movement Types ​

TypeDescription
saleItem consumed/sold (includes soid reference)
manualManual adjustment
wasteWaste/spoilage
receiveGoods received from supplier
count_diffInventory count variance
supplementStock supplement/top-up
expenditureItem used for operational purposes
removal_compRemoval compensation
unknownUnknown movement type

Example ​

json
[
  {
    "id": "10001",
    "type": "sale",
    "customer_id": 10352,
    "item_id": 45101,
    "item_name": "Espresso Beans",
    "date": "2026-01-20T08:15:32",
    "qty": -18,
    "amount": 4.50,
    "unit_price": 0.25,
    "location_id": 201,
    "soid": 188160255
  },
  {
    "id": "10002",
    "type": "waste",
    "customer_id": 10352,
    "item_id": 45102,
    "item_name": "Whole Milk",
    "date": "2026-01-20T09:30:00",
    "qty": -500,
    "amount": 50.00,
    "unit_price": 0.10,
    "comment": "Expired batch",
    "location_id": 201
  },
  {
    "id": "10003",
    "type": "receive",
    "customer_id": 10352,
    "item_id": 45201,
    "item_name": "Fresh Salmon Fillet",
    "date": "2026-01-20T10:45:00",
    "qty": 25,
    "amount": 3137.50,
    "unit_price": 125.50,
    "location_id": 201
  }
]

Technical documentation for partners and integrators