validateCartShippingOptionsStep - Medusa Core Workflows Reference

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

This step validates shipping options to ensure they can be applied on a cart. If not valid, the step throws an error.

Example#

Code
1const data = validateCartShippingOptionsStep({2  // retrieve the details of the cart from another workflow3  // or in another step using the Cart Module's service4  cart,5  option_ids: ["so_123"],6  shippingOptionsContext: {}7})

Input#

ValidateCartShippingOptionsStepInputValidateCartShippingOptionsStepInput
The details of the cart and its shipping options context.
The cart to validate shipping options for.
shippingOptionsContextobject
The context to validate the shipping options.
option_idsstring[]
The IDs of the shipping options to validate.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break