Skip to main content

Create a vehicle

POSThttps://carchost.fieldcontrol.com.br/vehicles

Registers a vehicle. Brand and model can be given by identifier or by name.

Requires the X-Api-Key, User-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

namestringrequired

Vehicle name.

At least 5 characters.

licensePlatestringrequired

Vehicle license plate.

registerstring

Vehicle registration (e.g. Renavam).

typestringrequired

Vehicle type. A value outside the list results in a 500 error.

Accepted values: car, motorcycle, truck, nautical, semi_truck.

originstringrequired

Vehicle origin. A value outside the list results in a 500 error.

Accepted values: rented, company, employee.

statusstring

Vehicle status. Default available. A value outside the list results in a 500 error.

Accepted values: available, unavailable.

colorstring

Vehicle 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.

yearintegerrequired

Vehicle year. Numeric text ("2011") is also accepted and converted.

originalTravelingDistanceintegerrequired

Vehicle mileage at registration.

descriptionstring

Vehicle description.

imageUrlstring

URL of the vehicle photo.

qrCodestring

Vehicle QR code.

archivedboolean

Archives the vehicle.

brandobject

Brand, by id or by name (partial match, uses the first one found). See List brands.

Fields of brand
idstring

Brand identifier.

namestring

Brand name.

modelobject

Model, by id or by name (partial match, uses the first one found). With name, id can be omitted. See List models.

Fields of model
idstring

Model identifier.

namestring

Model name.

Responses

  • 201

    Vehicle created. brand and model come back as they were sent or, when given by name, with the id and name found.

  • 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, status or color are not in the accepted lists.