---
title: "Update a vehicle"
method: PATCH
path: "/v1/locations/{locationId}/vehicles/{vehicleId}"
tags: ["Vehicles"]
---

# Update a vehicle

`PATCH /v1/locations/{locationId}/vehicles/{vehicleId}`

## Request

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

Changes only the fields in the request. Either all of them are changed or none. See `VehicleUpdate` for how to clear a field.

## Path parameters

- `locationId` string, required
- `vehicleId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- VehicleUpdate: A JSON merge patch: send only what changes. A field you leave out keeps its value; a field set to `null` is cleared, but a vehicle must keep a `registrationNumber` or a `description`.
  - `description` string, nullable: What the vehicle is called in Cliento, such as `The red van`.
  - `notes` string, nullable: Staff-facing notes, at most 1000 characters.
  - `registrationNumber` string, nullable: The registration number, one to seven characters.

## Response `200`

OK

- Vehicle: Represents a vehicle a location works on. Belongs to one location.
  - `colour` string: From the vehicle register.
  - `createdAt` string, date-time
  - `description` string: 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.
  - `externalReference` string: Your own id for it, as sent when it was created.
  - `id` string, required
  - `locationId` string, required
  - `make` string: From the Swedish vehicle register, when staff have looked the vehicle up in Cliento. Not set through the API.
  - `model` string: From the vehicle register.
  - `modelYear` integer: From the vehicle register.
  - `notes` string: Staff-facing notes, at most 1000 characters.
  - `registrationNumber` string: The registration number, one to seven characters.
  - `updatedAt` string, date-time

## Other responses

- `default`: Any failure. See the Errors section.

---

[API](https://skmtc.dev/cliento/apis/cliento-api.md) · [All operations](https://skmtc.dev/cliento/apis/cliento-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cliento/apis/cliento-api/revisions/29ca811bc061?raw)
