- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createStoresWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createStoresWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates one or more stores. By default, Medusa uses a single store. This is useful if you're building a multi-tenant application or a marketplace where each tenant has its own store.
You can use this workflow within your customizations or your own custom workflows, allowing you to create stores within your custom flows.
Source CodeExamples#
Steps#
Input#
CreateStoresWorkflowInput
CreateStoresWorkflowInputThe data to create stores.
CreateStoresWorkflowInput
CreateStoresWorkflowInputstores
CreateStoreWorkflowInput[]The stores to create.
stores
CreateStoreWorkflowInput[]Output#
CreateStoresWorkflowOutput
CreateStoresWorkflowOutputThe created stores.
CreateStoresWorkflowOutput
CreateStoresWorkflowOutputid
stringThe ID of the store.
id
stringname
stringThe name of the store.
name
stringmetadata
null | Record<string, any>Holds custom data in key-value pairs.
metadata
null | Record<string, any>created_at
stringThe created at of the store.
created_at
stringupdated_at
stringThe updated at of the store.
updated_at
stringThe supported currency codes of the store.
default_sales_channel_id
stringOptionalThe associated default sales channel's ID.
default_sales_channel_id
stringOptionaldefault_region_id
stringOptionalThe associated default region's ID.
default_region_id
stringOptionaldefault_location_id
stringOptionalThe associated default location's ID.
default_location_id
stringOptionalWas this page helpful?