Compare shipping rates

GET
/v1/rates

USPS, UPS and FedEx prices to ship one parcel between two US ZIP codes, cheapest first, with delivery days and an itemized breakdown. Each quote names its source and rateType; today's source is Stamps.com, so prices are its own (reseller). Quotes only: nothing is bought. A source or carrier that can't quote is listed in errors; when none could, the answer is 502 no_quotes and nothing is spent.

Counts as one tracking number toward the account's day. Without a key, 5 free quotes a day per IP. POST /v1/rates takes the same fields as a JSON object.

Authorization

headerAuthorizationBearer <token>

Authorization: Bearer lsk_live_…

Query Parameters

from*string

Origin postal code (5-digit ZIP in the US).

to*string

Destination postal code.

weight*number

Above 0; at most 150 lb.

weightUnit?string
Default"lb"
Value in"lb""oz""kg""g"
fromCountry?string
Default"US"
toCountry?string
Default"US"
residential?boolean
Defaultfalse
length?number

Give length

width?number
height?number
dimensionUnit?string
Default"in"
Value in"in""cm"
carriers?string

Comma-separated carrier ids to ask; omit for all.

Response Body

Quotes, cheapest first.

application/json
  1. response
quotes*array<>
cheapest*|

source:carrier:serviceCode of the lowest unrestricted quote

fastest*|

source:carrier:serviceCode of the fewest quoted days

errors*array<>
quotedAt*string
Example Request
curl -X GET 'https://api.lastscanned.com/v1/rates?from=94107&to=10001&weight=2.5'
Example Response
{  "quotes": [    {      "carrier": "ups",      "service": "string",      "serviceCode": "string",      "amount": 0,      "currency": "string",      "rateType": "retail",      "source": "string",      "packaging": "string",      "deliveryDays": 0,      "estimatedDelivery": "string",      "guaranteed": true,      "restricted": "string",      "breakdown": [        {          "description": "string",          "amount": 0        }      ]    }  ],  "cheapest": "string",  "fastest": "string",  "errors": [    {      "source": "string",      "carriers": [        "string"      ],      "code": "string",      "message": "string"    }  ],  "quotedAt": "string"}