Skip to main content

Get State Report

Contents

Trip Management’s Get State Report provides detailed mileage information for each state through which the route travels in the US. In Europe and other regions, this report returns mileage information for each country that the route goes through. The report is for the planned route only. It does not account for the driver’s actual route as recorded by GPS pings for completed trips.

The following two variations of requests are supported for this functionality:

GET /trip/{tripId}/stateReport

Resource URL

https://tripmanagement.trimblemaps.com/api/trip/{tripId}/stateReport

Request Fields

Field Description Type Required
tripId The alkTripId returned when you planned the trip.
integer
Yes

GET /trip/stateReport?tripId={tripId}

Resource URL

https://tripmanagement.trimblemaps.com/api/trip/stateReport?tripId={tripId}

Request Fields

Field Description Type Required
tripId The alkTripId returned when you planned the trip or the tmsTripId in your planning system.
Note: Only one can be used when making a request through the URL. The search logic will check for the user’s trips with matching tmsTripId. If no trips are found with provided tmsTripId, then the check will continue for trips with matching alkTripId. If no trip is found matching with either of the Trip IDs, then no trip found response will be returned.
integer
or
string
Yes

Response Fields

Same response for both the types of requests

Field Description Type
mileageReportLines An array of stops for the trip, along with the leg and total values for miles, cost, and hours.
Complex object
stateReportLines An array containing each state through which the trip travels, along with mileage totals in that state.
Complex object

Sample Response

{
  "mileageReportLines": [
    {
      "stop": {
        "timeZone": "EDT",
        "errors": [],
        "speedLimitInfo": null,
        "confidenceLevel": "Exact",
        "distanceFromRoad": 0.002,
        "distanceFromRoadSpecified": true,
        "crossStreet": null,
        "address": {
          "streetAddress": "24 Jersey Street",
          "city": "Boston",
          "state": "MA",
          "zip": "02215",
          "county": "Suffolk",
          "country": "United States",
          "splc": null,
          "countryPostalFilter": "US",
          "countryPostalFilterSpecified": true,
          "abbreviationFormat": "FIPS",
          "abbreviationFormatSpecified": true,
          "stateName": "Massachusetts",
          "stateAbbreviation": "MA",
          "countryAbbreviation": "US"
        },
        "coords": {
          "lat": "42.346689",
          "lon": "-71.098860"
        },
        "region": "NA",
        "regionSpecified": true,
        "label": "",
        "placeName": ""
      },
      "lMiles": "0.000",
      "tMiles": "0.000",
      "lCostMile": "0",
      "tCostMile": "0.00",
      "lHours": "0:00",
      "tHours": "0:00",
      "lTolls": "0.00",
      "tTolls": "0.00",
      "lEstghg": "0.0",
      "tEstghg": "0.0",
      "etaEtd": "6/3/2019 3:58 PM"
    },
    {
      "stop": {
        "timeZone": "EDT",
        "errors": [],
        "speedLimitInfo": null,
        "confidenceLevel": "Exact",
        "distanceFromRoad": 0.04,
        "distanceFromRoadSpecified": true,
        "crossStreet": null,
        "address": {
          "streetAddress": "157 Amherst Alley",
          "city": "Cambridge",
          "state": "MA",
          "zip": "02139",
          "county": "Middlesex",
          "country": "United States",
          "splc": null,
          "countryPostalFilter": "US",
          "countryPostalFilterSpecified": true,
          "abbreviationFormat": "FIPS",
          "abbreviationFormatSpecified": true,
          "stateName": "Massachusetts",
          "stateAbbreviation": "MA",
          "countryAbbreviation": "US"
        },
        "coords": {
          "lat": "42.356689",
          "lon": "-71.098860"
        },
        "region": "NA",
        "regionSpecified": true,
        "label": "",
        "placeName": ""
      },
      "lMiles": "2.870",
      "tMiles": "2.870",
      "lCostMile": "4.95075",
      "tCostMile": "4.95075",
      "lHours": "0:08",
      "tHours": "0:08",
      "lTolls": "0.00",
      "tTolls": "0.00",
      "lEstghg": "10.0",
      "tEstghg": "10.0",
      "etaEtd": "6/3/2019 4:07 PM"
    }
  ],
  "stateReportLines": [
    {
      "stCntry": "MA",
      "total": "2.870",
      "toll": "0.000",
      "free": "2.870",
      "ferry": "0.000",
      "loaded": "2.870",
      "empty": "0.000",
      "tolls": "0.00",
      "energy": "0.000"
    },
    {
      "stCntry": "US",
      "total": "2.870",
      "toll": "0.000",
      "free": "2.870",
      "ferry": "0.000",
      "loaded": "2.870",
      "empty": "0.000",
      "tolls": "0.00",
      "energy": "0.000"
    },
    {
      "stCntry": "TOTAL",
      "total": "2.870",
      "toll": "0.000",
      "free": "2.870",
      "ferry": "0.000",
      "loaded": "2.870",
      "empty": "0.000",
      "tolls": "0.00",
      "energy": "0.000"
    }
  ],
  "routeID": null
}
Last updated October 22, 2024.
API Endpoint:

Contents