> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# inventoryLotsSearch

> Search lots by lot number, product SKU or title and filter by expiration, stock, creation date and warehouse. The index can trail writes by a few seconds. Use inventoryLots for a current list.

**Required scopes:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**Store must have one of:** `IMS`, `WMS`

## Arguments

**after** `String`

Forward pagination cursor — returns inventory lots after it.

**before** `String`

Backward pagination cursor — returns inventory lots before it.

**filter** `[InventoryLotFilter](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

Which inventory lots to include.

**fields**

**and** `[\[InventoryLotFilter!\]](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

Every one of these filters matches.

**createdAt** `[DateTimeFilter](/docs/api-reference/v3/reference/common/date-time-filter)`

When the lot was created.

**fields**

**gt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

After this instant.

**gte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or after this instant.

**lt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Before this instant.

**lte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or before this instant.

**expirationDate** `[DateTimeFilter](/docs/api-reference/v3/reference/common/date-time-filter)`

When the lot expires, compared at midnight UTC. A lot with no expiration date never matches.

**fields**

**gt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

After this instant.

**gte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or after this instant.

**lt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Before this instant.

**lte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or before this instant.

**expirationDateIsSet** `Boolean`

Whether the lot has an expiration date.

**location** `[IdFilter](/docs/api-reference/v3/reference/common/id-filter)`

The warehouse location assigned to the lot, by location ID.

**fields**

**anyOf** `[ID!]`

One of these ids (at most 100).

**noneOf** `[ID!]`

None of these ids (at most 100).

**lotNumber** `[StringListFilter](/docs/api-reference/v3/reference/common/string-list-filter)`

The lot number.

**fields**

**allOf** `[String!]`

Contains every one of these values (at most 100).

**anyOf** `[String!]`

Contains at least one of these values (at most 100).

**noneOf** `[String!]`

Contains none of these values (at most 100).

**lotNumberContains** `String`

A substring of the lot number, ignoring case. Use not to exclude matches.

**lotNumberIsSet** `Boolean`

Whether the lot has a lot number.

**not** `[InventoryLotFilter](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

This filter does not match.

**onHand** `[FloatFilter](/docs/api-reference/v3/reference/common/float-filter)`

Units in stocked bins, excluding damaged and bookkeeping bins.

**fields**

**gt** `Float`

Greater than this value.

**gte** `Float`

At least this value.

**lt** `Float`

Less than this value.

**lte** `Float`

At most this value.

**or** `[\[InventoryLotFilter!\]](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

At least one of these filters matches.

**productSku** `[StringListFilter](/docs/api-reference/v3/reference/common/string-list-filter)`

The SKU of the product associated with the lot.

**fields**

**allOf** `[String!]`

Contains every one of these values (at most 100).

**anyOf** `[String!]`

Contains at least one of these values (at most 100).

**noneOf** `[String!]`

Contains none of these values (at most 100).

**productTitle** `[StringListFilter](/docs/api-reference/v3/reference/common/string-list-filter)`

The title of the product associated with the lot.

**fields**

**allOf** `[String!]`

Contains every one of these values (at most 100).

**anyOf** `[String!]`

Contains at least one of these values (at most 100).

**noneOf** `[String!]`

Contains none of these values (at most 100).

**first** `Int`

Forward pagination: returns the first N inventory lots (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N inventory lots (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**productId** `ID`

Show lots of this product, including its merged products.

**reverse** `Boolean`

Reverses the chosen sort order.

**sort** `[InventoryLotSearchSortKey](/docs/api-reference/v3/reference/inventory/inventory-lot-search-sort-key)`

Defaults to relevance with text or product title without text.

**text** `String`

Text to search for in lot numbers, product SKUs, or product titles, at most 200 characters.

## Returns

**inventoryLotsSearch** `[InventoryLotConnection!](/docs/api-reference/v3/pagination)` *required*

A paginated list of InventoryLot items.

**fields**

**edges** `[\[InventoryLotEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[InventoryLot!](/docs/api-reference/v3/reference/inventory/inventory-lot)` *required*

The item at this edge.

**fields**

**bins** `[BinInventoryLevelConnection!](/docs/api-reference/v3/pagination)` *required*

Stocked bins and their quantities for this lot, excluding damaged and bookkeeping bins.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the lot was created.

**daysUntilExpiration** `Int`

Calendar days from the current UTC date to expiration. Negative after expiration, or null when the lot has no expiration date.

**expirationDate** `[Date](/docs/api-reference/v3/reference/common/date)`

The expiration date, or null when none is recorded.

**id** `ID!` *required*

The ID of this inventory lot.

**inventoryItemId** `ID!` *required*

The underlying inventory item ID to use when counting or transferring stock for this lot.

**isExpired** `Boolean!` *required*

Whether the lot is expired for picking, including the calling team's configured expiration buffer. Lots without an expiration date return false.

**location** `[Location](/docs/api-reference/v3/reference/inventory/location)`

The warehouse associated with this lot.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**lotNumber** `String`

The batch number assigned to this lot, when recorded.

**onHand** `Int!` *required*

Total units in the lot's stocked bins, excluding damaged and bookkeeping bins.

**product** `[InventoryProduct](/docs/api-reference/v3/reference/inventory/inventory-product)`

The product associated with this lot. Null if the product has been deleted.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**shipmentCount** `Int!` *required*

The number of fulfillment groups assigned to this lot, excluding canceled and voided fulfillments.

**Requires:** [`shipping_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-shipping_read)

**shipments** `[InventoryLotShipmentConnection!](/docs/api-reference/v3/pagination)` *required*

Fulfillment groups assigned to this lot, newest first. Excludes canceled and voided fulfillments. Requires the shipping read scope.

**Requires:** [`shipping_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-shipping_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**nodes** `[\[InventoryLot!\]!](/docs/api-reference/v3/reference/inventory/inventory-lot)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**bins** `[BinInventoryLevelConnection!](/docs/api-reference/v3/pagination)` *required*

Stocked bins and their quantities for this lot, excluding damaged and bookkeeping bins.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[BinInventoryLevelEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[BinInventoryLevel!\]!](/docs/api-reference/v3/reference/inventory/bin-inventory-level)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the lot was created.

**daysUntilExpiration** `Int`

Calendar days from the current UTC date to expiration. Negative after expiration, or null when the lot has no expiration date.

**expirationDate** `[Date](/docs/api-reference/v3/reference/common/date)`

The expiration date, or null when none is recorded.

**id** `ID!` *required*

The ID of this inventory lot.

**inventoryItemId** `ID!` *required*

The underlying inventory item ID to use when counting or transferring stock for this lot.

**isExpired** `Boolean!` *required*

Whether the lot is expired for picking, including the calling team's configured expiration buffer. Lots without an expiration date return false.

**location** `[Location](/docs/api-reference/v3/reference/inventory/location)`

The warehouse associated with this lot.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**fields**

**city** `String`

The city of the location's address.

**company** `String`

The company name associated with the location.

**countryCode** `String`

The country code, e.g. "US".

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was created.

**id** `ID!` *required*

The id of this location.

**inventoryItems** `[InventoryItemConnection!](/docs/api-reference/v3/pagination)` *required*

Traceable inventory units at this warehouse.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**inventoryLevels** `[LocationInventoryLevelConnection!](/docs/api-reference/v3/pagination)` *required*

Per-product inventory levels held at this location.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**name** `String!` *required*

The location's display name.

**phone** `String`

The contact phone number for the location.

**postalCode** `String`

The postal or ZIP code, e.g. "84101".

**stateCode** `String`

The state or province code, e.g. "UT".

**storageLocations** `[StorageLocationConnection!](/docs/api-reference/v3/pagination)` *required*

Bins and other storage locations within this warehouse.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**street1** `String`

The first line of the street address.

**street2** `String`

The second line of the street address.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was last updated.

**lotNumber** `String`

The batch number assigned to this lot, when recorded.

**onHand** `Int!` *required*

Total units in the lot's stocked bins, excluding damaged and bookkeeping bins.

**product** `[InventoryProduct](/docs/api-reference/v3/reference/inventory/inventory-product)`

The product associated with this lot. Null if the product has been deleted.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**barcodes** `[String!]!` *required*

Barcodes associated with this product, for scanning.

**customsDescription** `String`

The plain description of the product that customs officers read, for customs.

**dimensions** `[Dimensions](/docs/api-reference/v3/reference/catalog/dimensions)`

The product's length, width, and height in a single shared unit, for box sizing.

**hsCode** `String`

The Harmonized System code used for customs.

**id** `ID!` *required*

The id of this product.

**image** `[ProductImage](/docs/api-reference/v3/reference/catalog/product-image)`

The first (default) image for this product, if any.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**materialDescription** `String`

What the product is made of, for customs.

**originCountry** `String`

The country of origin, as a country code, for customs.

**sku** `String`

The stock keeping unit identifying this product.

**title** `String!` *required*

The product's title.

**upc** `String`

The Universal Product Code for this product.

**weight** `[Weight](/docs/api-reference/v3/reference/catalog/weight)`

The product's weight, for shipping.

**shipmentCount** `Int!` *required*

The number of fulfillment groups assigned to this lot, excluding canceled and voided fulfillments.

**Requires:** [`shipping_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-shipping_read)

**shipments** `[InventoryLotShipmentConnection!](/docs/api-reference/v3/pagination)` *required*

Fulfillment groups assigned to this lot, newest first. Excludes canceled and voided fulfillments. Requires the shipping read scope.

**Requires:** [`shipping_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-shipping_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[InventoryLotShipmentEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[InventoryLotShipment!\]!](/docs/api-reference/v3/reference/inventory/inventory-lot-shipment)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

## Example

```graphql theme={null}
query {
  inventoryLotsSearch(after: "...", before: "...", filter: { ... }, first: 10, last: 10, productId: "...", reverse: true, sort: CREATED_AT, text: "...") {
    nodes {
      createdAt
      daysUntilExpiration
      expirationDate
      id
      inventoryItemId
      isExpired
      lotNumber
      onHand
      # ...
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.