Changes the owner, make, color or image of a saved vehicle of the application's organization, or adds it to a vehicle group, and returns it.
Input. A JSON body, or multipart/form-data when you upload an image file. vehicleId is required. Every other field is optional and a field you omit keeps its value. owner, make and color take null to clear them (JSON only). groupId adds the vehicle to an existing vehicle group; it stays in its other groups. file or imageUrl replaces the image, with the same rules as Create a vehicle.
Response. 200 with the vehicle as stored.
Notes. The license plate cannot be changed: sending licensePlate answers 400; delete the vehicle and create it with the new license plate. An unsaved vehicle answers 400; save it first. A private vehicle that is not shared with the access token answers 404.
Side effects. When the owner, make or color changes, the vehicle groups that contain the vehicle are sent again to the Cores that use them. A replaced image is deleted. The previous values cannot be restored.
Request examples
PUT /v3/vehicle-api/vehicles
{ "vehicleId": 1093527491036451, "owner": "John Doe" }PUT /v3/vehicle-api/vehicles
{ "vehicleId": 1093527491036451, "make": null, "color": null, "groupId": "6512bd43d9caa6e02c990b0a" }PUT /v3/vehicle-api/vehicles (multipart/form-data)
vehicleId=1093527491036451
[email protected]
Required scope: write:vehicles
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400The body is invalid: a missing or invalid vehicleId, a licensePlate (it cannot be changed), an unsaved vehicle, an owner over 100 characters, an unknown make or color, a groupId that is not a 24-character id, both file and imageUrl, an image that is not a readable JPEG, PNG or WebP file or is over 50 megapixels, or an imageUrl that cannot be downloaded.
404Vehicle or vehicle group not found in this organization.
413The image file is larger than 10 MB.
429Too many requests. Try again later.
500Internal server error.
