Overview
The Product Module manages products and their associated data including variants, options, collections, categories, tags, and types. It provides a flexible catalog system that supports complex product hierarchies and customization. Key Features:- Product and variant management with options
- Product collections and categories (tree structure)
- Product images with variant-specific associations
- Product tags and types for organization
- Multi-language support with translations
- Handle-based URLs for SEO
When to Use
Use the Product Module when you need to:- Create and manage product catalogs
- Organize products with collections and categories
- Handle product variants with multiple options (size, color, etc.)
- Manage product images and metadata
- Support multi-language product content
- Track product status (draft, published, rejected)
Data Models
Product
The core product entity that represents a sellable item.string
required
Unique product identifier (prefix:
prod_)string
required
Product title, searchable and translatable
string
required
URL-friendly identifier for the product
string
Product subtitle, searchable and translatable
string
Product description, searchable and translatable
enum
Product status:
draft, proposed, published, rejectedstring
URL to the product thumbnail image
boolean
Whether the product is a gift card (default: false)
boolean
Whether discounts can be applied (default: true)
ProductVariant[]
Product variants with different options
ProductOption[]
Available options for variants (e.g., Size, Color)
ProductImage[]
Product images ordered by rank
ProductCollection
Associated product collection
ProductCategory[]
Associated product categories
ProductTag[]
Product tags for organization
ProductType
Product type classification
ProductVariant
Variants represent specific SKUs of a product with unique option combinations.string
required
Unique variant identifier (prefix:
variant_)string
required
Variant title
string
Stock keeping unit identifier
string
Product barcode
ProductOptionValue[]
Option values for this variant (e.g., Size: Large, Color: Red)
string
required
ID of the parent product
ProductOption
Defines customizable product attributes.string
required
Unique option identifier
string
required
Option title (e.g., “Size”, “Color”)
ProductOptionValue[]
Available values for this option
string
required
ID of the parent product
ProductCollection
Groups products for marketing and organization.string
required
Unique collection identifier
string
required
Collection title
string
required
URL-friendly identifier
Product[]
Products in this collection
ProductCategory
Hierarchical product categorization with tree structure.string
required
Unique category identifier
string
required
Category name
string
required
URL-friendly identifier
ProductCategory
Parent category for nested hierarchies
ProductCategory[]
Child categories
number
Display order within parent category
Service Interface
The Product Module service is available at@medusajs/medusa/product.
Retrieve Product
Retrieve a single product with related data.string
required
The ID of the product to retrieve
FindConfig
Shared context for the operation
ProductDTO
The retrieved product
List Products
List products with filtering and pagination.FilterableProductProps
FindConfig
ProductDTO[]
Array of products matching the filters
Create Products
Create one or more products with variants and options.CreateProductDTO | CreateProductDTO[]
required
Product data to create
string
required
Product title
string
URL-friendly identifier (auto-generated from title if not provided)
ProductStatus
Product status (default:
draft)CreateProductOptionDTO[]
Product options with values
CreateProductVariantDTO[]
Product variants
CreateProductImageDTO[]
Product images
ProductDTO | ProductDTO[]
The created product(s)
Update Products
Update product information.Create Product Variants
Add variants to existing products.CreateProductVariantDTO | CreateProductVariantDTO[]
required
Create Product Collections
Create product collections for grouping.Create Product Categories
Create hierarchical product categories.CreateProductCategoryDTO | CreateProductCategoryDTO[]
required
Integration Examples
With Pricing Module
Product variants are linked to prices through the Pricing Module.With Inventory Module
Track inventory levels for product variants.With Sales Channel Module
Associate products with sales channels for multi-channel selling.Best Practices
- Handle Generation: Always use URL-friendly handles for SEO. If not provided, handles are auto-generated from titles using kebab-case.
- Variant Options: Ensure all variants have valid option combinations. The module validates that option values match the product’s defined options.
-
Image Management: Use the
rankfield on images to control display order. Variants can have specific images through the variant-image relationship. -
Status Management: Use
draftstatus for products being prepared,publishedfor active products, andrejectedfor products that failed review. -
Category Hierarchy: Design your category tree structure before implementation. Use the
rankfield to control sibling category order. - Translations: Leverage translatable fields (title, description, subtitle, material) for multi-language support.
Related Modules
- Pricing Module - Manage product variant prices
- Inventory Module - Track variant inventory
- Sales Channel Module - Multi-channel product availability
- Cart Module - Add products to shopping carts
- Order Module - Process product orders