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.Unique product identifier (prefix:
prod_)Product title, searchable and translatable
URL-friendly identifier for the product
Product subtitle, searchable and translatable
Product description, searchable and translatable
Product status:
draft, proposed, published, rejectedURL to the product thumbnail image
Whether the product is a gift card (default: false)
Whether discounts can be applied (default: true)
Product variants with different options
Available options for variants (e.g., Size, Color)
Product images ordered by rank
Associated product collection
Associated product categories
Product tags for organization
Product type classification
ProductVariant
Variants represent specific SKUs of a product with unique option combinations.Unique variant identifier (prefix:
variant_)Variant title
Stock keeping unit identifier
Product barcode
Option values for this variant (e.g., Size: Large, Color: Red)
ID of the parent product
ProductOption
Defines customizable product attributes.Unique option identifier
Option title (e.g., “Size”, “Color”)
Available values for this option
ID of the parent product
ProductCollection
Groups products for marketing and organization.Unique collection identifier
Collection title
URL-friendly identifier
Products in this collection
ProductCategory
Hierarchical product categorization with tree structure.Unique category identifier
Category name
URL-friendly identifier
Parent category for nested hierarchies
Child categories
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.The ID of the product to retrieve
Shared context for the operation
The retrieved product
List Products
List products with filtering and pagination.Array of products matching the filters
Create Products
Create one or more products with variants and options.Product data to create
Product title
URL-friendly identifier (auto-generated from title if not provided)
Product status (default:
draft)Product options with values
Product variants
Product images
The created product(s)
Update Products
Update product information.Create Product Variants
Add variants to existing products.Create Product Collections
Create product collections for grouping.Create Product Categories
Create hierarchical product categories.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