# Returns the inventory transactions that match the given filters.

`POST /inventory/inventory-transactions/search`

Group: Inventory › Inventory Transactions · Operation ID: `searchInventoryTransactions`

Every filter you send must match and the filters combine. Send an empty filters object to return every inventory transaction. Use fromDate and toDate for a transactionDate window, inclusive on both sides, on its own or with itemId or locationId.

[Open in the interactive reference](https://docs.api.lensing.ai/?op=searchInventoryTransactions)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | `"v1"` | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |

## Request body

Required, `application/json`: searchInventoryTransactionsInput.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filters` | object | yes | The filters to apply. An inventory transaction must match every filter you send. Send an empty object to return all inventory transactions. |
| `filters.itemId` | string | no | Limits results to movements of this item. An identifier that is not an item's matches no transaction. |
| `filters.locationId` | string | no | Limits results to movements at this location. |
| `filters.fromDate` | string (date) | no | Limits results to movements on or after this date. Format YYYY-MM-DD. |
| `filters.toDate` | string (date) | no | Limits results to movements on or before this date. Format YYYY-MM-DD. |
| `filters.sourceDocumentLineType` | string, one of `"IMInventorySalesOrderLine"`, `"IMInventorySalesDeliveryLine"`, `"IMSalesOrderLine"`, `"IMInventoryPurchaseReturnLine"`, `"IMInventorySalesReturnLine"`, `"IMWarehouseTransferLine"`, `"IMInventoryDecreaseLine"`, `"IMInventoryIncreaseLine"`, `"IMInventoryRevaluationLine"`, `"IMInventoryTransferLine"`, `"IMInventoryAdjustmentLine"`, `"IMInventoryCountLine"`, `"IMInventoryPutAwayTask"`, `"IMInventoryPurchaseReturnReversal"`, `"PurchaseOrderLine"`, `"IMLandedCostAllocationLine"`, `"SalesOrderProductItem"`, `"IMWarehouseTransferOrderLine"`, `"VendorBillItemBase"`, `"InvPurchaseDeliveryLine"` | no | Limits results to movements caused by this kind of document line. |
| `filters.isReturn` | boolean | no | Limits results to returns when true, and to all other movements when false. |
| `filters.modifiedSince` | string (date-time) | no | Limits results to rows changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `page` | object | no | The pagination controls. Omit for the first page. |
| `page.cursor` | string | no | The cursor from the previous response's pagination.nextCursor. Omit for the first page. |
| `page.size` | number | no | The number of inventory transactions per page. Defaults to 50. A value above 200 is treated as 200, not rejected. |

Example:

```json
{
  "filters": {
    "itemId": "5f21c8b0-9d34-4a76-8e12-04b93c7de5a8",
    "fromDate": "2026-08-01",
    "toDate": "2026-08-31"
  },
  "page": {
    "size": 50
  }
}
```

## Response

`200` Success

Under `data` (searchInventoryTransactionsOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array of object | yes | The inventory transactions on this page, oldest first. An empty array when nothing matches. |
| `items[].id` | string | yes | The unique identifier for the ledger row. |
| `items[].itemId` | string | yes | The unique identifier for the item that moved. See id on GET inventory/items/:id. |
| `items[].itemCode` | string | no | The code of that item. |
| `items[].itemName` | string | no | The display name of that item. |
| `items[].locationId` | string | yes | The unique identifier for the location the movement happened at. See id on GET inventory/warehouses/:id. |
| `items[].locationCode` | string | no | The code of that location. |
| `items[].locationName` | string | no | The display name of that location. |
| `items[].unitId` | string | no | The unique identifier for the unit the movement was recorded in. See id on GET inventory/unit-of-measures/:id. |
| `items[].unitCode` | string | no | The code of that unit, for example 'BOX'. |
| `items[].unitName` | string | no | The display name of that unit. |
| `items[].transactionDate` | string (date) | yes | The date the movement was posted. Format YYYY-MM-DD. |
| `items[].inQuantity` | string (decimal) | yes | The quantity that moved into stock, in the item's stocking unit. Zero on an outbound movement. |
| `items[].outQuantity` | string (decimal) | no | The quantity that moved out of stock, in the item's stocking unit. Zero on an inbound movement. |
| `items[].unitInQuantity` | string (decimal) | no | The same inbound movement in the unit the document used, which unitId names. It differs from inQuantity when the document used a unit other than the item's stocking unit. |
| `items[].unitOutQuantity` | string (decimal) | no | The same outbound movement in the unit the document used, which unitId names. |
| `items[].unitCost` | string (decimal) | no | The unit cost at the time of the movement, in the currency named by currency. |
| `items[].totalCost` | string (decimal) | no | The total cost of the movement, in the currency named by currency. |
| `items[].salesAmount` | string (decimal) | no | The sales amount of the movement, where it has one, in the currency named by currency. |
| `items[].currency` | string | no | The currency that unitCost, totalCost and salesAmount are stated in. Format ISO 4217, for example 'USD'. |
| `items[].sourceDocumentLineType` | string, one of `"IMInventorySalesOrderLine"`, `"IMInventorySalesDeliveryLine"`, `"IMSalesOrderLine"`, `"IMInventoryPurchaseReturnLine"`, `"IMInventorySalesReturnLine"`, `"IMWarehouseTransferLine"`, `"IMInventoryDecreaseLine"`, `"IMInventoryIncreaseLine"`, `"IMInventoryRevaluationLine"`, `"IMInventoryTransferLine"`, `"IMInventoryAdjustmentLine"`, `"IMInventoryCountLine"`, `"IMInventoryPutAwayTask"`, `"IMInventoryPurchaseReturnReversal"`, `"PurchaseOrderLine"`, `"IMLandedCostAllocationLine"`, `"SalesOrderProductItem"`, `"IMWarehouseTransferOrderLine"`, `"VendorBillItemBase"`, `"InvPurchaseDeliveryLine"` | no | The kind of document line that produced this movement. |
| `items[].isReturn` | boolean | no | Whether the movement is a return. |
| `items[].isPriceDiff` | boolean | no | Whether the movement is a price-difference adjustment rather than a physical movement of goods. |
| `items[].lastModifiedDate` | string (date-time) | no | The date and time the ledger row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `pagination` | object | yes | The pagination cursor for this page. |
| `pagination.nextCursor` | string | no | The cursor for the next page. Pass it as page.cursor. Absent on the last page. |
| `pagination.hasMore` | boolean | yes | True when more inventory transactions remain beyond this page. |

## Statuses

- `400` — Invalid request or business failure
- `401` — Missing or invalid access token
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests
- `500` — Internal server error
