Loading...
Was this page helpful?
This documentation provides a reference to the createShippingOptionsWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates one or more shipping options. It's used by the Create Shipping Option Admin API Route.
You can use this workflow within your own customizations or custom workflows, allowing you to create shipping options within your custom flows.
Source CodeTo calculate a shipping option with flat rate prices:
To calculate shipping option with calculated prices, set price_type
to calculated
and don't pass a prices
array:
Workflow hook
Step conditioned by when
View step details
CreateShippingOptionsWorkflowInput
CreateShippingOptionsWorkflowInputCreateShippingOptionsWorkflowInput
CreateShippingOptionsWorkflowInput[]CreateShippingOptionsWorkflowOutput
CreateShippingOptionsWorkflowOutputid
stringname
stringprice_type
ShippingOptionPriceTypeservice_zone_id
stringshipping_profile_id
stringprovider_id
stringshipping_option_type_id
null | stringdata
null | Record<string, unknown>metadata
null | Record<string, unknown>service_zone
ServiceZoneDTOshipping_profile
ShippingProfileDTOfulfillment_provider
FulfillmentProviderDTOrules
ShippingOptionRuleDTO[]fulfillments
FulfillmentDTO[]created_at
Dateupdated_at
Datedeleted_at
null | Date