Vehicles

Create a vehicle

Creates a vehicle at the location. Send an externalReference, your own id for the vehicle, to make the call safe to repeat. When a vehicle at the location already has that reference, that vehicle is returned unchanged with 200 and nothing is created. A vehicle with a registration number that another vehicle at the location already has is normally refused with duplicate.

post/v1/locations/{locationId}/vehicles

Request

  • Base URL: https://api.cliento.com
  • URL: https://api.cliento.com/v1/locations/{locationId}/vehicles
  • Auth: HTTP bearer

Path parameters

locationIdstring required

Headers

Idempotency-Keystring

A value you make up for this one request, such as a UUID. Send the same value when you retry and the first answer is returned; see Retrying safely.

Request body

descriptionstring

What the vehicle is called in Cliento, such as The red van.

externalReferencestring

Your own id for it, at most 100 characters, such as its id in your system. It makes the create safe to repeat and lets you find it again. Compared exactly, letter case included.

notesstring

Staff-facing notes, at most 1000 characters.

registrationNumberstring

The registration number, one to seven characters.

Example request

{
  "description": "The red van",
  "externalReference": "crm-88121",
  "registrationNumber": "ABC123"
}

Response

A vehicle with this externalReference already existed.

colourstring

From the vehicle register.

createdAtstring date-time
descriptionstring

What the vehicle is called in Cliento. A lookup in the vehicle register fills it in with the make, model, colour and year; staff can change it.

externalReferencestring

Your own id for it, as sent when it was created.

idstring required
locationIdstring required
makestring

From the Swedish vehicle register, when staff have looked the vehicle up in Cliento. Not set through the API.

modelstring

From the vehicle register.

modelYearinteger

From the vehicle register.

notesstring

Staff-facing notes, at most 1000 characters.

registrationNumberstring

The registration number, one to seven characters.

updatedAtstring date-time

Example response

{
  "colour": "Red",
  "description": "The red van",
  "externalReference": "crm-88121",
  "id": "veh_3Ks7pQx2Wn9Tb4Vd6HyRcE",
  "locationId": "loc_4fK9xQ2mLr8TzB1vNc7HdW",
  "make": "Volvo",
  "model": "V60",
  "modelYear": 2021,
  "registrationNumber": "ABC123"
}

Changes

No recorded changes to this operation across all 1 revision of this API.