AI-generated Key Takeaways
-
Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider, requiring a unique vehicle ID for each vehicle.
-
When creating a
Vehicle
,vehicleState
,supportedTripTypes
,maximumCapacity
, andvehicleType
fields are required; while fields likename
,currentTrips
,availableCapacity
, and route-related fields are ignored. -
Sends a POST request to
https://fleetengine.googleapis.com/v1/{parent=providers/*}/vehicles
to create a vehicle, with the provider specified in the path parameter. -
Requires a
header
for the Fleet Engine request and a uniquevehicleId
in the query parameters, adhering to specified restrictions for thevehicleId
format. -
Includes the
Vehicle
object details in the request body and returns the newly createdVehicle
object in the response body upon successful creation.
Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. Each Vehicle
must have a unique vehicle ID.
The following Vehicle
fields are required when creating a Vehicle
:
vehicleState
supportedTripTypes
maximumCapacity
vehicleType
The following Vehicle
fields are ignored when creating a Vehicle
:
name
currentTrips
availableCapacity
currentRouteSegment
currentRouteSegmentEndPoint
currentRouteSegmentVersion
currentRouteSegmentTraffic
route
waypoints
waypointsVersion
remainingDistanceMeters
remainingTimeSeconds
eta_to_next_waypoint
navigationStatus
All other fields are optional and used if provided.
HTTP request
POST https://fleetengine.googleapis.com/v1/{parent=providers/*}/vehicles
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. Must be in the format |
Query parameters
Parameters | |
---|---|
header |
The standard Fleet Engine request header. |
vehicleId |
Required. Unique Vehicle ID. Subject to the following restrictions:
|
Request body
The request body contains an instance of Vehicle
.
Response body
If successful, the response body contains a newly created instance of Vehicle
.