Skip to main content

How to Get a Trip ID

Learn how to obtain a Trip ID to manage trips.

Requirements

  • You need to have a valid Trip resource.

The tripId can be retrieved from the Trip resource name key. This resource is returned by the StartTrip API which has been previously called for starting a Dott vehicle:

{
"endDetails": {
"acceptedRelocationFee": true,
"duration": 0,
"endTimestamp": "2019-08-24T14:15:22Z",
"tripEndReason": "TRIP_END_REASON_UNSPECIFIED"
},
"name": "trips/{tripId}",
"startTimestamp": "2019-08-24T14:15:22Z",
"state": "TRIP_STATE_ACTIVE",
"userId": "string",
"vehicleType": "VEHICLE_TYPE_BICYCLE"
}
note

You can rely on the tripId to always be the last segment of the name property.