Create a Shipment object in EasyPost via POST /v2/shipments with to_address as your warehouse and from_address as the customer's address, plus parcel dimensions and weight
Call POST /v2/shipments/:id/buy with the selected rate ID to purchase the label; retrieve the postage_label.label_url from the response
Store the EasyPost tracker ID alongside the return record in your database
Call Shopify's reverseDeliveryCreate mutation with trackingInfo containing the carrier and tracking number from EasyPost to attach the label to the Shopify return
Send the label URL to the customer via transactional email with return instructions
Known gotchas
EasyPost Shipment objects expire if a label is not purchased within a configurable period; create shipments close to when the label will actually be sent to the customer
Carrier services vary by weight and origin/destination; always fetch fresh rates rather than hardcoding a carrier, as a previously cheap option may be unavailable for a given parcel
Prepaid return labels are charged when purchased, not when scanned; issue labels only after confirming the return authorization to avoid costs for returns that never ship
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp