Rates API
Get real-time shipping rates from all configured carriers.
Get rates
POST /v1/rates
Request body
| Field | Type | Required | Description |
|---|---|---|---|
from | Address | Yes | Origin address (at minimum: zip, country) |
to | Address | Yes | Destination address (at minimum: zip, country) |
parcel | Parcel | Yes | Package dimensions and weight |
carriers | string[] | No | Limit to specific carriers |
services | string[] | No | Limit to specific services |
Example
curl -X POST https://api.flexops.io/v1/rates \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"from": { "zip": "80202", "country": "US" },
"to": { "zip": "97201", "country": "US" },
"parcel": { "weightOz": 16, "lengthIn": 10, "widthIn": 8, "heightIn": 4 }
}'
Response
{
"rates": [
{
"id": "rate_001",
"carrier": "usps",
"carrierName": "United States Postal Service",
"service": "ground_advantage",
"serviceName": "USPS Ground Advantage",
"amount": 7.50,
"currency": "USD",
"transitDays": 5,
"deliveryDate": "2026-03-15",
"guaranteedDelivery": false
}
],
"requestedAt": "2026-03-10T12:00:00Z"
}
Rates are cached for 15 minutes. The id field can be passed directly to the label creation endpoint.