Calculate Rates
POST
/carriers/rates
Provide an order's information and retreive all carriers along with each of their assigned shipping methods with its calculated rate
Body
-
source object
The source location coordinates
-
destination object
The destination location coordinates
-
departure_time string(date-time)
Format should match the following pattern:
YYYY-MM-DD HH:MM:SS
. -
total_weight number
Minimum value is
0
. -
weight_unit string
Values are
kg
oroz
. -
length number
-
width number
-
height number
-
dimensions_unit string
Values are
cm
orin
.
POST /carriers/rates
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/carriers/rates \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"source":{"latitude":46.371826,"longitude":-118.496391},"destination":{"latitude":47.58213,"longitude":-122.38324},"departure_time":"2022-01-20 13:30:30","total_weight":23.45,"weight_unit":"kg","length":3,"width":3,"height":3,"dimensions_unit":"cm"}'
Request example
{
"source": {
"latitude": 46.371826,
"longitude": -118.496391
},
"destination": {
"latitude": 47.58213,
"longitude": -122.38324
},
"departure_time": "2022-01-20 13:30:30",
"total_weight": 23.45,
"weight_unit": "kg",
"length": 3,
"width": 3,
"height": 3,
"dimensions_unit": "cm"
}
Response example (200)
{
"message": "string",
"data": {
"carriers": [
{
"uuid": "a66def5d-c2bc-4cbc-9ed6-a8815d08114c",
"name": "ABC Logistics",
"avatar": "https://example.com/logo.png",
"shipping_methods": [
{
"uuid": "2beb8038-c028-480a-9d53-2eb1feea9252",
"name": "On-Demand",
"currency": "USD",
"rate": 62.5
},
{
"uuid": "b990bed5-f4d9-4fca-be74-7e990a4cd450",
"name": "3-Day Shipping",
"currency": "USD",
"rate": 41.25
}
]
}
]
}
}