3a995f316cda
Contract Rates
This endpoint allows permissioned users to get our SONAR KMA contract rates, adjusted to various types of geographical input lanes. Our rate data is being updated weekly and OD pairs can be defined with market airport codes, Zip3 or Zip5, supporting any combination. If input miles are not speceified int he request, they will be calculated and all rates returned will be adjusted to the lane's specific mileage.
A comprehensive list of KMAs, their airport codes, and the zip3’s associated with those KMA’s can be found by calling the KMA Reference List endpoint located under the “Lookup” menu. Additionally, the Zip3 Specific endpoint (also located under the Lookup tab), will return the airport code associated with a zip3 under the “qualifier” header (along with the reference city and state).
You can click on the Body Sample to the right to populate the example in the test body below.
For more information about getting access to this endpoint or using this endpoint, please reach out to our Customer Success team (cs@gosonar.com).
This endpoint handles the following input fields:
- start_date: the earliest date of the range over which the rate is being requested (YYYY-MM-DD), required
- end_date: the most recent date of the range over which the rate is being requested (YYYY-MM-DD), required
- lane_id: a unique identifier set by the client and will be returned with the response; optional field, not required
- origin: the 3 character KMA airport code, Zip3 or Zip5 for USA, Zip3 or Zip6 for CAN the origin, required
- origin_country_code: country code for the origin; at this time only lanes within the contiguous US markets and Canada are available, must be ‘USA’ or ‘CAN’, required
- destination: the 3 character KMA airport code, Zip3 or Zip5 for USA, Zip3 or Zip6 for CAN the origin, required
- destination_country_code: country code for the destination; at this time only lanes within the contiguous US markets and Canada are available, must be ‘USA’ or ‘CAN’, required
- equipment_type: may be ‘VAN’ or ‘REEFER’ for USA, 'VAN' only for CAN, required
- input_miles: the specific lane miles the rates will be adjusted to; this field is optional but must not be negative and will be calculated if not provided, not required
Here are the output fields returned in a successful call:
- Lanes: A list object that contains the output information associated with the valid requested lanes
- lane_id: the unique identifier sent in the corresponding call
- miles: the mileage for the rate
- mileage_type: the type of mileage used, either input or calculated
- origin: the Zip3/Zip5 or 3 character airport code for the lane origin, as provided in the request
- origin_market: the 3 character airport code for the origin Key Market Area (KMA)
- origin_country_code: the 3 character country code the for origin, 'USA'
- destination: the Zip3/Zip5 or 3 character airport code for the lane destination, as provided in the request
- destination_market: the 3 character airport code for the destination Key Market Area (KMA) provided in the API call by the client
- destination_country_code: The 3 character country code the for destination, 'USA'
- equipment_type: the equipment_type provided in the API call by the client (for which the rates in the response apply)
- data_timestamp: the date for which the data in the response was calculated (ie: the date to which the rates in the response were applicable)
- generated_on: the date the data in the response was generated
- rpm: the median rate-per-mile (fuel included)
- rpm_high: the high-end (67th percentile) total (linehaul plus fuel surcharge) rate-per-mile that corresponds to the origin, destination, equipment_type and data_timestamp provided in the API call by the client
- rpm_low: the low-end (33rd percentile) total (linehaul plus fuel surcharge) rate-per-mile that corresponds to the origin, destination, equipment_type and data_timestamp provided in the API call by the client
- rate: the median total (linehaul plus fuel surcharge) rate that corresponds to the origin, destination, equipment_type and data_timestamp provided in the API call by the client
- rate_high: the high-end (67th percentile) total (linehaul plus fuel surcharge) rate that corresponds to the origin, destination, equipment_type and data_timestamp provided in the API call by the client
- rate_low: the low-end (33rd percentile) total (linehaul plus fuel surcharge) rate that corresponds to the origin, destination, equipment_type and data_timestamp provided in the API call by the client
- fuel_surcharge_rpm: the estimated fuel surcharge cost per mile calculated using (DOE.USA-1.2)/6.5mpg that corresponds to the data timestamp
- confidence_score: ranges from 1 to 5 with 1 indicating the lowest confidence level and 5 the highest. It is based on how similar the analyzed load set is to the specified time and origin/destination parameters
- origin_radius_expansion: the number of miles away from the edge of the origin KMA we had to expand in order to gather the requisite data to produce the rate. Origin and destination expansion occurs at the same rate
- destination_radius_expansion: the number of miles away from the edge of the destination KMA we had to expand in order to gather the requisite data to produce the rate. Origin and destination expansion occurs at the same rate
- timeframe_expansion: all rates are produced using a fixed 90 day lookback period
- total_load_count: the total number of loads aggregated to calculate the rate; is not weighted
- total_shipper_count: the total number of shippers whose data was aggregated in order to produce a rate
- Errors: a list object that contains information on lanes that are not valid for the rate request
- lane_id: the unique identifier sent in the corresponding call
- origin: the origin string provided in the request
- origin_country_code: ‘USA’
- destination: the destination string provided in the request
- destination_country_code: ‘USA’
- equipment_type: the equipment_type provided in the API call by the client
- input_miles: the miles provided by the user in the request or calculated (if origin and destination iputs were valid)
- error_found: A lane/date/equipment specific explanation of the issue with the lane information that caused an error
Headers
Request body
Example request
{
"start_date": "2025-01-01",
"end_date": "2025-02-01",
"lanes": [
{
"lane_id": "303-MOB",
"origin": "303",
"origin_country_code": "USA",
"destination": "MOB",
"destination_country_code": "USA",
"equipment_type": "VAN",
"input_miles": 320
}
]
}Response
OK
Example response
{
"lanes": [
{
"lane_id": "303-MOB",
"miles": 320,
"mileage_type": "input",
"origin": "303",
"origin_market": "ATL",
"origin_country_code": "USA",
"destination": "MOB",
"destination_market": "MOB",
"destination_country_code": "USA",
"equipment_type": "VAN",
"data_timestamp": "2025-01-01",
"request_date": "2025-01-02",
"rpm": 3.47,
"rpm_high": 3.64,
"rpm_low": 3.27,
"rate": 1111.85,
"rate_high": 1164.27,
"rate_low": 1047.79,
"fuel_surcharge_rpm": 0.37,
"confidence_score": 5,
"origin_radius_expansion": 7,
"destination_radius_expansion": 9,
"timeframe_expansion": 90,
"total_load_count": 133,
"total_shipper_count": 14
}
],
"errors": [
{
"original_lane": {
"lane_id": "303-MOB",
"origin": "303",
"origin_country_code": "USA",
"destination": "MOB",
"destination_country_code": "USA",
"equipment_type": "VAN",
"input_miles": 320
}
}
]
}