Lookup rate history
curl --request POST \
--url https://api.cargado.com/rates/history \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"requests": [
{
"stops": [
{
"type": "PICKUP",
"placeDetails": {
"place": {
"address": "<string>",
"type": "ADDRESS_STRING"
}
}
}
],
"trailerRequirements": {
"allowedTypes": []
},
"routeMiles": 123
}
]
}
'import requests
url = "https://api.cargado.com/rates/history"
payload = { "requests": [
{
"stops": [
{
"type": "PICKUP",
"placeDetails": { "place": {
"address": "<string>",
"type": "ADDRESS_STRING"
} }
}
],
"trailerRequirements": { "allowedTypes": [] },
"routeMiles": 123
}
] }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requests: [
{
stops: [
{
type: 'PICKUP',
placeDetails: {place: {address: '<string>', type: 'ADDRESS_STRING'}}
}
],
trailerRequirements: {allowedTypes: []},
routeMiles: 123
}
]
})
};
fetch('https://api.cargado.com/rates/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cargado.com/rates/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requests' => [
[
'stops' => [
[
'type' => 'PICKUP',
'placeDetails' => [
'place' => [
'address' => '<string>',
'type' => 'ADDRESS_STRING'
]
]
]
],
'trailerRequirements' => [
'allowedTypes' => [
]
],
'routeMiles' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cargado.com/rates/history"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"stops\": [\n {\n \"type\": \"PICKUP\",\n \"placeDetails\": {\n \"place\": {\n \"address\": \"<string>\",\n \"type\": \"ADDRESS_STRING\"\n }\n }\n }\n ],\n \"trailerRequirements\": {\n \"allowedTypes\": []\n },\n \"routeMiles\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cargado.com/rates/history")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requests\": [\n {\n \"stops\": [\n {\n \"type\": \"PICKUP\",\n \"placeDetails\": {\n \"place\": {\n \"address\": \"<string>\",\n \"type\": \"ADDRESS_STRING\"\n }\n }\n }\n ],\n \"trailerRequirements\": {\n \"allowedTypes\": []\n },\n \"routeMiles\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cargado.com/rates/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requests\": [\n {\n \"stops\": [\n {\n \"type\": \"PICKUP\",\n \"placeDetails\": {\n \"place\": {\n \"address\": \"<string>\",\n \"type\": \"ADDRESS_STRING\"\n }\n }\n }\n ],\n \"trailerRequirements\": {\n \"allowedTypes\": []\n },\n \"routeMiles\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"type": "DATA",
"id": "<string>",
"rateHistory": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"pricingLane": {
"origin": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
},
"destination": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
}
},
"latestSuggestedRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"suggestedRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"perMileRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"latestAllInRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"allInRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"routeMiles": 123,
"routeMilesWithDeadhead": 123,
"latestPerMileRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
},
"alternateRateHistories": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"pricingLane": {
"origin": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
},
"destination": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
}
},
"latestSuggestedRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"suggestedRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"perMileRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"latestAllInRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"allInRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"routeMiles": 123,
"routeMilesWithDeadhead": 123,
"latestPerMileRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
}
]
}
]
}{
"message": "Unauthorized"
}Rates
Lookup rate history
Look up the rate history for a lane. This is considered a mutation because it is a metered operation and calls are recorded for possible billing purposes.
See the usage guide.
POST
/
rates
/
history
Lookup rate history
curl --request POST \
--url https://api.cargado.com/rates/history \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"requests": [
{
"stops": [
{
"type": "PICKUP",
"placeDetails": {
"place": {
"address": "<string>",
"type": "ADDRESS_STRING"
}
}
}
],
"trailerRequirements": {
"allowedTypes": []
},
"routeMiles": 123
}
]
}
'import requests
url = "https://api.cargado.com/rates/history"
payload = { "requests": [
{
"stops": [
{
"type": "PICKUP",
"placeDetails": { "place": {
"address": "<string>",
"type": "ADDRESS_STRING"
} }
}
],
"trailerRequirements": { "allowedTypes": [] },
"routeMiles": 123
}
] }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requests: [
{
stops: [
{
type: 'PICKUP',
placeDetails: {place: {address: '<string>', type: 'ADDRESS_STRING'}}
}
],
trailerRequirements: {allowedTypes: []},
routeMiles: 123
}
]
})
};
fetch('https://api.cargado.com/rates/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cargado.com/rates/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requests' => [
[
'stops' => [
[
'type' => 'PICKUP',
'placeDetails' => [
'place' => [
'address' => '<string>',
'type' => 'ADDRESS_STRING'
]
]
]
],
'trailerRequirements' => [
'allowedTypes' => [
]
],
'routeMiles' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cargado.com/rates/history"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"stops\": [\n {\n \"type\": \"PICKUP\",\n \"placeDetails\": {\n \"place\": {\n \"address\": \"<string>\",\n \"type\": \"ADDRESS_STRING\"\n }\n }\n }\n ],\n \"trailerRequirements\": {\n \"allowedTypes\": []\n },\n \"routeMiles\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cargado.com/rates/history")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requests\": [\n {\n \"stops\": [\n {\n \"type\": \"PICKUP\",\n \"placeDetails\": {\n \"place\": {\n \"address\": \"<string>\",\n \"type\": \"ADDRESS_STRING\"\n }\n }\n }\n ],\n \"trailerRequirements\": {\n \"allowedTypes\": []\n },\n \"routeMiles\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cargado.com/rates/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requests\": [\n {\n \"stops\": [\n {\n \"type\": \"PICKUP\",\n \"placeDetails\": {\n \"place\": {\n \"address\": \"<string>\",\n \"type\": \"ADDRESS_STRING\"\n }\n }\n }\n ],\n \"trailerRequirements\": {\n \"allowedTypes\": []\n },\n \"routeMiles\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"type": "DATA",
"id": "<string>",
"rateHistory": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"pricingLane": {
"origin": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
},
"destination": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
}
},
"latestSuggestedRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"suggestedRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"perMileRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"latestAllInRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"allInRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"routeMiles": 123,
"routeMilesWithDeadhead": 123,
"latestPerMileRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
},
"alternateRateHistories": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"pricingLane": {
"origin": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
},
"destination": {
"type": "MARKET",
"market": {
"id": "<string>",
"name": "<string>",
"code": "<string>",
"centroid": {
"latitude": 0,
"longitude": 0
}
}
}
},
"latestSuggestedRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"suggestedRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"perMileRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"latestAllInRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
},
"allInRates": [
{
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
],
"routeMiles": 123,
"routeMilesWithDeadhead": 123,
"latestPerMileRate": {
"dayRange": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"amountDistribution": {
"p25": 123,
"p50": 123,
"p75": 123
},
"marginOfError": 123,
"relativeMarginOfError": 123,
"confidenceScore": 123
}
}
]
}
]
}{
"message": "Unauthorized"
}Authorizations
Body
application/json
See the Rate Lookup guide for more information.
A list of load descriptions to get rate history for.
Required array length:
1 - 16 elementsShow child attributes
Show child attributes
Response
Ok
The result for each input request; the request and result arrays are the same size and their elements map 1:1. Each result is either a successful lookup or an error; each request succeeds or fails independently.
See the Rate Lookup guide for more information.
- Option 1
- Option 2
Show child attributes
Show child attributes
⌘I

