Overview
A shipment represents a package being sent to a customer from a Stock Location. Each order can have one or more shipments — Spree automatically splits orders into multiple shipments when items need to ship from different locations or require different shipping methods. Key relationships:- Shipment tracks delivery of items from a Stock Location
- Shipping Method defines the carrier/service (UPS, FedEx, etc.)
- Shipping Rate represents the calculated cost for a method
- Zone defines geographic regions for shipping availability
- Shipping Category groups products with similar shipping requirements
Shipment Attributes
| Attribute | Description | Example |
|---|---|---|
number | Unique shipment identifier | H12345678901 |
tracking | Carrier tracking number | 1Z999AA10123456784 |
state | Current shipment state | shipped |
cost | Shipping cost | 9.99 |
shipped_at | When the shipment was shipped | 2025-07-21T14:36:00Z |
stock_location | Where items ship from | Warehouse NYC |
selected_shipping_rate | The rate chosen by the customer | { cost: 9.99, name: "UPS Ground" } |
Shipment States
Selecting Shipping Rates
During checkout, after the customer provides a shipping address, Spree calculates available shipping rates for each shipment. The customer must select a rate before proceeding.Shipping Methods
Shipping methods represent the carrier services available to customers (e.g., UPS Ground, FedEx Overnight, DHL International). Each shipping method is scoped to:- Zones — geographic regions where the method is available
- Shipping Categories — product groups the method handles
- Stores — which stores offer this method
Shipping Categories
Shipping categories group products with similar shipping requirements. For example:- Light — lightweight items like stickers
- Regular — standard products
- Heavy — items over a certain weight
- Oversized — large items requiring special handling
Calculators
Each shipping method uses a Calculator to determine the cost. Spree includes these built-in calculators:| Calculator | Description |
|---|---|
| Flat rate per order | Same cost regardless of items |
| Flat rate per item | Fixed cost per item |
| Flat percent | Percentage of the order total |
| Flexible rate | One rate for the first item, another for each additional |
| Price sack | Tiered pricing based on order total |
Split Shipments
When items in an order ship from different stock locations or have different shipping categories, Spree automatically splits the order into multiple shipments.How Splitting Works
- When an order reaches the delivery step, Spree evaluates where each item is in stock
- Items are grouped by stock location and shipping category
- Each group becomes a separate shipment with its own shipping rates
- The customer selects a shipping rate for each shipment independently
Weight Splitting
By default, Spree also splits shipments when a package exceeds a weight threshold (default: 150 units). This prevents individual packages from being too heavy.Split shipment behavior is customizable. See the Customization Quickstart for details on creating custom splitting rules.
Examples
Simple Setup
A store selling T-shirts to the US and Europe with 2 carriers:| Method | Zone | Pricing |
|---|---|---|
| USPS Ground | US | 2 each additional |
| FedEx | EU | $10 per item |
- 1 shipping category (default)
- 1 stock location
- 2 shipping methods with appropriate zones and calculators
Advanced Setup
A store shipping from 2 locations (New York, Los Angeles) with 3 carriers and 3 shipping categories:| Category / Method | DHL | FedEx | USPS |
|---|---|---|---|
| Light | $5/item | $10 flat | $8/item |
| Regular | $5/item | $2/item | $8/item |
| Heavy | $50/item | 15/add’l | $20/item |
Related Documentation
- Orders — Checkout flow and shipping rate selection
- Inventory — Stock locations and inventory management
- Calculators — Shipping rate calculators
- Addresses — Shipping address and zones
- Events — Subscribe to shipment events (e.g.,
shipment.shipped)

