validateShippingOptionPricesStep - Medusa Core Workflows Reference

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

This step validates that shipping options can be created based on provided price configuration.

For flat rate prices, it validates that regions exist for the shipping option prices. For calculated prices, it validates with the fulfillment provider if the price can be calculated.

If not valid, the step throws an error.

Example#

Code
1const data = validateShippingOptionPricesStep([2  {3    name: "Standard Shipping",4    service_zone_id: "serzo_123",5    shipping_profile_id: "sp_123",6    provider_id: "prov_123",7    type: {8      label: "Standard",9      description: "Standard shipping",10      code: "standard"11    },12    price_type: "calculated",13  }14])

Input#

ValidateShippingOptionPricesStepInputValidateShippingOptionPricesStepInput
The data to validate shipping option prices.
The data to validate shipping option prices.
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