> ## 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.

# inventoryLotUpdate

> Set a new lot number, expiration date, or both. Omitted values keep their current settings. Returns CONFLICT when another lot for the product already uses the new number, or null if the lot is missing or inaccessible.

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

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

## Arguments

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

The new expiration date, on or after January 1, 2000 and distinct from reserved placeholder dates.

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

The lot to update.

**lotNumber** `String`

The new lot number, from 1 to 255 characters.

## Returns

**inventoryLotUpdate** `[InventoryLot](/docs/api-reference/v3/reference/inventory/inventory-lot)`

A tracked batch of inventory, including lots with no stock.

**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`).

**fields**

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

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

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

The item at this edge.

**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`.

**fields**

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

When the record was created.

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

The id of this bin-level inventory record.

**inventoryItem** `[InventoryItem](/docs/api-reference/v3/reference/inventory/inventory-item)`

The specific inventory item this level tracks, when item-scoped.

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

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

The product this quantity belongs to, when the level is product-scoped.

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

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

When this bin-level quantity was last cycle-counted.

**ledgerEntries** `[InventoryLevelLedgerEntryConnection!](/docs/api-reference/v3/pagination)` *required*

Append-only quantity change history for this bin-level inventory record. Load via `storageLocationInventoryLevel(id) { ledgerEntries(...) }` or `StorageLocation.binInventoryLevels { ledgerEntries(...) }`.

**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.

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

Only return entries recorded at or after this instant.

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

Only return entries recorded before this instant.

**first** `Int`

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

**kind** `[\[InventoryLevelAdjustmentKind!\]](/docs/api-reference/v3/reference/inventory/inventory-level-adjustment-kind)`

Only return entries with one of these adjustment kinds.

**last** `Int`

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

**orderBy** `[InventoryLevelLedgerEntrySortKey](/docs/api-reference/v3/reference/inventory/inventory-level-ledger-entry-sort-key)`

Which key to sort by (defaults to the first key, newest-first). Combine with `reverse` to flip direction.

**reverse** `Boolean`

Reverses the sort direction selected by `orderBy` (or its default).

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

The warehouse this quantity is held at.

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

**maxQuantity** `Int`

Maximum quantity allowed in the bin, when capped.

**quantity** `Int!` *required*

Quantity on hand in the storage location.

**storageLocation** `[StorageLocation!](/docs/api-reference/v3/reference/inventory/storage-location)` *required*

The bin or slot holding this quantity.

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

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

When the record was last updated.

**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.

**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`.

**Fields**

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

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

**nodes** `[\[InventoryItem!\]!](/docs/api-reference/v3/reference/inventory/inventory-item)` *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.

**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`.

**Fields**

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

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

**nodes** `[\[LocationInventoryLevel!\]!](/docs/api-reference/v3/reference/inventory/location-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.

**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`.

**Fields**

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

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

**nodes** `[\[StorageLocation!\]!](/docs/api-reference/v3/reference/inventory/storage-location)` *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.

**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.

**fields**

**height** `Float`

The height, in `unit`.

**length** `Float`

The length, in `unit`.

**unit** `[DimensionUnit!](/docs/api-reference/v3/reference/catalog/dimension-unit)` *required*

The unit all three measurements are expressed in.

**width** `Float`

The width, in `unit`.

**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)

**fields**

**altText** `String!` *required*

Alternative text describing the image.

**default** `Boolean!` *required*

Whether this is the default image.

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

The id of this image.

**position** `Int!` *required*

The image's ordering position.

**url** `String!` *required*

The public URL of the image.

**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.

**fields**

**unit** `[WeightUnit!](/docs/api-reference/v3/reference/catalog/weight-unit)` *required*

The unit the value is expressed in.

**value** `Float!` *required*

The numeric magnitude of the weight.

**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`).

**fields**

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

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

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

The item at this edge.

**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`.

**fields**

**canMove** `Boolean!` *required*

Whether the lot assignment can be moved without changing tracked bin counts.

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

When the most recent units from this lot were fulfilled.

**fulfillmentGroup** `[FulfillmentGroup](/docs/api-reference/v3/reference/shipping/fulfillment-group)`

The fulfillment group, with its orders and shipping details.

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

**orderName** `String`

The order name shown in warehouse shipment history.

**quantity** `Int!` *required*

The total units from this lot assigned to the fulfillment group.

**trackingNumber** `String`

The tracking number recorded for this fulfillment group.

**warehouseName** `String!` *required*

The warehouse from which these units were fulfilled.

**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.

## Errors

Besides the [errors any request can return](https://developers.redo.com/docs/api-reference/v3/errors.md), this operation fails with these codes in `extensions.code`.

| Code | HTTP status | Meaning | Retry |
| - | - | - | - |
| `BAD_USER_INPUT` | `400` | An argument is invalid, or names something the store doesn't have. The message says which. Nothing was written. | Fix the input the message names, then send it again. |
| `CONFLICT` | `409` | The change clashes with another record, such as a name already in use. Nothing was written. | Change the clashing value, then send it again. |

## Example

```graphql theme={null}
mutation {
  inventoryLotUpdate(expirationDate: "...", id: "...", lotNumber: "...") {
    bins {
      nodes {
        createdAt
        id
        lastCountedAt
        maxQuantity
        quantity
        updatedAt
      }
      pageInfo { hasNextPage endCursor }
    }
    createdAt
    daysUntilExpiration
    expirationDate
    id
    inventoryItemId
    isExpired
    lotNumber
    # ...
  }
}
```


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