Skip to main content

Returns

Create prepaid return labels for your customers.

Creating a return label

A return label is a standard label with the from and to addresses swapped, plus isReturn: true:

curl -X POST https://api.flexops.io/v1/labels \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"carrier": "usps",
"service": "ground_advantage",
"isReturn": true,
"from": {
"name": "Jane Doe",
"street1": "456 Oak Ave",
"city": "Portland",
"state": "OR",
"zip": "97201",
"country": "US"
},
"to": {
"name": "FlexOps Returns",
"street1": "100 Shipping Lane",
"city": "Denver",
"state": "CO",
"zip": "80202",
"country": "US"
},
"parcel": { "weightOz": 16 }
}'

Pay-on-use returns

With USPS, return labels are only charged when the customer actually uses them. Set payOnUse: true:

{
"isReturn": true,
"payOnUse": true,
...
}

Return tracking

Return labels generate tracking numbers just like outbound labels. Subscribe to tracking.updated webhooks to know when a return is in transit.