---
displayed_sidebar: jsClientSidebar
slug: /references/js-client/AdminInventoryItemsResource
---

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

# AdminInventoryItemsResource

This class is used to send requests to [Admin Inventory Item API Routes](https://docs.medusajs.com/api/admin#inventory-items). To use these API Routes, make sure to install the
[@medusajs/inventory](https://docs.medusajs.com/modules/multiwarehouse/install-modules#inventory-module) module in your Medusa backend. All its method
are available in the JS Client under the `medusa.admin.inventoryItems` property.

All methods in this class require [user authentication](js_client.AdminAuthResource.mdx#createsession).

Inventory items, provided by the [Inventory Module](https://docs.medusajs.com/modules/multiwarehouse/inventory-module), can be used to manage the inventory of saleable items in your store.

Related Guide: [How to manage inventory items](https://docs.medusajs.com/modules/multiwarehouse/admin/manage-inventory-items).

## Methods

### create

Create an Inventory Item for a product variant.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.create({
  variant_id: "variant_123",
})
.then(({ inventory_item }) => {
  console.log(inventory_item.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "payload",
    "type": "[AdminPostInventoryItemsReq](../../medusa/classes/medusa.AdminPostInventoryItemsReq.mdx)",
    "description": "The inventory item to create.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "description",
        "type": "`string`",
        "description": "The inventory item's description.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "height",
        "type": "`number`",
        "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "hs_code",
        "type": "`string`",
        "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "length",
        "type": "`number`",
        "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "material",
        "type": "`string`",
        "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "metadata",
        "type": "`Record<string, unknown>`",
        "description": "An optional set of key-value pairs with additional information.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "mid_code",
        "type": "`string`",
        "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "origin_country",
        "type": "`string`",
        "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "sku",
        "type": "`string`",
        "description": "The unique SKU of the associated Product Variant.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "thumbnail",
        "type": "`string`",
        "description": "The inventory item's thumbnail.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "title",
        "type": "`string`",
        "description": "The inventory item's title.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "variant_id",
        "type": "`string`",
        "description": "The ID of the variant to create the inventory item for.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "weight",
        "type": "`number`",
        "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "width",
        "type": "`number`",
        "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "query",
    "type": "[AdminPostInventoryItemsParams](../../medusa/classes/medusa.AdminPostInventoryItemsParams.mdx)",
    "description": "Configurations to apply on the retrieved inventory item.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The inventory item's details.",
    "expandable": false,
    "children": [
      {
        "name": "inventory_item",
        "type": "[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)",
        "description": "Inventory Item details",
        "optional": false,
        "defaultValue": "",
        "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": "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 inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "height",
            "type": "`number` \\| `null`",
            "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "hs_code",
            "type": "`string` \\| `null`",
            "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The inventory item's ID.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "length",
            "type": "`number` \\| `null`",
            "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "material",
            "type": "`string` \\| `null`",
            "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>` \\| `null`",
            "description": "An optional key-value map with additional details",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "mid_code",
            "type": "`string` \\| `null`",
            "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "origin_country",
            "type": "`string` \\| `null`",
            "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "requires_shipping",
            "type": "`boolean`",
            "description": "Whether the item requires shipping.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "sku",
            "type": "`string` \\| `null`",
            "description": "The Stock Keeping Unit (SKU) code of the Inventory Item.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "thumbnail",
            "type": "`string` \\| `null`",
            "description": "Thumbnail for the inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "title",
            "type": "`string` \\| `null`",
            "description": "Title of the inventory item",
            "optional": true,
            "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": []
          },
          {
            "name": "weight",
            "type": "`number` \\| `null`",
            "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "width",
            "type": "`number` \\| `null`",
            "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### createLocationLevel

Create a Location Level for a given Inventory Item.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.createLocationLevel(inventoryItemId, {
  location_id: "sloc_123",
  stocked_quantity: 10,
})
.then(({ inventory_item }) => {
  console.log(inventory_item.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string`",
    "description": "The ID of the inventory item that the location level belongs to.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "payload",
    "type": "[AdminPostInventoryItemsItemLocationLevelsReq](../../medusa/classes/medusa.AdminPostInventoryItemsItemLocationLevelsReq.mdx)",
    "description": "The location level to create.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "incoming_quantity",
        "type": "`number`",
        "description": "the incoming stock quantity of the inventory item at this location",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "location_id",
        "type": "`string`",
        "description": "the ID of the stock location",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "stocked_quantity",
        "type": "`number`",
        "description": "the stock quantity of the inventory item at this location",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "query",
    "type": "[AdminPostInventoryItemsItemLocationLevelsParams](../../medusa/classes/medusa.AdminPostInventoryItemsItemLocationLevelsParams.mdx)",
    "description": "Configurations to apply on the returned inventory item.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "the inventory item's details.",
    "expandable": false,
    "children": [
      {
        "name": "inventory_item",
        "type": "[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)",
        "description": "Inventory Item details",
        "optional": false,
        "defaultValue": "",
        "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": "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 inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "height",
            "type": "`number` \\| `null`",
            "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "hs_code",
            "type": "`string` \\| `null`",
            "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The inventory item's ID.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "length",
            "type": "`number` \\| `null`",
            "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "material",
            "type": "`string` \\| `null`",
            "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>` \\| `null`",
            "description": "An optional key-value map with additional details",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "mid_code",
            "type": "`string` \\| `null`",
            "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "origin_country",
            "type": "`string` \\| `null`",
            "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "requires_shipping",
            "type": "`boolean`",
            "description": "Whether the item requires shipping.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "sku",
            "type": "`string` \\| `null`",
            "description": "The Stock Keeping Unit (SKU) code of the Inventory Item.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "thumbnail",
            "type": "`string` \\| `null`",
            "description": "Thumbnail for the inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "title",
            "type": "`string` \\| `null`",
            "description": "Title of the inventory item",
            "optional": true,
            "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": []
          },
          {
            "name": "weight",
            "type": "`number` \\| `null`",
            "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "width",
            "type": "`number` \\| `null`",
            "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### delete

Delete an Inventory Item. This does not delete the associated product variant.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.delete(inventoryItemId)
.then(({ id, object, deleted }) => {
  console.log(id)
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string`",
    "description": "The ID of the inventory item.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;DeleteResponse&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The deletion operation's details.",
    "expandable": false,
    "children": [
      {
        "name": "deleted",
        "type": "`boolean`",
        "description": "Whether the item was deleted successfully.",
        "optional": false,
        "defaultValue": "true",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "The ID of the deleted item.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "object",
        "type": "`string`",
        "description": "The type of the deleted item.",
        "optional": false,
        "defaultValue": "product-collection",
        "expandable": false,
        "children": []
      }
    ]
  }
]} />

___

### deleteLocationLevel

Delete a location level of an Inventory Item.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.deleteLocationLevel(inventoryItemId, locationId)
.then(({ inventory_item }) => {
  console.log(inventory_item.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string`",
    "description": "The ID of the inventory item.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "locationId",
    "type": "`string`",
    "description": "The ID of the location level to delete.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "query",
    "type": "[AdminGetInventoryItemsParams](../../medusa/classes/medusa.AdminGetInventoryItemsParams.mdx)",
    "description": "Configurations to apply on the returned inventory item.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "height",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `height` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "hs_code",
        "type": "`string` \\| `string`[] \\| [StringComparisonOperator](../../medusa/classes/medusa.StringComparisonOperator.mdx)",
        "description": "String filters to apply to inventory items' `hs_code` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string` \\| `string`[]",
        "description": "IDs to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "length",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `length` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "limit",
        "type": "`number`",
        "description": "Limit the number of items returned in the list.",
        "optional": true,
        "defaultValue": "20",
        "expandable": false,
        "children": []
      },
      {
        "name": "location_id",
        "type": "`string` \\| `string`[]",
        "description": "Location IDs to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "material",
        "type": "`string` \\| `string`[]",
        "description": "Materials to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "mid_code",
        "type": "`string` \\| `string`[]",
        "description": "MID codes to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "offset",
        "type": "`number`",
        "description": "The number of items to skip when retrieving a list.",
        "optional": true,
        "defaultValue": "0",
        "expandable": false,
        "children": []
      },
      {
        "name": "origin_country",
        "type": "`string` \\| `string`[]",
        "description": "Origin countries to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "q",
        "type": "`string`",
        "description": "Search terms to search inventory items' sku, title, and description.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "requires_shipping",
        "type": "`boolean`",
        "description": "Filter inventory items by whether they require shipping.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "sku",
        "type": "`string` \\| `string`[]",
        "description": "SKUs to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "weight",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `weight` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "width",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `width` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "the inventory item's details.",
    "expandable": false,
    "children": [
      {
        "name": "inventory_item",
        "type": "[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)",
        "description": "Inventory Item details",
        "optional": false,
        "defaultValue": "",
        "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": "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 inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "height",
            "type": "`number` \\| `null`",
            "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "hs_code",
            "type": "`string` \\| `null`",
            "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The inventory item's ID.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "length",
            "type": "`number` \\| `null`",
            "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "material",
            "type": "`string` \\| `null`",
            "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>` \\| `null`",
            "description": "An optional key-value map with additional details",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "mid_code",
            "type": "`string` \\| `null`",
            "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "origin_country",
            "type": "`string` \\| `null`",
            "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "requires_shipping",
            "type": "`boolean`",
            "description": "Whether the item requires shipping.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "sku",
            "type": "`string` \\| `null`",
            "description": "The Stock Keeping Unit (SKU) code of the Inventory Item.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "thumbnail",
            "type": "`string` \\| `null`",
            "description": "Thumbnail for the inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "title",
            "type": "`string` \\| `null`",
            "description": "Title of the inventory item",
            "optional": true,
            "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": []
          },
          {
            "name": "weight",
            "type": "`number` \\| `null`",
            "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "width",
            "type": "`number` \\| `null`",
            "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### list

Retrieve a list of inventory items. The inventory items can be filtered by fields such as `q` or `location_id` passed in the `query` parameter.
The inventory items can also be paginated.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.list()
.then(({ inventory_items, count, offset, limit }) => {
  console.log(inventory_items.length);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "query",
    "type": "[AdminGetInventoryItemsParams](../../medusa/classes/medusa.AdminGetInventoryItemsParams.mdx)",
    "description": "Filters and pagination configurations applied on the retrieved inventory items.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "height",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `height` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "hs_code",
        "type": "`string` \\| `string`[] \\| [StringComparisonOperator](../../medusa/classes/medusa.StringComparisonOperator.mdx)",
        "description": "String filters to apply to inventory items' `hs_code` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string` \\| `string`[]",
        "description": "IDs to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "length",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `length` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "limit",
        "type": "`number`",
        "description": "Limit the number of items returned in the list.",
        "optional": true,
        "defaultValue": "20",
        "expandable": false,
        "children": []
      },
      {
        "name": "location_id",
        "type": "`string` \\| `string`[]",
        "description": "Location IDs to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "material",
        "type": "`string` \\| `string`[]",
        "description": "Materials to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "mid_code",
        "type": "`string` \\| `string`[]",
        "description": "MID codes to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "offset",
        "type": "`number`",
        "description": "The number of items to skip when retrieving a list.",
        "optional": true,
        "defaultValue": "0",
        "expandable": false,
        "children": []
      },
      {
        "name": "origin_country",
        "type": "`string` \\| `string`[]",
        "description": "Origin countries to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "q",
        "type": "`string`",
        "description": "Search terms to search inventory items' sku, title, and description.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "requires_shipping",
        "type": "`boolean`",
        "description": "Filter inventory items by whether they require shipping.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "sku",
        "type": "`string` \\| `string`[]",
        "description": "SKUs to filter inventory items by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "weight",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `weight` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "width",
        "type": "`number` \\| [NumericalComparisonOperator](../../medusa/classes/medusa.NumericalComparisonOperator.mdx)",
        "description": "Number filters to apply to inventory items' `width` field.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsListWithVariantsAndLocationLevelsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The list of inventory items with pagination fields.",
    "expandable": false,
    "children": [
      {
        "name": "AdminInventoryItemsListWithVariantsAndLocationLevelsRes",
        "type": "[PaginatedResponse](../../medusa/interfaces/medusa.PaginatedResponse.mdx) & `object`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "count",
            "type": "`number`",
            "description": "The total number of items available.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "limit",
            "type": "`number`",
            "description": "The maximum number of items that can be returned in the list.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "offset",
            "type": "`number`",
            "description": "The number of items skipped before the returned items in the list.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "inventory_items",
            "type": "[DecoratedInventoryItemDTO](../../medusa/types/medusa.DecoratedInventoryItemDTO.mdx)[]",
            "description": "an array of Inventory Item details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### listLocationLevels

Retrieve a list of inventory levels of an inventory item. The inventory levels can be filtered by fields such as `location_id` passed in the `query` parameter.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.listLocationLevels(inventoryItemId)
.then(({ inventory_item }) => {
  console.log(inventory_item.location_levels);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string`",
    "description": "The ID of the inventory item that the location levels belong to.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "query",
    "type": "[AdminGetInventoryItemsItemLocationLevelsParams](../../medusa/classes/medusa.AdminGetInventoryItemsItemLocationLevelsParams.mdx)",
    "description": "Filters to apply on the retrieved location levels.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "location_id",
        "type": "`string`[]",
        "description": "Location IDs to filter location levels.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsLocationLevelsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The inventory item's details and list of location levels.",
    "expandable": false,
    "children": [
      {
        "name": "inventory_item",
        "type": "`object`",
        "description": "An inventory item's ID and associated location levels.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "id",
            "type": "`any`",
            "description": "The id of the location",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "location_levels",
            "type": "[InventoryLevelDTO](../../medusa/types/medusa.InventoryLevelDTO.mdx)[]",
            "description": "List of stock levels at a given location",
            "optional": false,
            "defaultValue": "",
            "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": "deleted_at",
                "type": "`string` \\| `Date` \\| `null`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "incoming_quantity",
                "type": "`number`",
                "description": "the incoming stock quantity of an inventory item at the given location ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "inventory_item_id",
                "type": "`string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "location_id",
                "type": "`string`",
                "description": "the item location ID",
                "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": "reserved_quantity",
                "type": "`number`",
                "description": "the reserved stock quantity of an inventory item at the given location ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "stocked_quantity",
                "type": "`number`",
                "description": "the total stock quantity of an inventory item at the given location ID",
                "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": []
              }
            ]
          }
        ]
      }
    ]
  }
]} />

___

### retrieve

Retrieve an Inventory Item's details.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.retrieve(inventoryItemId)
.then(({ inventory_item }) => {
  console.log(inventory_item.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string`",
    "description": "The ID of the inventory item.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "query",
    "type": "[AdminGetInventoryItemsItemParams](../../medusa/classes/medusa.AdminGetInventoryItemsItemParams.mdx)",
    "description": "Configurations applied on the retrieved inventory item.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The inventory item's details.",
    "expandable": false,
    "children": [
      {
        "name": "inventory_item",
        "type": "[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)",
        "description": "Inventory Item details",
        "optional": false,
        "defaultValue": "",
        "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": "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 inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "height",
            "type": "`number` \\| `null`",
            "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "hs_code",
            "type": "`string` \\| `null`",
            "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The inventory item's ID.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "length",
            "type": "`number` \\| `null`",
            "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "material",
            "type": "`string` \\| `null`",
            "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>` \\| `null`",
            "description": "An optional key-value map with additional details",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "mid_code",
            "type": "`string` \\| `null`",
            "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "origin_country",
            "type": "`string` \\| `null`",
            "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "requires_shipping",
            "type": "`boolean`",
            "description": "Whether the item requires shipping.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "sku",
            "type": "`string` \\| `null`",
            "description": "The Stock Keeping Unit (SKU) code of the Inventory Item.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "thumbnail",
            "type": "`string` \\| `null`",
            "description": "Thumbnail for the inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "title",
            "type": "`string` \\| `null`",
            "description": "Title of the inventory item",
            "optional": true,
            "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": []
          },
          {
            "name": "weight",
            "type": "`number` \\| `null`",
            "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "width",
            "type": "`number` \\| `null`",
            "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### update

Update an Inventory Item's details.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.update(inventoryItemId, {
  origin_country: "US",
})
.then(({ inventory_item }) => {
  console.log(inventory_item.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string`",
    "description": "The ID of the inventory item.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "payload",
    "type": "[AdminPostInventoryItemsInventoryItemReq](../../medusa/classes/medusa.AdminPostInventoryItemsInventoryItemReq.mdx)",
    "description": "The attributes to update in the inventory item.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "description",
        "type": "`string`",
        "description": "The inventory item's description.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "height",
        "type": "`number`",
        "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "hs_code",
        "type": "`string`",
        "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "length",
        "type": "`number`",
        "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "material",
        "type": "`string`",
        "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "mid_code",
        "type": "`string`",
        "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "origin_country",
        "type": "`string`",
        "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "requires_shipping",
        "type": "`boolean`",
        "description": "Whether the item requires shipping.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "sku",
        "type": "`string`",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "thumbnail",
        "type": "`string`",
        "description": "The inventory item's thumbnail.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "title",
        "type": "`string`",
        "description": "The inventory item's title.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "weight",
        "type": "`number`",
        "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "width",
        "type": "`number`",
        "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "query",
    "type": "[AdminPostInventoryItemsInventoryItemParams](../../medusa/classes/medusa.AdminPostInventoryItemsInventoryItemParams.mdx)",
    "description": "Configurations to apply on the retrieved inventory item.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The inventory item's details.",
    "expandable": false,
    "children": [
      {
        "name": "inventory_item",
        "type": "[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)",
        "description": "Inventory Item details",
        "optional": false,
        "defaultValue": "",
        "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": "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 inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "height",
            "type": "`number` \\| `null`",
            "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "hs_code",
            "type": "`string` \\| `null`",
            "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The inventory item's ID.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "length",
            "type": "`number` \\| `null`",
            "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "material",
            "type": "`string` \\| `null`",
            "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>` \\| `null`",
            "description": "An optional key-value map with additional details",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "mid_code",
            "type": "`string` \\| `null`",
            "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "origin_country",
            "type": "`string` \\| `null`",
            "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "requires_shipping",
            "type": "`boolean`",
            "description": "Whether the item requires shipping.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "sku",
            "type": "`string` \\| `null`",
            "description": "The Stock Keeping Unit (SKU) code of the Inventory Item.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "thumbnail",
            "type": "`string` \\| `null`",
            "description": "Thumbnail for the inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "title",
            "type": "`string` \\| `null`",
            "description": "Title of the inventory item",
            "optional": true,
            "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": []
          },
          {
            "name": "weight",
            "type": "`number` \\| `null`",
            "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "width",
            "type": "`number` \\| `null`",
            "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### updateLocationLevel

Update a location level's details for a given inventory item.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.inventoryItems.updateLocationLevel(inventoryItemId, locationId, {
  stocked_quantity: 15,
})
.then(({ inventory_item }) => {
  console.log(inventory_item.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "inventoryItemId",
    "type": "`string`",
    "description": "The ID of the inventory item that the location level belongs to.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "locationId",
    "type": "`string`",
    "description": "The ID of the location level to update.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "payload",
    "type": "[AdminPostInventoryItemsItemLocationLevelsLevelReq](../../medusa/classes/medusa.AdminPostInventoryItemsItemLocationLevelsLevelReq.mdx)",
    "description": "The attributes to update in the location level.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "incoming_quantity",
        "type": "`number`",
        "description": "the incoming stock quantity of an inventory item at the given location ID",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "stocked_quantity",
        "type": "`number`",
        "description": "the total stock quantity of an inventory item at the given location ID",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "query",
    "type": "[AdminPostInventoryItemsItemLocationLevelsLevelParams](../../medusa/classes/medusa.AdminPostInventoryItemsItemLocationLevelsLevelParams.mdx)",
    "description": "Configurations to apply on the returned inventory item.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminInventoryItemsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "the inventory item's details.",
    "expandable": false,
    "children": [
      {
        "name": "inventory_item",
        "type": "[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)",
        "description": "Inventory Item details",
        "optional": false,
        "defaultValue": "",
        "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": "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 inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "height",
            "type": "`number` \\| `null`",
            "description": "The height of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "hs_code",
            "type": "`string` \\| `null`",
            "description": "The Harmonized System code of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The inventory item's ID.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "length",
            "type": "`number` \\| `null`",
            "description": "The length of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "material",
            "type": "`string` \\| `null`",
            "description": "The material and composition that the Inventory Item is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>` \\| `null`",
            "description": "An optional key-value map with additional details",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "mid_code",
            "type": "`string` \\| `null`",
            "description": "The Manufacturers Identification code that identifies the manufacturer of the Inventory Item. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "origin_country",
            "type": "`string` \\| `null`",
            "description": "The country in which the Inventory Item was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "requires_shipping",
            "type": "`boolean`",
            "description": "Whether the item requires shipping.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "sku",
            "type": "`string` \\| `null`",
            "description": "The Stock Keeping Unit (SKU) code of the Inventory Item.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "thumbnail",
            "type": "`string` \\| `null`",
            "description": "Thumbnail for the inventory item",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "title",
            "type": "`string` \\| `null`",
            "description": "Title of the inventory item",
            "optional": true,
            "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": []
          },
          {
            "name": "weight",
            "type": "`number` \\| `null`",
            "description": "The weight of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "width",
            "type": "`number` \\| `null`",
            "description": "The width of the Inventory Item. May be used in shipping rate calculations.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />
