# Inventory Transactions

Group: Inventory

[Open in the interactive reference](https://docs.api.lensing.ai/lensing/v1/groups/inventoryInventoryTransactions)

An inventory transaction records stock of one item coming into or going out of a warehouse. It can also record a change in the value of that stock without any stock moving, such as an inventory revaluation or a landed cost.

Documents create inventory transactions when they move stock or change the value of stock. These documents include receipts, shipments, sales returns, purchase returns, warehouse transfers, inventory increases, inventory decreases, and inventory revaluations. To record a stock movement, create and commit the document that moves the stock.

To undo a stock movement, cancel the document that recorded it. Canceling does not delete the document's inventory transactions. Instead, the cancellation creates a new inventory transaction for each one, moving the same quantity in the opposite direction, with `inQuantity` and `outQuantity` swapped. The new inventory transactions are dated with the cancellation date, so the original ones keep their dates.

Each batch transaction and serial transaction belongs to one inventory transaction, and its `transactionId` is the `id` of that inventory transaction. One inventory transaction can have several batch transactions or serial transactions.

To see how much of an item is in stock now, use GET inventory/inventory-levels.

## Endpoints

- [List inventory transactions](https://docs.api.lensing.ai/reference/lensing/v1/endpoints/inventoryTransactions.html): `GET /inventory/inventory-transactions`
- [Search inventory transactions](https://docs.api.lensing.ai/reference/lensing/v1/endpoints/searchInventoryTransactions.html): `POST /inventory/inventory-transactions/search`
- [Retrieve an inventory transaction](https://docs.api.lensing.ai/reference/lensing/v1/endpoints/getInventoryTransaction.html): `GET /inventory/inventory-transactions/{id}`
