31 July 2025
Composable Commerce
HTTP API
Enhancement
CartsProduct catalogGraphQL

You can now set the minimum and maximum quantities allowed for a Line Item in a Cart. This is useful in cases where a customer can only order a minimum amount of an item, or when you want to ensure the availability of an item that has limited stock. In addition, this feature can help prevent denial of inventory scenarios by limiting the maximum quantity that can be added to a Cart.

Limits are defined on InventoryEntryDraft, or for existing inventory entries, using the Set Inventory Limits update action. For more information, see Quantity limits on the Carts and Orders overview page.

Changes:

  • [GraphQL API] Changed the InventoryEntry type:
    • Added the minCartQuantity field to the InventoryEntry type.
    • Added the maxCartQuantity field to the InventoryEntry type.
  • [GraphQL API] Changed the InventoryEntryDraft type:
    • Added the minCartQuantity field to the InventoryEntryDraft type.
    • Added the maxCartQuantity field to the InventoryEntryDraft type.
  • [GraphQL API] Changed the InventoryEntryUpdateAction type:
    • Input field setInventoryLimits was added to the InventoryEntryUpdateAction type.
  • [GraphQL API] Added the following type to the GraphQL schema: SetInventoryLimits.

The following changes were introduced in terms of GraphQL SDL:

extend type InventoryEntry {
  maxCartQuantity: Long
  minCartQuantity: Long
}

extend input InventoryEntryDraft {
  maxCartQuantity: Long
  minCartQuantity: Long
}

extend input InventoryEntryUpdateAction {
  setInventoryLimits: SetInventoryLimits
}

input SetInventoryLimits {
  minCartQuantity: Int
  maxCartQuantity: Int
}