Get Driver Trips
Contents
Gets a driver’s trips for up to a 45-day period. The query looks from the startDate
to the endDate
, with a default startDate
of the current time and a default endDate
of 45 days in the future.
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
https://tripmanagement.trimblemaps.com/service.svc/drivertrips/query?startDate={startDate}&pageNumber={pageNumber}&pageSize={pageSize}&routeStatus={routeStatus}
Request Fields
Field | Description | Type | Required |
---|---|---|---|
tspDriverId
| The fleetwide unique identifier of the driver. |
string | Yes |
startDate
| The start date of the 45-day period for a query 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 cannot 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. |
date | No |
endDate
| The end date of the period for a query of trips, which can be up to 45 days from the startDate . 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 is 45 days after the startDate (if provided). If startDate is not provided, the end date is by default 45 days from the current time.
|
date | No |
pageNumber
| Set 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 first page. |
number | No |
pageSize
| The number of trips per page. Default value is 100. |
number | No |
routeStatus
| This field can be used to refine results based on the status of a driver’s trips. Each possible status is represented in the enum below.
|
enum | No |
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
}
];