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

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

# retrieveReservationItem - Inventory Module Reference

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

This method is used to retrieve a reservation item by its ID.

## Example

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

async function retrieveReservationItem (id: string) {
  const inventoryModule = await initializeInventoryModule({})

  const reservationItem = await inventoryModule.retrieveReservationItem(id)

  // do something with the reservation item or return it
}
```

## Parameters

<ParameterTypes parameters={[
  {
    "name": "reservationId",
    "type": "`string`",
    "description": "The ID of the reservation item.",
    "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;[ReservationItemDTO](../../inventory/types/inventory.ReservationItemDTO.mdx)&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The retrieved reservation item.",
    "expandable": false,
    "children": [
      {
        "name": "created_at",
        "type": "`string` \\| `Date`",
        "description": "The date with timezone at which the resource was created.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "created_by",
        "type": "`string` \\| `null`",
        "description": "UserId of user who created the reservation item",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "deleted_at",
        "type": "`string` \\| `Date` \\| `null`",
        "description": "The date with timezone at which the resource was deleted.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "description",
        "type": "`string` \\| `null`",
        "description": "Description of the reservation item",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "The id of the reservation item",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "inventory_item_id",
        "type": "`string`",
        "description": "The id of the inventory item the reservation relates to",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "line_item_id",
        "type": "`string` \\| `null`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "location_id",
        "type": "`string`",
        "description": "The id of the location of the reservation",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "metadata",
        "type": "`Record<string, unknown>` \\| `null`",
        "description": "An optional key-value map with additional details",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "quantity",
        "type": "`number`",
        "description": "The id of the reservation item",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "updated_at",
        "type": "`string` \\| `Date`",
        "description": "The date with timezone at which the resource was updated.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  }
]} />
