Create a vehicle
https://carchost.fieldcontrol.com.br/vehiclesRegisters a vehicle. Brand and model can be given by identifier or by name.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
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 created.
brandandmodelcome back as they were sent or, when given by name, with theidandnamefound. - 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 body (resourceValidationErr) or brand or model not found by name (
reason: not found). - 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.