Shippo — Auto-Create Shipping Labels
Automatically generate shipping labels in Shippo the moment an order is fulfilled in your store.
Prerequisites
- A Shippo account (free plan works)
- A Shippo API key
- At least one carrier account connected in Shippo (USPS, UPS, FedEx, DHL, etc.)
Get your Shippo API key
- Log into Shippo → Settings → API
- Copy your API Token (starts with
shippo_test_orshippo_live_)
Use your live API token (shippo_live_) for production stores. Test tokens create test shipments that aren't submitted to carriers.
Connect Shippo
- Go to Settings → Integrations → Shippo
- Paste your API token
- Click Save & Test
Available Shippo actions
Create Shipment
Creates a shipment object in Shippo with address and parcel details. This is typically followed by Create Label to get the actual shipping label.
Recommended trigger: order.fulfilled or fulfillment.created
Address mappings (from shipping_address):
| Shippo field | Event field |
|---|---|
address_to.name | order.shipping_address.first_name + " " + order.shipping_address.last_name |
address_to.street1 | order.shipping_address.address_1 |
address_to.city | order.shipping_address.city |
address_to.state | order.shipping_address.province |
address_to.zip | order.shipping_address.postal_code |
address_to.country | order.shipping_address.country_code |
address_to.phone | order.shipping_address.phone |
From address — configure your warehouse address as a fixed value in the action configuration.
Create Label
Purchases and generates a shipping label from a shipment. Returns a label URL and tracking number.
Recommended trigger: use after Create Shipment, or directly on fulfillment.created if parcel dimensions are consistent.
Common configuration:
| Field | Value |
|---|---|
carrier_account | Your Shippo carrier account ID (find in Shippo → Carriers) |
servicelevel_token | e.g. usps_priority, ups_ground, fedex_ground |
label_file_type | "PDF" or "PNG" |
Example workflow: fulfillment → Shippo label
This is the most common pattern for stores with consistent parcel sizes.
order.fulfilled
└─ Shippo: Create Shipment (from address, to address, parcel weight/dimensions)
└─ Shippo: Create Label (carrier, service level)
Step-by-step
- Create a new workflow: "Auto Shippo Label"
- Add trigger:
order.fulfilled - Add action: Shippo → Create Shipment
- Set
address_fromto your warehouse address (fixed values) - Map
address_tofields fromorder.shipping_address - Set
parcels[0].weight,parcels[0].length,parcels[0].width,parcels[0].height— use fixed values or map from order metadata
- Set
- Add action: Shippo → Create Label
- Set
carrier_accountto your Shippo carrier account ID - Set
servicelevel_tokento your preferred service level
- Set
- Save and Activate
Variable parcel sizes
If your orders have different parcel sizes, you can store parcel dimensions in Medusa product metadata and map them in the workflow. For example:
order.items[0].variant.metadata.weight
order.items[0].variant.metadata.length
Tracking numbers
When a Shippo label is created, the response includes:
tracking_number— the carrier tracking numbertracking_url_provider— direct tracking URLlabel_url— PDF/PNG label download URL
You can use these in a follow-up action (e.g. SendGrid email) to send the customer a tracking link automatically.
Checking label creation
- Go to Integrations → Execution History
- Find the execution for
order.fulfilled - Click to expand — you'll see the Shippo response including label URL and tracking number
You can also verify labels were created in Shippo → Shipments.
Common issues
| Issue | Solution |
|---|---|
Invalid address | Ensure country_code is in ISO 2-letter format (e.g. US, not United States) |
No carrier accounts | Add a carrier in Shippo → Carriers → Connect new carrier |
Test vs live token | Make sure you're using shippo_live_ in production |
Parcel dimensions required | Shippo requires weight at minimum; length/width/height for some carriers |