npm.io
2.22.7 • Published 4d ago

@medusajs/inventory

Licence
MIT
Version
2.22.7
Deps
0
Size
157 kB
Vulns
0
Weekly
0
Stars
36.6K

Medusa logo

@medusajs/inventory

Documentation | Website

Building blocks for digital commerce

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs

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({})

Resources