Skip to main content
Skip to main content

createInventoryItems - Inventory Module Reference

This documentation provides a reference to the createInventoryItems method. This belongs to the Inventory Module.

This method is used to create inventory items.


import {
initialize as initializeInventoryModule,
} from "@medusajs/inventory"

async function createInventoryItems (items: {
sku: string,
requires_shipping: boolean
}[]) {
const inventoryModule = await initializeInventoryModule({})

const inventoryItems = await inventoryModule.createInventoryItems(

// do something with the inventory items or return them


The details of the inventory items to create.
A context used to share resources, such as transaction manager, between the application and the module.


The created inventory items' details.
Was this section helpful?