updateCartsStep - Medusa Core Workflows Reference
This documentation provides a reference to the updateCartsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step updates a cart.
Example#
Input#
UpdateCartsStepInput
UpdateCartsStepInputThe details of the carts to update.
UpdateCartsStepInput
UpdateCartsStepInputid
stringThe ID of the cart to update.
id
stringpromo_codes
string[]OptionalAn array of promotional codes applied on the cart.
promo_codes
string[]Optionalregion_id
stringOptionalThe ID of the cart's region.
region_id
stringOptionalcustomer_id
null | stringOptionalThe ID of the cart's customer.
customer_id
null | stringOptionalsales_channel_id
null | stringOptionalThe ID of the cart's sales channel.
sales_channel_id
null | stringOptionalemail
null | stringOptionalThe email address of the cart's customer.
email
null | stringOptionalcurrency_code
stringOptionalThe currency code for the cart.
currency_code
stringOptionalmetadata
null | Record<string, unknown>OptionalCustom key-value pairs of data related to the cart.
metadata
null | Record<string, unknown>OptionalThe cart's shipping address. You can either update the cart's existing shipping address, or create a new one.
The cart's billing address. You can either update the cart's existing billing address, or create a new one.
Output#
CartDTO[]
CartDTO[]
CartDTO[]
CartDTO[]id
stringThe ID of the cart.
id
stringcurrency_code
stringThe currency of the cart
currency_code
stringoriginal_item_total
BigNumberValueThe original item total of the cart.
original_item_total
BigNumberValueoriginal_item_subtotal
BigNumberValueThe original item subtotal of the cart.
original_item_subtotal
BigNumberValueoriginal_item_tax_total
BigNumberValueThe original item tax total of the cart.
original_item_tax_total
BigNumberValueitem_total
BigNumberValueThe item total of the cart.
item_total
BigNumberValueitem_subtotal
BigNumberValueThe item subtotal of the cart.
item_subtotal
BigNumberValueitem_tax_total
BigNumberValueThe item tax total of the cart.
item_tax_total
BigNumberValueoriginal_total
BigNumberValueThe original total of the cart.
original_total
BigNumberValueoriginal_subtotal
BigNumberValueThe original subtotal of the cart.
original_subtotal
BigNumberValueoriginal_tax_total
BigNumberValueThe original tax total of the cart.
original_tax_total
BigNumberValuetotal
BigNumberValueThe total of the cart.
total
BigNumberValuesubtotal
BigNumberValueThe subtotal of the cart. (Excluding taxes)
subtotal
BigNumberValuetax_total
BigNumberValueThe tax total of the cart.
tax_total
BigNumberValuediscount_total
BigNumberValueThe discount total of the cart.
discount_total
BigNumberValuediscount_tax_total
BigNumberValueThe discount tax total of the cart.
discount_tax_total
BigNumberValuegift_card_total
BigNumberValueThe gift card total of the cart.
gift_card_total
BigNumberValuegift_card_tax_total
BigNumberValueThe gift card tax total of the cart.
gift_card_tax_total
BigNumberValueshipping_total
BigNumberValueThe shipping total of the cart.
shipping_total
BigNumberValueshipping_subtotal
BigNumberValueThe shipping subtotal of the cart.
shipping_subtotal
BigNumberValueshipping_tax_total
BigNumberValueThe shipping tax total of the cart.
shipping_tax_total
BigNumberValueoriginal_shipping_total
BigNumberValueThe original shipping total of the cart.
original_shipping_total
BigNumberValueoriginal_shipping_subtotal
BigNumberValueThe original shipping subtotal of the cart.
original_shipping_subtotal
BigNumberValueoriginal_shipping_tax_total
BigNumberValueThe original shipping tax total of the cart.
original_shipping_tax_total
BigNumberValueraw_original_item_total
BigNumberRawValueThe raw original item total of the cart.
raw_original_item_total
BigNumberRawValueraw_original_item_subtotal
BigNumberRawValueThe raw original item subtotal of the cart.
raw_original_item_subtotal
BigNumberRawValueraw_original_item_tax_total
BigNumberRawValueThe raw original item tax total of the cart.
raw_original_item_tax_total
BigNumberRawValueraw_item_total
BigNumberRawValueThe raw item total of the cart.
raw_item_total
BigNumberRawValueraw_item_subtotal
BigNumberRawValueThe raw item subtotal of the cart.
raw_item_subtotal
BigNumberRawValueraw_item_tax_total
BigNumberRawValueThe raw item tax total of the cart.
raw_item_tax_total
BigNumberRawValueraw_original_total
BigNumberRawValueThe raw original total of the cart.
raw_original_total
BigNumberRawValueraw_original_subtotal
BigNumberRawValueThe raw original subtotal of the cart.
raw_original_subtotal
BigNumberRawValueraw_original_tax_total
BigNumberRawValueThe raw original tax total of the cart.
raw_original_tax_total
BigNumberRawValueraw_total
BigNumberRawValueThe raw total of the cart.
raw_total
BigNumberRawValueraw_subtotal
BigNumberRawValueThe raw subtotal of the cart. (Excluding taxes)
raw_subtotal
BigNumberRawValueraw_tax_total
BigNumberRawValueThe raw tax total of the cart.
raw_tax_total
BigNumberRawValueraw_discount_total
BigNumberRawValueThe raw discount total of the cart.
raw_discount_total
BigNumberRawValueraw_discount_tax_total
BigNumberRawValueThe raw discount tax total of the cart.
raw_discount_tax_total
BigNumberRawValueraw_gift_card_total
BigNumberRawValueThe raw gift card total of the cart.
raw_gift_card_total
BigNumberRawValueraw_gift_card_tax_total
BigNumberRawValueThe raw gift card tax total of the cart.
raw_gift_card_tax_total
BigNumberRawValueraw_shipping_total
BigNumberRawValueThe raw shipping total of the cart.
raw_shipping_total
BigNumberRawValueraw_shipping_subtotal
BigNumberRawValueThe raw shipping subtotal of the cart.
raw_shipping_subtotal
BigNumberRawValueraw_shipping_tax_total
BigNumberRawValueThe raw shipping tax total of the cart.
raw_shipping_tax_total
BigNumberRawValueraw_original_shipping_total
BigNumberRawValueThe raw original shipping total of the cart.
raw_original_shipping_total
BigNumberRawValueraw_original_shipping_subtotal
BigNumberRawValueThe raw original shipping subtotal of the cart.
raw_original_shipping_subtotal
BigNumberRawValueraw_original_shipping_tax_total
BigNumberRawValueThe raw original shipping tax total of the cart.
raw_original_shipping_tax_total
BigNumberRawValueraw_credit_line_total
BigNumberRawValueThe raw credit lines total of the cart.
raw_credit_line_total
BigNumberRawValuecredit_line_total
BigNumberValueThe credit lines total of the cart.
credit_line_total
BigNumberValueregion_id
stringOptionalThe ID of the region the cart belongs to.
region_id
stringOptionalcustomer_id
stringOptionalThe ID of the associated customer
customer_id
stringOptionalsales_channel_id
stringOptionalThe ID of the sales channel the cart belongs to.
sales_channel_id
stringOptionalemail
stringOptionalThe email of the customer that owns the cart.
email
stringOptionalThe associated shipping address.
The associated billing address.
The associated line items.
The credit lines for a cart
The associated shipping methods
metadata
null | Record<string, unknown>OptionalHolds custom data in key-value pairs.
metadata
null | Record<string, unknown>Optionalcompleted_at
string | DateOptionalWhen the cart was completed.
completed_at
string | DateOptionalcreated_at
string | DateOptionalWhen the cart was created.
created_at
string | DateOptionalupdated_at
string | DateOptionalWhen the cart was updated.
updated_at
string | DateOptionalWas this page helpful?