latestSwagger 2.02026-08-1274120326.8 KB

3a995f316cda

Truckload V2

TRAC Rate Statistics

This endpoint allows permissioned users to get statistical aggregations (min, median, average, max, count) of TRAC spot rates over specified time periods. The statistics can be aggregated by various time periods including summary (all rates in range), weekly, monthly, quarterly, yearly, or week-to-date.

OD pairs can be defined with market airport codes, Zip3 or Zip5, supporting any combination. If input miles are not specified in the 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 statistics are being requested (YYYY-MM-DD), required
  • end_date: the most recent date of the range over which statistics are being requested (YYYY-MM-DD), required
  • aggregation: time period for aggregation - 'SUMMARY', 'WEEKLY', 'MONTHLY', 'QUARTERLY', 'YEARLY', or 'WTD' (week-to-date), 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 the origin, required
  • origin_country_code: country code for the origin; at this time only lanes within the contiguous US markets are available, must be 'USA', required
  • destination: the 3 character KMA airport code, Zip3 or Zip5 for the destination, required
  • destination_country_code: country code for the destination; at this time only lanes within the contiguous US markets are available, must be 'USA', required
  • equipment_type: may be 'VAN' or 'REEFER' or 'FLATBED', 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)
    • 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 statistics in the response apply)
    • data_timestamp: the date for which the data in the response was calculated
    • period_start_date: the start date for this statistical period
    • period_end_date: the end date for this statistical period
    • aggregation: the aggregation type used for this period (SUMMARY, WEEKLY, MONTHLY, QUARTERLY, YEARLY, or WTD)
    • lowest_rpm: the lowest (minimum) rate-per-mile value in the period
    • highest_rpm: the highest (maximum) rate-per-mile value in the period
    • std_dev_rpm: the standard deviation of rate-per-mile values in the period
    • lowest_rate: the lowest (minimum) total rate value in the period
    • highest_rate: the highest (maximum) total rate value in the period
    • std_dev_rate: the standard deviation of total rate values in the period
    • avg_rpm: the average rate-per-mile
    • avg_rpm_high: the average of the high-end (67th percentile) rate-per-mile values
    • avg_rpm_low: the average of the low-end (33rd percentile) rate-per-mile values
    • avg_rate: the average total rate
    • avg_rate_high: the average of the high-end (67th percentile) total rate values
    • avg_rate_low: the average of the low-end (33rd percentile) total rate values
    • avg_confidence_score: the average confidence score across all data points in the period
    • avg_origin_radius_expansion: the average number of miles away from the edge of the origin KMA that was expanded to gather data
    • avg_destination_radius_expansion: the average number of miles away from the edge of the destination KMA that was expanded to gather data
    • avg_timeframe_expansion: the average number of additional days back the algorithm looked to gather requisite data
    • avg_total_load_count: the average total number of loads aggregated to calculate the rates
    • avg_total_contributor_count: the average total number of TRAC contributors (brokers) whose data was aggregated
  • errors: a list object that contains information on lanes that are not valid for the statistics 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 inputs were valid)
    • error_found: A lane/date/equipment specific explanation of the issue with the lane information that caused an error
post/v2/truckload/rates/trac/statistics

Headers

x-api-versionstring

Request body

start_datestring date-time required
end_datestring date-time required
aggregationstring required

Response

OK