Method: providers.deliveryVehicles.patch
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
將更新後的DeliveryVehicle
資料寫入 Fleet Engine,並將 Tasks
指派給 DeliveryVehicle
。您無法更新「DeliveryVehicle
」的名稱。您可以更新 remainingVehicleJourneySegments
,但其中必須包含所有要在 DeliveryVehicle
上保留的 VehicleJourneySegment
。taskId
會從 remainingVehicleJourneySegments
擷取,如果尚未指派,系統會將其對應的 Tasks
指派給 DeliveryVehicle
。
HTTP 要求
PATCH https://fleetengine.googleapis.com/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
deliveryVehicle.name |
string
這是這輛運輸車輛的專屬名稱,格式為 providers/{provider}/deliveryVehicles/{vehicle} 。
|
查詢參數
參數 |
header |
object (DeliveryRequestHeader )
選用設定。標準 Delivery API 要求標頭。
|
updateMask |
string (FieldMask format)
必要欄位。欄位遮罩,指出要更新哪些 DeliveryVehicle 欄位。請注意,updateMask 必須包含至少一個欄位。 這是以半形逗號分隔的完整欄位名稱清單。範例:"remainingVehicleJourneySegments" 。
|
要求主體
要求主體包含 DeliveryVehicle
的例項。
回應主體
如果成功,回應主體會包含 DeliveryVehicle
的執行例項。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\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,[]]