Overview
The Inventory API provides endpoints for managing inventory items, tracking stock levels across locations, and handling inventory reservations. Base Path:/admin/inventory-items
Source: packages/medusa/src/api/admin/inventory-items/route.ts
List Inventory Items
Retrieve a list of inventory items with filtering and pagination.Query Parameters
string
Comma-separated list of fields to include.
number
default:"15"
Maximum number of inventory items to return.
number
default:"0"
Number of inventory items to skip.
string
Search query for inventory item SKU or title.
string
Filter by exact SKU.
string[]
Filter by stock location IDs.
Request
Response
InventoryItem[]
Array of inventory item objects.
number
Total number of inventory items matching the filters.
packages/medusa/src/api/admin/inventory-items/route.ts:34
Create Inventory Item
Create a new inventory item.Request Body
string
Stock keeping unit for the inventory item.
string
Title of the inventory item.
string
Description of the inventory item.
string
Country of origin (two-letter ISO code).
string
Harmonized System code for customs.
string
Manufacturer Identification code.
string
Material composition.
number
Weight in grams.
number
Length dimension.
number
Height dimension.
number
Width dimension.
boolean
default:"true"
Whether the item requires shipping.
object
Custom metadata key-value pairs.
Request
Response
packages/medusa/src/api/admin/inventory-items/route.ts:14
Get Inventory Item
Retrieve a single inventory item by ID.Path Parameters
string
required
The inventory item’s ID.
Request
Response
Update Inventory Item
Update inventory item details.Path Parameters
string
required
The inventory item’s ID.
Request Body
Accepts the same fields as Create Inventory Item, all optional.Request
Delete Inventory Item
Delete an inventory item.Path Parameters
string
required
The inventory item’s ID.
Request
Response
Stock Levels
List Stock Levels
Retrieve stock levels for an inventory item across all locations.Response
number
Total quantity in stock at the location.
number
Quantity reserved for pending orders.
number
Quantity expected to arrive.
number
Available quantity (stocked - reserved).
Update Stock Level
Update the stock quantity at a specific location.Request Body
number
Set the stocked quantity.
number
Set the incoming quantity.
Request
Create Stock Level
Add an inventory item to a new location.Request Body
string
required
The stock location ID.
number
default:"0"
Initial stock quantity.
Delete Stock Level
Remove an inventory item from a location.Reservations
List Reservations
Retrieve all reservations for an inventory item.Response
packages/medusa/src/api/admin/reservations/route.ts
Create Reservation
Manually create an inventory reservation.Request Body
string
required
The inventory item ID.
string
required
The stock location ID.
number
required
Quantity to reserve.
string
Associated order line item ID.
object
Custom metadata.
Delete Reservation
Remove an inventory reservation.Next Steps
Products
Manage product variants and inventory
Stock Locations
Learn about stock location management