Get Driver Trips

Trip Management’s Get Driver Trips API gets a driver’s trips for a 45-day period that begins at the entered startDate. The pageSize and pageNumber parameters can be set if you want your application to page through a large number of query results.

Users of this API must perform authentication using a token that is associated with the specified tspDriverId, not with an API key, because this API returns trips specific to a driver.

GET /service.svc/drivertrips/query?startDate={startDate}&pageNumber={pageNumber}&pageSize={pageSize}

Resource URL{startDate}&pageNumber={pageNumber}&pageSize={pageSize}

Request Fields

tspDriverIdThe fleetwide unique identifier of the driver.
startDateThe start date of the 45-day period for which you want a list of trips. If a trip has an actual start date, it is used to perform the comparison. If a trip does not have an actual start date, planned start date will be used. If planned start date can’t be found, then the date the trip was created will be used. Any trip after the start date can be a candidate.
The value must be in ISO-8601 format, for example: 2017-09-19T07:35:21-05:00
Default value is the current time.
routeStatusSet if you would only like trips with a specific status returned. A single status or a combination of status codes can be queried. Status codes include:
  • Planned = 1
  • Dispatched = 2
  • InProgress = 4
  • Completed = 8
  • Canceled = 16
  • Declined = 32
  • Deleted = 64
  • ReceivedByClient = 128
Default value is the combination of all above.
pageNumberSet if you would like to call one page at a time to more efficiently page through a large number of result. Each page will include the number of trips set by the pageSize parameter.
Default value is 1 - the fist page.
pageSizeThe number of trips per page.
Default value is 100.

Sample Response

    name: "test_driver_trips",
    plannedStartTime: "2020-04-01T15:07:06+00:00",
    actualStartDate: null,
    tripStatus: "Completed",
    createdOn: "2020-04-01T15:07:16+00:00",
    ownerId: 501405469,
    alkTripId: 29584786
    name: "",
    plannedStartTime: "2020-04-01T14:07:04+00:00",
    actualStartDate: null,
    tripStatus: "Planned",
    createdOn: "2020-04-01T14:07:37+00:00",
    ownerId: 501405469,
    alkTripId: 29584773