Overview
The Fulfillment Module manages shipping and delivery operations including shipping profiles, service zones, geographic zones, shipping options with rule-based pricing, and fulfillment tracking. It provides a flexible system for configuring complex shipping scenarios. Key Features:- Shipping profile management
- Service zones with geographic coverage
- Rule-based shipping options
- Multi-provider fulfillment support
- Fulfillment tracking and labeling
- Dynamic shipping calculations
- Fulfillment set organization
When to Use
Use the Fulfillment Module when you need to:- Configure shipping options for products
- Define geographic shipping zones
- Calculate shipping costs based on rules (weight, price, etc.)
- Manage multiple fulfillment providers
- Create and track fulfillments
- Generate shipping labels
- Handle multi-location shipping
- Support pickup and delivery options
Data Models
ShippingProfile
Groups products with similar shipping requirements.string
required
Unique shipping profile identifier
string
required
Profile name (e.g., “Standard Products”, “Fragile Items”)
string
required
Profile type:
default, gift_card, customServiceZone
Defines a shipping service area with associated shipping options.string
required
Unique service zone identifier
string
required
Service zone name
string
required
ID of the parent fulfillment set
GeoZone[]
Geographic areas covered by this zone
ShippingOption[]
Available shipping options in this zone
GeoZone
Defines a geographic area within a service zone.string
required
Unique geo zone identifier
string
required
Zone type:
country, province, city, zipstring
required
Two-letter ISO country code
string
Province or state code
string
City name
string
Regex pattern for postal codes
string
required
ID of the parent service zone
ShippingOption
Represents a shipping method available to customers.string
required
Unique shipping option identifier
string
required
Shipping option name (e.g., “Express Shipping”)
string
required
ID of the service zone
string
required
ID of the shipping profile
string
required
Fulfillment provider ID (e.g., “manual”, “shippo”)
string
required
ID of the shipping option type
object
Provider-specific configuration data
ShippingOptionRule[]
Rules for pricing and availability
ShippingOptionRule
Defines conditions and pricing for shipping options.string
required
Unique rule identifier
string
required
ID of the shipping option
string
required
Rule attribute (e.g., “total”, “weight”, “quantity”)
string
required
Comparison operator:
eq, ne, gt, gte, lt, lte, instring | number
Rule value to compare against
Fulfillment
Tracks order fulfillment.string
required
Unique fulfillment identifier
string
required
Stock location fulfilling the items
string
required
Fulfillment provider ID
string
ID of the shipping option used
object
Provider-specific fulfillment data
DateTime
When fulfillment was shipped
DateTime
When fulfillment was delivered
DateTime
When fulfillment was canceled
FulfillmentItem[]
Items in this fulfillment
FulfillmentLabel[]
Shipping labels
FulfillmentSet
Organizes fulfillment configuration.string
required
Unique fulfillment set identifier
string
required
Fulfillment set name
string
required
Set type:
pickup, shippingServiceZone[]
Service zones in this set
Service Interface
The Fulfillment Module service is available at@medusajs/medusa/fulfillment.
Create Shipping Profile
Create a shipping profile for products.CreateShippingProfileDTO
required
Create Fulfillment Set
Create a fulfillment set with service zones.CreateFulfillmentSetDTO
required
Create Service Zone
Create a service zone with geographic coverage.Create Geo Zone
Define a geographic area.Create Shipping Option
Create a shipping method with rules.CreateShippingOptionDTO
required
List Shipping Options for Context
Find available shipping options for an address.FilterableShippingOptionForContextProps
required
Create Fulfillment
Create a fulfillment for order items.CreateFulfillmentDTO
required
Create Shipping Labels
Generate shipping labels for fulfillment.Update Fulfillment
Update fulfillment status.Cancel Fulfillment
Cancel an active fulfillment.Integration Examples
With Cart Module
Add shipping method to cart.With Stock Location Module
Multi-location fulfillment.With Order Module
Create fulfillments for orders.Fulfillment Providers
Medusa supports multiple fulfillment providers:Manual Provider
Built-in provider for manual fulfillment processes.Shippo
Best Practices
- Shipping Profiles: Group products with similar shipping requirements (fragile, oversized, standard) into profiles.
- Service Zones: Structure zones hierarchically - start with broad zones (country), then narrow (province, city, ZIP).
-
Rule-Based Pricing: Use rules to implement complex pricing:
- Free shipping over certain total
- Weight-based pricing
- Quantity discounts
-
Geo Zone Expressions: Use
postal_expressionwith regex for flexible postal code matching (e.g.,^94for San Francisco area). - Multi-Location: Configure fulfillment sets per location for complex inventory scenarios.
-
Provider Data: Store provider-specific configuration in the
datafield for flexibility.
Related Modules
- Cart Module - Add shipping methods to carts
- Order Module - Create order fulfillments
- Stock Location Module - Multi-location fulfillment
- Inventory Module - Reserve inventory for fulfillments
- Region Module - Configure region fulfillment providers