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
Comma-separated list of fields to include.
Maximum number of inventory items to return.
Number of inventory items to skip.
Search query for inventory item SKU or title.
Filter by exact SKU.
Filter by stock location IDs.
Request
Response
Array of inventory item objects.
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
Stock keeping unit for the inventory item.
Title of the inventory item.
Description of the inventory item.
Country of origin (two-letter ISO code).
Harmonized System code for customs.
Manufacturer Identification code.
Material composition.
Weight in grams.
Length dimension.
Height dimension.
Width dimension.
Whether the item requires shipping.
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
The inventory item’s ID.
Request
Response
Update Inventory Item
Update inventory item details.Path Parameters
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
The inventory item’s ID.
Request
Response
Stock Levels
List Stock Levels
Retrieve stock levels for an inventory item across all locations.Response
Total quantity in stock at the location.
Quantity reserved for pending orders.
Quantity expected to arrive.
Available quantity (stocked - reserved).
Update Stock Level
Update the stock quantity at a specific location.Request Body
Set the stocked quantity.
Set the incoming quantity.
Request
Create Stock Level
Add an inventory item to a new location.Request Body
The stock location ID.
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
The inventory item ID.
The stock location ID.
Quantity to reserve.
Associated order line item ID.
Custom metadata.
Delete Reservation
Remove an inventory reservation.Next Steps
Products
Manage product variants and inventory
Stock Locations
Learn about stock location management