updateLineItemsStep - Medusa Core Workflows Reference

This documentation provides a reference to the updateLineItemsStep. It belongs to the @medusajs/medusa/core-flows package.

This step updates a cart's line items.

Example#

Code
1const data = updateLineItemsStep({2  id: "cart_123",3  items: [4    {5      selector: {6        id: "line_item_123"7      },8      data: {9        quantity: 210      }11    }12  ]13})

Input#

UpdateLineItemsStepInputUpdateLineItemsStepInput
The details of the line items to update.
idstring
The ID of the cart that the line items belong to.
The line items to update.

Output#

CartLineItemDTO[]CartLineItemDTO[]
CartLineItemDTOCartLineItemDTO
The cart line item details.
Was this page helpful?