On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

Method: providers.trips.search

Stay organized with collections Save and categorize content based on your preferences.

Get all the trips for a specific vehicle.

HTTP request

POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/trips:search

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Must be in the format providers/{provider}. The provider must be the Project ID (for example, sample-cloud-project) of the Google Cloud Project of which the service account making this call is a member.

Request body

The request body contains data with the following structure:

JSON representation
{
  "header": {
    object (RequestHeader)
  },
  "vehicleId": string,
  "activeTripsOnly": boolean,
  "pageSize": integer,
  "pageToken": string,
  "minimumStaleness": string
}
Fields
header

object (RequestHeader)

The standard Fleet Engine request header.

vehicleId

string

The vehicle associated with the trips in the request. If unspecified, the returned trips do not contain:

  • currentRouteSegment
  • remainingWaypoints
  • remainingDistanceMeters
  • etaToFirstWaypoint
activeTripsOnly

boolean

If set to true, the response includes Trips that influence a driver's route.

pageSize

integer

If not set, the server decides the number of results to return.

pageToken

string

Set this to a value previously returned in the SearchTripsResponse to continue from previous results.

minimumStaleness

string (Duration format)

If specified, returns the trips that have not been updated after the time (current - minimumStaleness).

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Response body

If successful, the response body contains data with the following structure:

trips.search response message.

JSON representation
{
  "trips": [
    {
      object (Trip)
    }
  ],
  "nextPageToken": string
}
Fields
trips[]

object (Trip)

The list of trips for the requested vehicle.

nextPageToken

string

Pass this token in the SearchTripsRequest to continue to list results. If all results have been returned, this field is an empty string or not present in the response.