# Batch Transactions

Group: Inventory

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

A batch transaction records a quantity of one batch moving into or out of stock, or a change to the batch's cost.

Documents that change the stock or cost of a batch create batch transactions. 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.

Each batch transaction belongs to an inventory transaction, which has the item, warehouse, date, and type of document line. An inventory transaction can have several batch transactions.

A batch transaction records one of these:

- Stock of the batch coming in or going out.
- An inventory revaluation, which changes the batch's cost without moving stock.
- A change to the cost of units of the batch that were already sold. This kind has no `inQuantity`, `outQuantity`, `cost`, `valueDelta`, or `currency`.

Batch transactions do not include a breakdown by bin.

## Endpoints

- [List batch transactions](https://docs.api.lensing.ai/reference/lensing/v1/endpoints/batchTransactions.html): `GET /inventory/batch-transactions`
- [Search batch transactions](https://docs.api.lensing.ai/reference/lensing/v1/endpoints/searchBatchTransactions.html): `POST /inventory/batch-transactions/search`
- [Retrieve a batch transaction](https://docs.api.lensing.ai/reference/lensing/v1/endpoints/getBatchTransaction.html): `GET /inventory/batch-transactions/{id}`
