create - Stock Location Module Reference
This documentation provides a reference to the create method. This belongs to the Stock Location Module.
This method is used to create a stock location.
Example
import {
initialize as initializeStockLocationModule,
} from "@medusajs/stock-location"
async function createStockLocation (name: string) {
const stockLocationModule = await initializeStockLocationModule({})
const stockLocation = await stockLocationModule.create({
name
})
// do something with the stock location or return it
}
Parameters
The details of the stock location to create.
contextSharedContextA context used to share resources, such as transaction manager, between the application and the module.
contextSharedContextReturns
The created stock location's details.
Was this section helpful?