GetRouteDetails

Contents

The GetRouteDetails API returns all of the details about a route such as Actuals, GPS Points, Line Items, Orders, Planned Data, Violations, and more. There are three separate calls that you can make to get route details:

  • GetRouteDetailByDateRange
  • GetRouteDetailByModifiedDate
  • GetRouteDetailByPlannedStartDate

Each call uses the same request. However, ByModifiedDate and ByPlannedStartDate do not use the routeDetailSearchByOptionField and default to search by modified date and planned start date, respectively. You can also filter the details returned in your results by setting RouteDetailReturnOptionsFilters.

Schema

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:app="http://schemas.datacontract.org/2004/07/Appian.DRTrack.Entity.Schema.WebService" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetRouteDetailByDateRange>
         <!--Optional:-->
         <tem:auth>
            <!--#### string-->
            <app:authenticationTokenField>dev1-appi-20160617175057-XXIB8E</app:authenticationTokenField>
         </tem:auth>
         <!--Optional:-->
         <tem:requestEnvelope>
            <!--#### string-->
            <app:branchIDField>BAKERY TEST OKC</app:branchIDField>
            <!--#### dateTime-->
            <app:fromDateField>2017-06-16T00:00:00</app:fromDateField>
            <app:routeDetailReturnOptionsField>
               <app:filtersField>
                  <app:dispatchIDListField>
                     <!--Zero or more repetitions:-->
                     <!--#### string-->
                     <!--<arr:string>temperat iras</arr:string>-->
                  </app:dispatchIDListField>
                  <!--#### boolean-->
                  <app:populateActualsDataField>true</app:populateActualsDataField>
                  <!--#### boolean-->
                  <app:populateGPSPointsField>true</app:populateGPSPointsField>
                  <!--#### boolean-->
                  <app:populateLineItemField>true</app:populateLineItemField>
                  <!--#### boolean-->
                  <app:populateLineItemFormsField>true</app:populateLineItemFormsField>
                  <!--#### boolean-->
                  <app:populateOrderField>true</app:populateOrderField>
                  <!--#### boolean-->
                  <app:populateOrderFormsField>true</app:populateOrderFormsField>
                  <!--#### boolean-->
                  <app:populatePlannedDataField>true</app:populatePlannedDataField>
                  <!--#### boolean-->
                  <app:populateQuantityFieldField>true</app:populateQuantityFieldField>
                  <!--#### boolean-->
                  <app:populateRouteFormsField>true</app:populateRouteFormsField>
                  <!--#### boolean-->
                  <app:populateStopField>true</app:populateStopField>
                  <!--#### boolean-->
                  <app:populateUserFieldField>true</app:populateUserFieldField>
                  <!--#### boolean-->
                  <app:populateViolationsField>true</app:populateViolationsField>
                  <app:routeIDListField>
                     <!--Zero or more repetitions:-->
                     <!--#### int-->
                     <arr:int>3</arr:int>
                  </app:routeIDListField>
                  <!--#### RouteType - enumeration: [AllRoute,NotStarted,InProgress,Completed]-->
                  <app:routeTypeField>AllRoute</app:routeTypeField>
               </app:filtersField>
            </app:routeDetailReturnOptionsField>
            <!--#### RouteDetailSearchByOptions - enumeration: [PlannedStart,PlannedEnd,DispatchDate,RoutesModifiedByDispatch,RoutesModifiedByDataPosted,AllRoutesModified]-->
            <app:routeDetailSearchByOptionsField>PlannedStart</app:routeDetailSearchByOptionsField>
            <!--#### dateTime-->
            <app:toDateField>2017-07-20T00:00:00</app:toDateField>
         </tem:requestEnvelope>
      </tem:GetRouteDetailByDateRange>
   </soapenv:Body>
</soapenv:Envelope>

Request Parameters

GetRouteDetailByDateRange

NameDescriptionTypeRequiredSample Value
authOptional, but the import will not work without it.AuthenticationNoSee Authentication
requestEnvelopeOptional, but the import will not work without it.RouteDetailRequestEnvelopeNoSee RouteDetailRequestEnvelope

Authentication

NameDescriptionTypeRequiredSample Value
AuthenticationTokenFieldRetrieved from WS Call GetAuthenticationToken.
string
Yesdev1-appi-20160617175057-XXIB8E

RouteDetailRequestEnvelope

NameDescriptionTypeRequiredSample Value
branchIDFieldThe branch ID that you want to retrieve the routes from.
string
YesMAIN
fromDateFieldThe start date/time range of the request.
dateTime
Yes2019-06-07T08:30:00-06:00
routeDetailReturnOptionsFieldThe types of data to be returned.RouteDetailReturnOptionsYesSee RouteDetailReturnOptions
routeDetailSearchByOptionFieldThe type of date that is searched. See type for options.RouteDetailSearchByOptionsYesSee RouteDetailSearchByOptions
toDateFieldThe end date/time range of the request.
dateTime
Yes2019-06-07T08:30:00-06:00

RouteDetailReturnOptions

NameDescriptionTypeRequiredSample Value
filtersFieldTo filter the data returned.RouteDetailReturnOptionsFiltersYesSee RouteDetailReturnOptionsFilters

RouteDetailReturnOptionsFilters

NameDescriptionTypeRequiredSample Value
DispatchIDListFieldA list of the dispatch IDs to be returned.array of
string
Yes12-OK
populateActualsDataFieldTrue or False. Populates the Route Start/End Fields.
boolean
YesTrue
populateGPSPointsFieldTrue or False. Populates Lat/Long fields.
boolean
YesTrue
populateLineItemFieldTrue or False. Populates Line Item fields.
boolean
YesTrue
populateLineItemFormsFieldTrue or False. Populates Line Item Forms fields.
boolean
YesTrue
populateOrderFieldTrue or False. Populates Order fields.
boolean
YesTrue
populateOrderFormsFieldTrue or False. Populates Order Form fields.
boolean
YesTrue
populatePlannedDataFieldTrue or False. Populates Planned Data field.
boolean
YesTrue
populateQuantityFieldFieldTrue or False. Populates the quantity fields.
boolean
YesTrue
populateRouteFormsFieldTrue or False. Populates the route forms.
boolean
YesTrue
populateStopFieldTrue or False. Populates the stop fields.
boolean
YesTrue
populateUserFieldFieldTrue or False. Populates the user fields.
boolean
YesTrue
populateViolationsFieldTrue or False. Populates the violations fields.
boolean
YesTrue
routeIDListFieldA list of the route numbers to be returned.array of
int
Yes5
routeTypeFieldThe Type of Routes to be returned. See table for options to enter.RouteTypeYesInProgress

RouteType

NameDescription
AllRouteAll Routes.
NotStartedRoutes that have not started.
InProgressRoutes that are currently in progress.
CompletedRoutes that have been completed.

RouteDetailSearchByOptions

NameDescription
PlannedStartPlanned route start time.
PlannedEndPlanned route end time.
DispatchDatePlanned route dispatch date.
RouteModifiedByDispatchDateRoutes that have been modified by dispatch date.
RoutesModifiedByDataPostedRoutes that have been modified by modified date.
AllRoutesModifiedAll routes with recorded modification.

Response Parameters

GetRouteDetailByDateRangeResult

NameDescriptionTypeSample Value
paginationByDateRangeFieldIf too many results, pagination may be required to reduce processing time.PaginationByDateRangeSee PaginationByDateRange
responseStatusFieldThe response of the request.ResponseStatusYes

PaginationByDateRange

NameDescriptionTypeSample Value
fromDateFieldThe beginning date of the pagination.
dateTime
2019-06-07T08:30:00-06:00
toDateFieldThe end date of the pagination.
dateTime
2019-06-07T08:30:00-06:00

ResponseStatus

NameDescriptionTypeSample Value
errorFieldAny errors would be returned here.ArrayOfResponseStatusErrorSee ArrayOfResponseStatusError
warningFieldAny warnings would be returned here.ArrayOfResponseStatusWarningSee ArrayOfResponseStatusWarning

ArrayOfResponseStatusError

NameDescriptionTypeSample Value
ResponseStatusErrorError header.ResponseStatusErrorSee ResponseStatusError

ResponseStatusError

NameDescriptionTypeSample Value
codeFieldThe code number of the error.
int
500
messageFieldThe message of the error that occurred.
string
Server return an error

ArrayOfResponseStatusWarning

NameDescriptionTypeSample Value
ResponseStatusWarningWarning header.ResponseStatusWarningSee ResponseStatusWarning

ResponseStatusWarning

NameDescriptionTypeSample Value
codeFieldThe code number of the warning.
int
100
messageFieldThe message of the warning that occurred.
string
To many results returned. Please make sure to use Pagination.

ArrayofRouteDetailResponseEnvelopeRouteDetail

NameDescriptionTypeSample Value
RouteDetailResponseEnvelopeRouteDetailThe route detail response header.RouteDetailResponseEnvelopeRouteDetailSee RouteDetailResponseEnvelopeRouteDetail

RouteDetailResponseEnvelopeRouteDetail

NameDescriptionTypeSample Value
actualFieldThe actuals of the route.RouteActualDetailTypeSee RouteActualDetailType
planFieldThe planned details of the route.RoutePlanDetailTypeSee RoutePlanDetailType

RouteActualDetailType

NameDescriptionTypeSample Value
delayField
string
356
deviceIDFieldThe ID/name of the device.
string
Phone100
driverIDFieldThe ID of the driver.
string
John123
driverNameFieldThe name of the driver.
string
John Doe
endOdometerFieldThe ending odometer of the route.
int
75309
endTimeFieldThe ending time of the route.
dateTime
2019-06-06T21:06:16Z
gPSPointListFieldThe list of GPS points on the route.ArrayOfGPSPointDetailTypeSee ArrayOfGPSPointDetailType
lastGPSTransmissionTimeFieldThe time of the last GPS transmission.
dateTime
2019-06-06T21:04:50Z
routeFormsListFieldThe forms filled out on the route.ArrayOfRouteFormsDetailTypeSee ArrayOfRouteFormsDetailType
routeIDFieldThe internal ID of the route.
int
321
startOdometerFieldThe starting odometer of the route.
int
120456
startTimeFieldThe starting time of the route.
dateTime
2019-06-06T12:33:56Z
stopFieldThe details of the stop’s actuals.ArrayOfStopActualDetailTypeSee ArrayOfStopActualDetailType
vehicleIDFieldThe ID of the vehicle being used.
string
Truck123

RoutePlanDetailType

NameDescriptionTypeSample Value
delayTimeField
int
356
dispatchDateFieldThe dispatch date of the route.
dateTime
2019-06-06T05:00:00Z
dispatchIDFieldThe dispatchID of the route.
string
1-OKC
endTimeFieldThe planned end time of the route.
dateTime
2019-06-06T19:29:10Z
lastDataPostedField
dateTime
2019-06-16T21:32:49.15
lastDateModifiedFieldThe date the route was last modified.
dateTime
2019-06-16T21:32:49.15
loadDateTimeThe time the route was loaded.
dateTime
2019-06-06T19:29:10Z
routeIDFieldThe internal ID of the route.
dateTime
380
rtNumberFieldThe number of the route.
int
1
startTimeThe planned start time of the route.
dateTime
2019-06-06T19:29:10Z
stopFieldAn array of all the stops on the route.ArrayOfStopPlanDetailTypeSee ArrayOfStopPlanDetailType
totalDistanceCostFieldThe estimated total cost of the route.
float
354.78
totalDistanceFieldThe estimated total distance of the route.
float
75.8
totalDriveHrsFieldThe estimated drive time of the route.
string
PT4H14S
totalStopsFieldThe number of stops on the route.
int
12
totalWorkHrsFieldThe estimated work time of the route.
string
PT6H55M14S

ArrayOfGPSPointDetailType

NameDescriptionTypeSample Value
GPSPointDetailTypeAn array of many GPS data points.GPSPointDetailTypeSee GPSPointDetailType

ArrayOfRouteFormsDetailType

NameDescriptionTypeSample Value
RouteFormsDetailTypeAn array of route form details.RouteFormsDetailTypeSee RouteFormsDetailType

ArrayOfStopActualDetailType

NameDescriptionTypeSample Value
StopActualDetailTypeAn array of each stop actuals data.StopActualDetailTypeSee StopActualDetailType

ArrayOfStopPlanDetailType

NameDescriptionTypeSample Value
StopPlanDetailTypeThe planned stop details.StopPlanDetailTypeSee StopPlanDetailType

GPSPointDetailType

NameDescriptionTypeSample Value
coordinatesFieldThe header of the GPS coordinates.CoordinatesSee Coordinates
GPSTimeFieldThe time of the GPS point.
dateTime
2019-06-06T19:29:10Z
headingFieldThe direction in which the GPS point was heading.
int
180
odometerFieldThe odometer of the vehicle at the time of the GPS point.
float
123456
satellitesFieldNo longer in use.
int
Not in use.
speedFieldThe speed of the vehicle at the time of the GPS point.
int
65

RouteFormsDetailType

NameDescriptionTypeSample Value
createdDateTimeFieldThe dateTime the form value was entered.
dateTime
2019-06-06T19:29:10Z
fieldNameFieldThe name of the field on the form.
string
DriverID
formNameFieldThe name of the form.
string
Driver Login
formValueFieldThe value of the field listed in fieldNameField.
string
Driver1

StopActualDetailType

NameDescriptionTypeSample Value
actualStopIDFieldThe ID given to the stop actual.
int
283
coordinatesFieldThe header of the GPS coordinates.CoordinatesSee Coordinates
delayTimeFieldThe time the vehicle was delayed.
string
26
durationFieldThe time the vehicle was at the stop.
string
33
endTimeFieldThe end time the vehicle was at the stop.
dateTime
2019-06-16T22:10:23Z
inprogressFieldIf the truck is currently at the stop.
boolean
False
legFieldThe leg that the truck is on.
int
1
odometerFieldThe mileage on the truck at the stop.
float
123456
orderFieldThe order detail actuals.ArrayOfOrderDetailActualDetailTypeSee ArrayOfOrderDetailActualDetailType
sequenceFieldThe sequence of the actual.
int
12
startTimeFieldThe start time the vehicle was at the stop.
dateTime
2019-06-16T21:36:26Z
stopIDFieldThe ID of the stop that actual stop is tied to.
int
153

Coordinates

NameDescriptionTypeSample Value
latitudeFieldThe latitude of the GPS point.
float
35.45658
longitudeFieldThe longitude of the GPS point.
float
-97.59814

ArrayOfOrderDetailActualDetailType

NameDescriptionTypeSample Value
OrderDetailActualDetailTypeAn array of the order information on the actuals.OrderDetailActualDetailTypeSee OrderDetailActualDetailType

OrderDetailActualDetailType


NameDescriptionTypeSample Value
accountKeyIDFieldThe internal issued account key ID.
int
45
lineItemFieldThe line item detail actuals.ArrayOfLineItemDetailActualTypeSee ArrayOfLineItemDetailActualType
OrderIDFieldThe order ID.
string
PO123
orderKeyIDFieldThe internal key ID of the order.
int
1534
shipToKeyIDFieldThe ship to key ID of the order.
int
1

ArrayOfLineItemDetailActualType

NameDescriptionTypeSample Value
LineItemDetailActualTypeAn array of the line item actuals.LineItemDetailActualTypeSee LineItemDetailActualType

LineItemDetailActualType

NameDescriptionTypeSample Value
actualFieldThe line item actuals.LineItemActualTypeSee LineItemActualType
lineItemIDFieldThe ID of the line item on the order.
string
SKU456
lineItemKeyIDFieldThe internal Key ID of the line item.
int
2

LineItemActualType

NameDescriptionTypeSample Value
quantityFieldListFieldHeader of quantities for line item.ArrayOfQuantityFieldListQuantityFieldSee ArrayOfQuantityFieldListQuantityField
formListFieldHeader of forms for the line item.ArrayOfFormListFieldSee ArrayOfFormListField
lineItemPhotoListFieldHeader of the photos attached to the line item.ArrayOfPhotoResourceSee ArrayOfPhotoResource
lineItemSignatureListFieldHeader of the signatures attached to the line item.ArrayOfSignatureResourceSee ArrayOfSignatureResource

ArrayOfQuantityFieldListQuantityField

NameDescriptionTypeSample Value
QuantityFieldListQuantityFieldAn array of the quantities on the line item.QuantityFieldListQuantityFieldSee QuantityFieldListQuantityField

ArrayOfFormListField

NameDescriptionTypeSample Value
FormListFieldAn array of the forms on the line item.FormListFieldSee FormListField

ArrayOfPhotoResource

NameDescriptionTypeSample Value
PhotoResourceAn array of photo details.PhotoResourceSee PhotoResource

ArrayOfSignatureResource

NameDescriptionTypeSample Value
SignatureResourceAn array of signature captures.SignatureResourceSee SignatureResource

QuantityFieldListQuantityField

NameDescriptionTypeSample Value
nameFieldThe name of the quantity field.
string
Cube
unloadRateFieldThe unload rate of the quantity.
float
1.65
valueFieldThe value of the quantity.
float
1.65

FormListField

NameDescriptionTypeSample Value
nameFieldThe name field of the form item.
string
Item_Condition
valueFieldA string array of the values.array of
string

PhotoResource

NameDescriptionTypeSample Value
createdFieldThe time the photo was created/taken.
dateTime
2019-06-16T22:18:24Z
gUIDFieldAn ID given to the photo.
string
2d82903b-5e4c-4988-9949-4592a941396e
URLFieldA URL to view the photo.
string
http://resource.appiangps.com/api/Resources/
DescriptionFieldA description of the photo.
string
mimeFieldThe type of photo it is.
string
image/png
subjectFieldThe subject of the photo.
string
POD

SignatureResource

NameDescriptionTypeSample Value
createdFieldThe time the signature was created/taken.
dateTime
2019-06-16T22:18:24Z
gUIDFieldAn ID given to the signature.
string
2d82903b-5e4c-4988-9949-4592a941396e
URLFieldA URL to view the signature.
string
http://resource.appiangps.com/api/Resources/
DescriptionFieldA description of the signature.
string
mimeFieldThe type of signature it is.
string
image/png
subjectFieldThe subject of the signature.
string
POD

StopPlanDetailType

NameDescriptionTypeSample Value
accountIDFieldThe ID given to the account.
string
A1
actualStopIDFieldThe ID of the stop actual.
int
684
breakTimeFieldThe time of the break after this planned stop.
string
0
customTimeWindowFieldA time window just for this stop and not the account.ArrayOfTimeWindowTypeSee ArrayOfTimeWindowType
delayTimeField
string
25
distanceFieldThe distance (in miles) to travel to get to this stop.
float
6
endTimeFieldThe planned end time.
dateTime
2019-06-16T22:10:00Z
estimateEndTimeFieldThe estimated end time calculated after actuals.
dateTime
2019-06-16T22:10:00Z
estimateStartTimeFieldThe estimated start time calculated after actuals.
dateTime
2019-06-16T22:10:00Z
fixedTimeFieldFixed time at the stop.
string
10
hasTimeActualField
boolean
False
hasTimeViolationFieldTrue, if the stop has a time violation.
boolean
False
isTerminalFieldTrue, if this stop is the terminal.
boolean
False
layoverTimeFieldTime of a layover after this stop.
string
0
legFieldThe leg of the route this stop is on.
int
1
orderFieldThe planned order detail.ArrayOfOrderDetailPlanDetailTypeSee ArrayOfOrderDetailPlanDetailType
sequenceFieldThe sequence number of the stop.
int
2
shipToAddressFieldThe ship to address.AddressTypeSee AddressType
startTimeFieldThe planned start time.
dateTime
2019-06-16T22:10:00Z
stopIDFieldThe internal ID given to the stop.
int
1234
violationsFieldThe violations on the stop.array Of string]
waitTimeFieldThe wait time before delivering this stop.
string
5

ArrayOfTimeWindowType

NameDescriptionTypeSample Value
TimeWindowTypeThe custom time window of the stop.TimeWindowTypeSee TimeWindowType

ArrayOfOrderDetailPlanDetailType

NameDescriptionTypeSample Value
OrderDetailPlanDetailTypeThe planned order detail.OrderDetailPlanDetailTypeSee OrderDetailPlanDetailType

AddressType

NameDescriptionTypeSample Value
address1FieldThe address 1 field.
string
123 Main St.
address2FieldThe address 2 field.
string
Apt 2
cityFieldThe city field.
string
Oklahoma City
coordinatesFieldThe coordinates for the ship to address.CoordinatesSee Coordinates
stateFieldThe state field of the address.
string
Oklahoma
zipCodeFieldThe zip code of the address
string
73160-1234

TimeWindowType

NameDescriptionTypeSample Value
closeFieldThe close time of the time window.
dateTime
2019-06-16T08:00:00Z
openFieldThe open time of the time window.
dateTime
2019-06-16T17:00:00Z
patternFieldThe pattern of the time window.
string
SMTWRFA

OrderDetailPlanDetailType

NameDescriptionTypeSample Value
accountIDFieldThe ID given to the account.
string
A1
accountKeyIDFieldThe internal issued account key ID.
int
356
eqCodeFieldThe equipment code for the order.
string
LG
lineItemFieldThe line items for the order.ArrayOfLineItemDetailPlanTypeSee ArrayOfLineItemDetailPlanType
orderIDFieldThe ID given to the order.
string
SO123
orderKeyIDFieldThe internal ID given to the order.
int
1234
orderStatusFieldThe current status of the order. See type for returned options.See OrderStatusTypeERPToDRTrack
shipToKeyIDFieldThe key ID for the ship to address.
int
2

OrderStatusType

NameSample Value
ERPToDRTrackThe order was imported into DRTrack.
DRTrackToDirectRouteThe order has been sent to Direct Route.
DirectRouteToDRTrackThe order was imported to DRTrack from DirectRoute.
ExportedOrderThe order has been exported.
UnknownUnknown.

ArrayOfLineItemDetailPlanType

NameDescriptionTypeSample Value
LineItemDetailPlanTypeThe line item details.LineItemDetailPlanTypeSee LineItemDetailPlanType

LineItemDetailPlanType

NameDescriptionTypeSample Value
lineItemIDFieldThe line item ID given to DRTrack.
string
001
lineItemKeyIDFieldThe internal key given to the line item.
int
1546
planFieldThe line item planned quantities and user fields.LineItemPlanTypeSee LineItemPlanType

LineItemPlanType

NameDescriptionTypeSample Value
quantityFieldListFieldThe quantities of the line item.ArrayOfQuantityFieldListQuantityFieldSee ArrayOfQuantityFieldListQuantityField
userFieldListFieldThe user fields of the line item.ArrayOfUserFieldListUserFieldSee ArrayOfUserFieldListUserField

ArrayOfUserFieldListUserField

NameDescriptionTypeSample Value
UserFieldListUserFieldThe user fields on the line item.UserFieldListUserFieldSee UserFieldListUserField

UserFieldListUserField

NameDescriptionTypeSample Value
nameFieldThe name of the user field.
string
Comments
valueFieldThe value of the user field.
string
Enter comment here.
Last updated November 19, 2019.