Shared API Members

Shared API members are objects used in several API calls. The structure that is shared is the same for each API request and response.

StopLocation

The StopLocation structure is used to pass all data associated with a geographic location. It can contain either an address or geographic coordinates. Either the address element is sent or the coords element is specified. Only one is required and specifying both will result in an error. The StopLocation extends the Location class.

ElementDefinitionRequired
AddressA system object of the Address. Gets or sets the address information for the location.
Usage: Address = new Address

{

Zip = "19123"

}

Y (if not sending coords)
CoordsA system object of type Coordinates. Gets or sets the geographic coordinates for the location.
Usage:Coordinates = new Coordinates

{

Lat = "40353828",

Lon = "-74610884"

}

Y (if not sending Address)
CostsA system object of type StopCost. Gets or sets the cost associated with this stop.
Usage:StopCosts stopCosts = new StopCosts

{

CostOfStop = 5,

CostOfStopSpecified = true,

HoursPerStop = 1,

HoursPerStopSpecified = true,

Loaded = true,

LoadedSpecified = true,

OnDuty = true,

OnDutySpecified = true,

UseOrigin = false,

UseOriginSpecified = true

};

N
LabelA string value. Gets or sets a string which represents a label to be displayed on maps and in reports in association with a stop.
Usage: label = 'stop 1';
N
PlaceNameA string value. Gets or sets the place name which corresponds to a custom place; this would supersede standard address entries for geocoding or identify a custom place to be associated with the address. Available for premium account types only.
Usage: PlaceName = 'ALK';
N
RegionAn enumeration of DataRegion. Gets or sets the Region that the location is in.
Usage: Region = DataRegion.NA
Y

Location

The Location structure represents a real world location made up of an address, latitude/longitude coordinates, or both. It is inherited by StopLocation.

ElementDefinitionRequired
AddressA system object of the Address. Gets or sets the address information for the location.
Usage:Address = new Address

{

Zip = "19123"

}

Y(if not sending coords)
CoordsA system object of type Coordinates. Gets or sets the geographic coordinates for the location.
Usage:Coordinates = new Coordinates

{

Lat = "40353828",

Lon = "-74610884"

}

Y(if not sending Address)
LabelA string value. Gets or sets a string which represents a label to be displayed on maps and in reports in association with a stop.
Usage:label = “stop 1”;
Y
PlaceNameA string value. Gets or sets the place name which responds to a custom place; this would supersede standard address entries for geocoding or identify a custom place to be associated with the address. Available for premium account types only.
Usage:PlaceName = “ALK”;
N
RegionAn enumeration of DataRegion. Gets or sets the Region that the location is in.
Usage:Region = DataRegion.NA
Y

Address

The Address structure represents a street address with support for Standard Point Location Codes (SPLC).

ElementDefinitionRequired
AbbreviationFormatAn enumeration of CountryAbbreviationType. Gets or sets the AbbreviationFormat. The default setting is FIPS.
Member NameValueDescription
FIPS0Indicates the country abbreviation type to FIPS
ISO21Indicates the country abbreviation type to ISO2
ISO32Indicates the country abbreviation type to ISO3
GENC23Two-letter code format for Geopolitical Entities and Codes
GENC34Three-letter code format for Geopolitical Entities and Codes

Usage:AbbreviationFormat = CountryAbbreviationType.FIPS
N
CityA string value. Gets or sets the city
Usage:City = “Philadelphia”
Y(when sending state)
CountryA string value. Gets or sets the country.
Usage:Country = “US”
N
CountryPostalFilterAn enumeration of PosCodeType. Gets or sets the postal code country filter. This can be used to filter the postal code by country within North America.
Member NameValueDescription
US0Indicates the country code filter to be the United States
Mexico1Indicates the country code filter to be Mexico
Both2Indicates the country code filter to be both United States and Mexico.

Usage:CountryPostalFilter =PostCodeType.US
N
CountyA string value. Gets or sets the county or jurisdiction. Used in conjunction with City/State
Usage:County = “Bucks”;
N
SPLCA string value. Gets or sets the Standard Point Location Code.
Usage:SPLC = “1234”
N
StateA string value. Gets or sets the state or country name if the Region is outside of the North America.
Usage:State = "PA"
Y(When city specified)
StreetAddressA string value. Gets or sets the house number and/or street name. Premium accounts only have street-level routing.
Usage:StreetAddress = “1030 N. 2nd St.”
N

Region

Represents the Region the location is in.

Member NameValueDescription
AF1Indicates Africa
AS2Indicates Asia
EU3Indicates Europe
NA4Indicates North America
OC5Indicates the Australian continent
SA6Indicates South America
ME7Indicates Middle East

Coords

Represents geographic coordinates, i.e. latitude and longitude.

ElementDefinitionRequired
LatGets or sets the latitude in decimal degrees or decimal degrees as a string.
Usage:Lat = “34.079799”;
Y(When sending coords)
LonGets or sets the longitude in decimal degrees or decimal degrees as a string
Usage:Lon = “-118.412935”;
Y(When sending coords)

StopCosts

The StopCosts structure is used to pass all data associated with any additional costs incurred by stopping at a location. This structure is referenced as part of the StopLocation structure.

ElementDefinitionRequired
CostOfStopA double value. Gets or sets the cost of the stop(in dollars).
Usage:CostOfStop = 10.5;
N
HoursPerStopA double value. Gets or sets a length of time allocated for this stop. The format is in decimal hours.
Usage:HoursPerStop = 2.5;
N
LoadedA boolean value. Gets or sets a value indicating whether the truck is loaded.
Usage:Loaded = true;
N
OnDutyA boolean value. Gets or sets a value indicating whether the truck is on duty.
Usage:onDuty = true;
N
UseOriginA boolean value. Gets or sets a value indicating whether to default all the settings to those associated with the route origin.
Usage:UseOrigin = true;
N

ReportOptions

The ReportOptions structure is used to create route reports.

ElementDefinitionRequired
EstimatedTimeOptionsA system object of type EstimatedTimeOptions. Gets or sets the estimated time options.
Usage:EstimatedTimeOptions timeOpts = new EstimatedTimeOptions()

{

DateAndTime = dateAndTime,

DateOption = DateOption.Specific,

DateOptionSpecified = true,

ETAETD = ETAETDType.Arrival,

ETAETDSpecified = true

};

N
ExchangeRateA double value. Gets or sets the change rate to convert US dollars to Canadian dollars.
Usage:ExchangeRate = 1.5;
N
FuelUnitsAn enumeration of VolumeUnits. Gets or sets the fuel units to gallons(default) or liters. Values:
Member NameValueDescription
Gallons0Indicates U.S. gallons should be used.
Liters1Indicates liters should be used.

Usage:FuelUnits = VolumeUnits.Gallons;
N
IncludeFerryDistanceA boolean value. Gets or sets a value indicating whether or not miles traveled on ferries are included in mileage calculation. The default is true.
Usage:IncludeFerryDistance=false
N
LanguageAn enumeration of Language Type. Gets or sets the language in which the information is to be displayed. The default is ENUS for English United States. Values:
Member NameValueDescription
ENUS0Indicates English - United States.
ENGB1Indicates English - Great Britain.
DE2Indicates German.
FR3Indicates French.
ES4Indicates Spanish.
IT5Indicates Italian.

Usage:Language = LanguageType.DE;
N
RouteCostsA system object of type RouteCosts. Gets or sets the route costs.
Usage:RouteCosts routeCosts = new RouteCosts

{

CostTimeLoaded = 15,

CostTimeLoadedSpecified = true,

FuelEconomyEmpty = 1,

FuelEconomyEmptySpecified = true,

FuelEconomyLoaded = 16,

FuelEconomyLoadedSpecified = true,

PricePerFuelUnit = 3.95,

PricePerFuelUnitSpecified = true,

TruckStyle = TruckStyle.FiftyThreeSemiTrailer,

TruckStyleSpecified = true

};

N
TimeCostsAn object on the typeTimeCosts. Gets or sets the time costs.
Usage:TimeCosts timeCosts = new TimeCosts()

{

BorderWait = 5,

BorderWaitSpecified = true,

BreakInterval = 4,

BreakIntervalSpecified = true,

BreakLength = 2,

BreakLengthSpecified = true

};

N
TollCurrencyAn enumeration of TollCurrency. Gets or sets the toll currency, currently US or CDN Values:
Member NameValueDescription
US0Indicates that the currency should be United States dollars.
CDN1Indicates that the currency should be Canadian dollars.

Usage:TollCurrency = Currency.US;
N
TollDiscountA string value. Gets or sets a string containing the applicable toll discount program. This field is only valid if the user has quarterly toll data privileges and the UseTollData is set to true. Available programs are: 407ETR Transponder, A25 Transponder, BreezeBy,C-Pass, Cruise Card, E-Pass, E-Pass Canada, EXpress Toll, EZ Tag, EZPass, EZPass-NJ, EZPass-WV, FAST LANE, FasTrak, GeauxPass, GO-PASS, Good to Go, I-PASS, I-Zoom, K-TAG, Laredo Trade Tag, Leeway, MACPASS, NC Quick Pass, NEXPRESS TOLL, Palmetto Pass, Peach Pass, PikePass, Quickpass, Smart Tag, StraitPASS, SunPass, TollTag, TxTag, and WabashPass or All.
Usage:TollDiscount = “All”;
N
UseCustomRoadSpeedsA boolean value. Gets or sets a value indicating whether or not to use custom road speeds.
Usage:Use CustomRoadSpeeds = false;
N
UseTollDataA boolean value. Gets or sets a value indicating whether or not toll data should be used.
Usage:UseTollData=false;
N
UseTrafficA boolean value. Gets or sets a value indicating whether or not to use traffic data when calculating transit times.
Usage:UseTraffic=true;
N

EstimatedTimeOptions

EstimatedTimeOptions represents options for generating ETA/ETD in reports.

ElementDefinitionRequired
DateAndTimeA system object of type DateTimeType. Gets or sets the date, time, time of day and time zone information.
Usage:DateTimeType dateAndTime = new DateTimeType()

{

CalendarDate = "10/10/2014",

DayOfWeek =DayOfWeek.Friday,

DayOfWeekSpecified = true,

TimeOfDay = "12:00",

TimeZone = TimeZone.Eastern,

TimeZoneSpecified = true

};

N
DateOptionAn enumeration of DateOption.
Values:
Member NameValueDescription
Current0Indicates that the current system time should be used.
Specific1Indicates that a specific supplied time should be used.
DayOfWeek2Indicates that a day of the week should be used.

Usage:FuelUnits = VolumeUnits.Gallons;
N
ETAETDAn enumeration of ETAETD type.
Values:
Member NameValueDescription
Arrival0Indicates the time is an estimated time of arrival.
Depart1Indicates the time is an estimated time of departure.

Usage:ETAETD = ETAETD.Arrival;
N

TimeCosts

The TimeCosts structure is used to pass all data associated with additional delays associated with the trip. This structure is part of the RouteOptions structure and is valid for the GetReport functionality.

ElementDefinitionRequired
BorderWaitA float value. Gets or sets the additional amount of time at the border to the overall trip.
Usage:BorderWait=5;
N
BreakIntervalA float value. Gets or sets the elapsed time of the trip before a break will be taken. The format is in decimal hours.
Usage:BreakInterval = 4;
N
BreakLengthA float value. Gets or sets the amount of time a break will last. The format is in decimal hours.
Usage:BreakLength = 2;
N
DepartTimeA TimeOfDay object. Gets or sets the start time of the trip. The format is HH:MM A[P]M. This field is conditional, and valid if the RoutingType is Fastest.
Usage:DepartTime = new TimeOfDay()

{

AmPm = AmPmType.AM,

AmPmSpecified = true,

Hour = 10,

HourSpecified = true,

Minute = 15,

MinuteSpecified = true

}

N
RemainingHoursOfServiceA float value. Gets or sets the remaining hours of service at the start of the trip before the driver needs to take a break. The format is in decimal hours.
Usage:RemainingHoursOfService = 2;
N

TimeOfDay

The TimeOfDay structure contains the hour, minute, and AM/PM.

ElementDefinitionRequired
AmPmAn enumeration of AmPmType. Gets or sets the value indicating military, am, or pm.
Values:
Member NameValueDescription
Military0Indicates the time is in 24-hour clock, also known as military format.
AM1Indicates the time in the AM period of the 12-hour clock.
PM2Indicates the time in the PM period of the 12-hour clock.

Usage:AmPm = AmPmType.AM;
N
HourAn integer value. Gets or sets the hour value.
Usage:Hour = 10;
N
MinAn Integer value. Gets or sets the minute value.
Usage:Minute = 30;
N

RouteCosts

The RouteCosts structure represents route cost information associated with a Route and subclasses such as MapRoute and ReportRoute.

ElementDefinitionRequired
CostTimeEmptyA double value. Gets or sets the estimated labor or other cost per hour when empty.
Usage:CostTimeEmpty = 5.5;
N
CostTimeLoadedA double value. Gets or sets the estimated labor or other cost per hour when loaded.
Usage:CostTimeEmpty = 15;
N
FuelEconomyEmptyA double value. Gets or sets the fuel efficiency(distance units per volume units) when empty.
Usage:FuelEconomyEmpty = 1;
N
FuelEconomyLoadedA double value. Gets or sets the fuel efficiency(distance units per volume units) when loaded.
Usage:FuelEconomyLoaded = 16;
N
GreenHouseGasA double value. Gets or sets the greenhouse gas cost in lbs per fuel unit.
Usage:GreenHouseGas = 1;
N
OtherCostPerDistanceUnitEmptyA double value. Gets or sets the maintenance cost per mile when empty.
Usage:OtherCostPerDistanceUnitEmpty = 5;
N
OtherCostPerDistUnitLoadedA double value. Gets or sets the maintenance cost per distance unit when loaded.
Usage:OtherCostPerDistUnitLoaded = 2;
N
PricePerFuelUnitA double value. Gets or sets the price per gallon of fuel.
Usage:PricePerFuelUnit = 3.95;
N
TruckStyleAn enumeration of TruckStyle. Gets or sets the truck style which includes vehicle dimensions and route costs.
Values:
ValueDescription
NoneIndicates that no particular truck style is chosen.
TwentyEightDoubleTrailerIndicates that a 28' double trailer should be used.
FortyStraightTruckIndicates that a 40' straight truck trailer should be used.
FortyEightSemiTrailerIndicates that a 48' semitrailer should be used.
FiftyThreeSemiTrailerIndicates that a 53' semitrailer should be used.
FullSizeVanIndicates a full-size van should be used.
TwentySixStraightTruckIndicates a 26' straight truck should be used.

Usage:TruckStyle = TruckStyle.FiftyThreeSemiTrailer;
N

Route

The Route structure represents a route and all its associated information from the standpoint of a request for either mapping or reporting.

ElementDefinitionRequired
OptionsA system object. Sets the routing options with the RouteOption class. See RouteOptions.
Usage:RouteOptions opts = new RouteOptions(){};
N
RouteIdA string value. Sets the unique route identifier. This may be used to identify routes when reports are created.
Usage:routeID = “PhillytoAC”;
N
StopsA list of the StopLocation object. Sets the collection of stops that make up the route.
Usage:StopLocation [] stops = new StopLocation[3];
Y

RouteOptions

The RouteOptions structure represents options specific to the kind of route to be run.

ElementDefinitionRequired
BordersOpenA boolean value. Gets or sets a value indicating whether borders are open for travel. The default is true.
Usage:bordersOpen = true;
N
ClassOverridesAn enumeration of ClassOverrideType. Gets or sets the enumeration of class overrides. This is an optional field and the default is None.
Values:
Member NameValueDescription
None0Indicates that no class overrides are present. This is the default value.
FiftyThreeFoot1Indicates a 53' class override.
NationalNetwork2Indicates a National Network class override.
FiftyThreeFoot,NationalNetwork3Indicates a FiftyThreeFoot and National Network class override.

Usage:ClassOverrides = ServiceRef.ClassOverrideType.FiftyThreeFoot
N
CustomRoadSpeedsAn array of RoadSpeedBase objects containing custom road speeds per road category in mph. This is an optional field and the default is an empty list.
RoadSpeedBase:
Member NameValueDescription
RoadCategoryInterStateRuralIndicates the road class which is of type RoadType.
Speed35Indicates the speed of the road in mph.

RoadType:
Member NameValue
InterStateRural1
DividedRural3
PrimaryRural4
FerriesRural5
SecondaryRural6
RampRural7
LocalRural6
InterStateUrban10
DividedUrban12
PrimaryUrban13
FerriesUrban14
SecondaryUrban15
RampUrban16
LocalUrban17
N
DistanceUnitsAn enumeration of DistanceUnits. Gets or sets the distance units to miles(default) or kilometers. The unit of measure to calculate route, and when drawing a map, the scale bar legend will use these distance units.
Values:
Members NameValueDescription
Miles0Indicates miles should be used.
Kilometers1Indicates kilometers should be used.

Usage:DistanceUnits = ServiceRef.DistanceUnits.Miles;
N
HazMatTypeAn enumeration of HazMatType. Gets or sets the hazardous material type. The default is none
Values:
Members NameValueDescription
None0Indicates that there is no hazardous material.
General1Indicates general hazardous materials.
Caustic2Indicates caustic hazardous materials.
Explosives3Indicates explosive hazardous materials.
Flammable4Indicates flammable hazardous materials.
Inhalants5Indicates that the hazardous materials are inhalants.
Radioactive6Indicates radioactive hazardous materials.

Usage:HazMatType = ServiceRef.HazMatType.Caustic;
See details in Glossary.
N
HighwayOnlyA boolean value. Gets or sets a value indicating whether to use highways only. Street-level routing is available for premium account only.
Usage:HighwayOnly = true;
N
HubRoutingA boolean value. Gets or sets a value indicating whether or not to enable hub routing. The default is false to disable hub routing.
Usage:HubRouting = true;
N
OverrideRestrictA boolean value. Gets or sets a value indicating whether or not to override truck restrictions. The default is false to keep the restrictions.
Usage:OverrideRestrict = true;
N
RouteOptimizationAn enumeration of RouteOptimizeType. Gets or sets the method by which to optimize the route stops. Default is None
Values:
Members NameValueDescription
None0Indicates to not use any stop optimization.
ThruAll1Indicates that all of the input stops should be resequenced for the most optimal sequence.
DestinationFixed2Indicates that the destination remain fixed, but all other input stops should be resequenced for the most optimal sequence.

Usage:RouteOptimization=RouteOptimizeType.DestinationFixed;
N
RoutingTypeAn enumeration of RoutingType. Gets or sets the type of routing desired. Versions prior to 27 do not support fastest routing, practical will be used if fastest is supplied.
Values:
Members NameValueDescription
Practical0Indicates that routing should be optimized to minimize time and cost.
Shortest1Indicates that routing should be optimized for shortest distance.
Fastest2Indicates that routing should be optimized to minimize time based on supplied estimated time options in conjunction with Inrix traffic data.

Usage:RoutingType=RoutingType.Practical;
N
TollDiscourageA boolean value. Gets or sets a value indicating whether or not tolls should be discouraged on the route. The default is false.
Usage:TollDiscourage=true;
N
TruckCfgA system object. Gets or sets the truck configuration.
Usage:ServiceRef.TruckConfigCfg=new Serv.TruckConfig(){};
N
UseAvoidsAndFavorsA boolean value. Gets or sets a value indicating whether or not to use avoids and favors. Available for premium account types only.
Usage:UseAvoidFavors=false;
N
VehicleTypeAn enumeration of vehicleType. Gets or sets the type of the vehicle.
Values:
Members NameValueDescription
Truck0Indicates a truck.
LightTruck1Indicates a light truck.
Auto2Indicates an automobile.

Usage:VehicleType = ServiceRef.VehicleType.Truck;
N
ElevLimitA boolean value. Gets or sets a value indicating elevation limit when generating a route.
Elevation units can be either meters or feet determined by DistanceUnits.
Limit will be ignored if routing is deemed impractical with the limit, or a stop is located at an elevation higher than the limit.
Usage:elevLimit = true;
N
FerryDiscourageA boolean value. Gets or sets a value indicating Whether or not to avoid ferries while routing. The default is false to disable avoiding ferries.
Usage:FerryDiscourage = true;
N
SideOfStreetAdherenceAn enumeration value. How strict to be in order to avoid the destination being on the opposite side of the street.
Members NameValueDescription
Off0
Minimal1
Moderate2
Average3
Strict4
Adhere5
StronglyAdhere6
Usage:SideOfStreetAdherence = SideOfStreetAdherence.Minimal;
N
GovernorSpeedLimitAn Integer value. Maximum average road speed to use in route calculations that overrides all other road speeds when they are above this value.
Valid value is between 1 and 100 mph, or 1 and 161kph determined by DistanceUnits.
Usage:GovernorSpeedLimit = 50;
N

TruckConfig

The TruckConfig structure is used to pass all data associated with the truck configuration (vehicle dimension, weight and number of axles) for routing and tolls.

ElementDefinitionRequired
AxlesAn integer value. Gets or sets the number of axles on the truck. If TrailerConfig.MaxAxles is also set, then the two values must add up to the total axle count of the vehicle. Acceptable values are 2 through 14. The default value is 5.
Usage:Axles = 2;
N
HeightA string value. Gets or sets the height of the truck in feet and inches, or meters depending upon the units. If TrailerConfig.MaxHeight is also set, then the greater of the two will be used.
Valid range is between 5' and 15' for English Unit, or between 1.524 and 5 meters for Metric Unit.
The default is 13'6" in all regions except Europe, which is 12'6".
Usage:Height = "13'6"
N
LCVA boolean value. Gets or sets a value indicating whether the truck is a multi-trailer or longer combination vehicle. This is used for calculation of toll costs, and only for North region.
Usage:LCV = true;
N
LengthA string value. Gets or sets the length of the truck in feet or meters, depending upon the units.
Valid range is between 8' and 70' for English Unit, or between 2.4384 and 28 meters for Metric Unit.
Default is 48 feet in all regions except Europe, which is 54'1".
Usage:Length = "53'0";
N
UnitsAn enumeration of VehicleDimUnits. Gets or sets the units of measure to be used for the vehicle dimensions.
Values:
Member NameValueDescription
English0Indicates that vehicle dimension units should be English.
Metric1Indicates that vehicle dimension units should be metric.

Usage:Units = VehicleDimUnits.English;
N
WeightA string value. Gets or sets the weight of the truck in pounds or kilos, depending upon units. If TrailerConfig.MaxWeight is also set, then the two values will be added up to determine the total vehicle weight.
Valid range is between 1500 and 156470 lbs for English Unit, or between 680.39 and 60000 kgs for Metric Unit.
The default value is 80,000 pounds for all regions.
Usage:Weight = "132000";
N
WidthA string value. Gets or sets the width of the truck in inches or meters, depending upon units.
Valid range is between 60" and 102" for English Unit, or between 1.524 and 3 meters for Metric Unit.
The default value is 96" for all regions.
Usage:Width = "102\"";
N