@medusajs/inventory
v2.22.7
Published
Inventory Module for Medusa
Keywords
Readme
Inventory Module for Medusa: manages inventory items, their stock levels per location, and reservations. Use it to track stocked quantities, reserve stock for orders and carts, and check availability across locations. It ships with @medusajs/medusa and is registered by default; resolve it in your code with container.resolve(Modules.INVENTORY).
At a glance
| | |
| --- | --- |
| Package | @medusajs/inventory |
| Type | Commerce Module |
| Module key | Modules.INVENTORY ("inventory") |
| Registered by default | Yes |
Installation
No installation needed. The module ships with @medusajs/medusa.
Usage
import { Modules } from "@medusajs/framework/utils"
const inventoryModuleService = container.resolve(Modules.INVENTORY)
const [inventoryItems, count] =
await inventoryModuleService.listAndCountInventoryItems({})