---
displayed_sidebar: inventoryReference
slug: /references/inventory/restoreInventoryItem
sidebar_label: restoreInventoryItem
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# restoreInventoryItem - Inventory Module Reference

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

This method is used to restore an inventory item or multiple inventory items that were previously deleted using the [deleteInventoryItem](inventory.IInventoryService.deleteInventoryItem.mdx) method.

## Example

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

async function restoreInventoryItem (
  inventoryItems: string[]
) {
  const inventoryModule = await initializeInventoryModule({})

  await inventoryModule.restoreInventoryItem(
    inventoryItems
  )
}
```

## Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string` \\| `string`[]",
    "description": "The ID(s) of the inventory item(s) to restore.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "context",
    "type": "[SharedContext](../../inventory/interfaces/inventory.SharedContext.mdx)",
    "description": "A context used to share resources, such as transaction manager, between the application and the module.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "manager",
        "type": "`EntityManager`",
        "description": "An instance of an entity manager.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "transactionManager",
        "type": "`EntityManager`",
        "description": "An instance of a transaction manager.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  }
]} />

## Returns

<ParameterTypes parameters={[
  {
    "name": "Promise",
    "type": "Promise&#60;void&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves when the inventory item(s) are successfully restored.",
    "expandable": false,
    "children": []
  }
]} />
