Update a vehicle
https://carchost.fieldcontrol.com.br/vehicles/{id}Updates a vehicle. The body follows the same rules as creation. The success response uses status 201.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Path parameters
idstringrequiredVehicle identifier.
Example: ZmEzZWIyYmQtNTIwYS00Yzc5LWIwZGMtZGQ4YWVmMWIwZjM3OjIyOTE1.
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredVehicle name.
At least 5 characters.
licensePlatestringrequiredVehicle license plate.
registerstringVehicle registration (e.g. Renavam).
typestringrequiredVehicle type. A value outside the list results in a 500 error.
Accepted values: car, motorcycle, truck, nautical, semi_truck.
originstringrequiredVehicle origin. A value outside the list results in a 500 error.
Accepted values: rented, company, employee.
statusstringVehicle status. Default available. A value outside the list results in a 500 error.
Accepted values: available, unavailable.
colorstringVehicle color. A value outside the list results in a 500 error.
Accepted values: yellow, blue, beige, white, bronze, gray, golden, undefined, orange, brown, silver, black, pink, purple, green, red, wine.
yearintegerrequiredVehicle year. Numeric text ("2011") is also accepted and converted.
originalTravelingDistanceintegerrequiredVehicle mileage at registration.
descriptionstringVehicle description.
imageUrlstringURL of the vehicle photo.
qrCodestringVehicle QR code.
archivedbooleanArchives the vehicle.
brandobjectBrand, by id or by name (partial match, uses the first one found). See List brands.
Fields of brand
idstringBrand identifier.
namestringBrand name.
modelobjectModel, by id or by name (partial match, uses the first one found). With name, id can be omitted. See List models.
Fields of model
idstringModel identifier.
namestringModel name.
Responses
- 201
Vehicle updated.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 422
Invalid identifier, or one from another account, in the URL (uriValidationErr), nonexistent vehicle (
resourceValidationErrwithmessage: vehicle not found; there is no 404), invalid body or brand or model not found.resourceValidationErr→ - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error. It also happens when
type,origin,statusorcolorare not in the accepted lists.