Returns the batch transactions that match the given filters.
POST /inventory/batch-transactions/search
Group: Inventory › Batch Transactions · Operation ID: searchBatchTransactions
Every criterion is exact and criteria combine with AND. Send an empty filters object to return every batch transaction. batchNumber matches the number printed on the label, and itemId, locationId and the date bounds describe the ledger row and are resolved through it.
Open in the interactive reference
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: searchBatchTransactionsInput.
| Field | Type | Required | Description |
|---|---|---|---|
filters |
object | yes | The filters to apply. A batch transaction must match every filter you send. Send an empty object to return all batch transactions. |
filters.batchNumberId |
string | no | Limits results to movements of the batch with this identifier. |
filters.batchNumber |
string | no | Limits results to movements of the batch with this number, for example 'LOT-2026-08-14'. The match is exact. Batch numbers are not unique across items, so this can match several batches. |
filters.itemId |
string | no | Limits results to movements of this item. |
filters.locationId |
string | no | Limits results to movements at this warehouse. |
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.modifiedSince |
string (date-time) | no | Limits results to batch lines 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 batch transactions per page. Defaults to 50. A value above 200 is treated as 200, not rejected. |
Example:
{
"filters": {
"batchNumber": "LOT-2026-08-14"
},
"page": {
"size": 50
}
}
Response
200 Success
Under data (searchBatchTransactionsOutput):
| Field | Type | Required | Description |
|---|---|---|---|
items |
array of object | yes | The batch transactions on this page, oldest first. An empty array when nothing matches. |
items[].id |
string | yes | The unique identifier for the batch transaction line, not the ledger row. The ledger row's identifier is transactionId. |
items[].batchNumberId |
string | yes | The unique identifier for the batch that moved. See id on GET inventory/batch-numbers/:id. |
items[].batchNumber |
string | no | The batch number as printed on the label, for example 'LOT-2026-08-14'. It is not unique across items. |
items[].expirationDate |
string (date) | no | The date the batch expires. Format YYYY-MM-DD. |
items[].transactionId |
string | no | The unique identifier for the ledger row this batch line belongs to. See id on GET inventory/inventory-transactions/:id. |
items[].itemId |
string | no | The unique identifier for the item. See id on GET inventory/items/:id. |
items[].itemCode |
string | no | The code of the item. |
items[].itemName |
string | no | The display name of the item. |
items[].locationId |
string | no | The unique identifier for the warehouse the movement was at. See id on GET inventory/warehouses/:id. |
items[].locationCode |
string | no | The code of that warehouse. |
items[].locationName |
string | no | The display name of that warehouse. |
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[].transactionDate |
string (date) | no | The date the movement was posted. Format YYYY-MM-DD. |
items[].inQuantity |
string (decimal) | no | The quantity of this batch that moved into stock, in the item's stocking unit. |
items[].outQuantity |
string (decimal) | no | The quantity of this batch that moved out of stock, in the item's stocking unit. |
items[].unitInQuantity |
string (decimal) | no | The same inbound movement in the transaction's own unit. |
items[].unitOutQuantity |
string (decimal) | no | The same outbound movement in the transaction's own unit. |
items[].cost |
string (decimal) | no | The unit cost of the batch at this movement, in the currency named by currency. |
items[].valueDelta |
string (decimal) | no | The change in the batch's carried value at this movement, in the currency named by currency. |
items[].currency |
string | no | The currency the cost fields 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 the movement. |
items[].lastModifiedDate |
string (date-time) | no | The date and time the batch line 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 batch transactions remain beyond this page. |
Statuses
400— Invalid request or business failure401— Missing or invalid access token403— Not authorized404— Not found429— Too many requests500— Internal server error