Choose a multi-carrier label API (such as EasyPost) to avoid managing separate integrations for each carrier; authenticate with your API key in the Authorization header.
When a return is approved, create a return shipment object by POSTing to the shipments endpoint with the from_address set to the customer's address, the to_address set to your warehouse, and the parcel dimensions/weight.
Retrieve available rates from the rates array in the response; select the appropriate service (UPS, FedEx, or USPS) based on cost, speed, and whether the carrier supports pay-on-use electronic return labels.
Purchase the label by calling the buy endpoint with the selected rate ID; the response contains a postage_label.label_url from which you can download the label PDF or ZPL.
Deliver the label to the customer via email (as a link or attachment) or embed it in your returns portal for download; for electronic return labels (FedEx Email Return Label, UPS Electronic Return Label), the carrier charges only when the label is first scanned.
Store the tracking number against the RMA in your OMS; subscribe to tracking webhooks to monitor inbound return shipment status and trigger warehouse receiving workflows on delivery.
Known gotchas
Pay-on-use labels (standard for FedEx and USPS electronic return labels) are only charged when scanned at a carrier facility — do not pre-void labels before the customer has a chance to use them.
FedEx and UPS return label options differ: FedEx offers Email Return Label and Print Return Label; UPS offers Electronic Return Label (email) and Print Return Label — confirm which type your carrier account supports.
Label validity windows vary by carrier and service type; communicate the expiry date to the customer to prevent them from attempting to use an expired label.
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