Method: providers.deliveryVehicles.patch
Stay organized with collections
Save and categorize content based on your preferences.
Writes updated DeliveryVehicle
data to Fleet Engine, and assigns Tasks
to the DeliveryVehicle
. You cannot update the name of the DeliveryVehicle
. You can update remainingVehicleJourneySegments
, but it must contain all of the VehicleJourneySegment
s to be persisted on the DeliveryVehicle
. The taskId
s are retrieved from remainingVehicleJourneySegments
, and their corresponding Tasks
are assigned to the DeliveryVehicle
if they have not yet been assigned.
HTTP request
PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
deliveryVehicle.name |
string
The unique name of this Delivery Vehicle. The format is providers/{provider}/deliveryVehicles/{vehicle} .
|
Query parameters
Parameters |
header |
object (DeliveryRequestHeader )
Optional. The standard Delivery API request header.
|
updateMask |
string (FieldMask format)
Required. A field mask that indicates which DeliveryVehicle fields to update. Note that the updateMask must contain at least one field. This is a comma-separated list of fully qualified names of fields. Example: "remainingVehicleJourneySegments" .
|
Request body
The request body contains an instance of DeliveryVehicle
.
Response body
If successful, the response body contains an instance of DeliveryVehicle
.
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 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003eUpdates \u003ccode\u003eDeliveryVehicle\u003c/code\u003e data and assigns \u003ccode\u003eTasks\u003c/code\u003e in Fleet Engine, requiring all \u003ccode\u003eVehicleJourneySegment\u003c/code\u003es for persistence.\u003c/p\u003e\n"],["\u003cp\u003eSupports updating \u003ccode\u003eremainingVehicleJourneySegments\u003c/code\u003e and assigns corresponding \u003ccode\u003eTasks\u003c/code\u003e retrieved from it.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003ePATCH\u003c/code\u003e method with a URL containing the \u003ccode\u003eDeliveryVehicle\u003c/code\u003e name for identification.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003eheader\u003c/code\u003e for Delivery API requests and \u003ccode\u003eupdateMask\u003c/code\u003e specifying fields to update.\u003c/p\u003e\n"],["\u003cp\u003eProvides a response containing the updated \u003ccode\u003eDeliveryVehicle\u003c/code\u003e instance upon successful completion.\u003c/p\u003e\n"]]],["This describes updating `DeliveryVehicle` data within Fleet Engine using a PATCH request. The request targets a specific vehicle via its unique name in the URL. It updates fields defined by the `updateMask`, which is required. The `remainingVehicleJourneySegments` can be updated, including all segments. Corresponding `Tasks` are assigned to the vehicle if not already assigned. The request body contains updated `DeliveryVehicle` data, and the response body returns the updated `DeliveryVehicle` if the update is successful. The vehicle name cannot be updated.\n"],null,["# Method: providers.deliveryVehicles.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n\nWrites updated `DeliveryVehicle` data to Fleet Engine, and assigns `Tasks` to the `DeliveryVehicle`. You cannot update the name of the `DeliveryVehicle`. You *can* update `remainingVehicleJourneySegments`, but it must contain all of the `VehicleJourneySegment`s to be persisted on the `DeliveryVehicle`. The `taskId`s are retrieved from `remainingVehicleJourneySegments`, and their corresponding `Tasks` are assigned to the `DeliveryVehicle` if they have not yet been assigned.\n\n### HTTP request\n\n`PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------------------|---------------------------------------------------------------------------------------------------------------------|\n| `deliveryVehicle.name` | `string` The unique name of this Delivery Vehicle. The format is `providers/{provider}/deliveryVehicles/{vehicle}`. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[DeliveryRequestHeader](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryRequestHeader)`)` Optional. The standard Delivery API request header. |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. A field mask that indicates which `DeliveryVehicle` fields to update. Note that the updateMask must contain at least one field. This is a comma-separated list of fully qualified names of fields. Example: `\"remainingVehicleJourneySegments\"`. |\n\n### Request body\n\nThe request body contains an instance of [DeliveryVehicle](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.deliveryVehicles#DeliveryVehicle).\n\n### Response body\n\nIf successful, the response body contains an instance of [DeliveryVehicle](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.deliveryVehicles#DeliveryVehicle)."]]