Skip to main content
Skip to main content

createInventoryItem - Inventory Module Reference

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

This method is used to create an inventory item.


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

async function createInventoryItem (item: {
sku: string,
requires_shipping: boolean
}) {
const inventoryModule = await initializeInventoryModule({})

const inventoryItem = await inventoryModule.createInventoryItem(

// do something with the inventory item or return it


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


The created inventory item's details.
Was this section helpful?