Method: providers.vehicles.create
Stay organized with collections
Save and categorize content based on your preferences.
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 |
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.
|
Query parameters
Parameters |
header |
object (RequestHeader )
The standard Fleet Engine request header.
|
vehicleId |
string
Required. Unique Vehicle ID. Subject to the following restrictions:
- Must be a valid Unicode string.
- Limited to a maximum length of 64 characters.
- Normalized according to Unicode Normalization Form C.
- May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.
|
Request body
The request body contains an instance of Vehicle
.
Response body
If successful, the response body contains a newly created instance of Vehicle
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-18 UTC."],[[["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`, and `vehicleType` fields are required; while fields like `name`, `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 unique `vehicleId` in the query parameters, adhering to specified restrictions for the `vehicleId` format."],["Includes the `Vehicle` object details in the request body and returns the newly created `Vehicle` object in the response body upon successful creation."]]],[]]