Vehicles

Update a vehicle

Replaces vehicle data. All fields are optional – only provided fields are updated.

put/vehicles/{id}

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/vehicles/{id}
  • Auth: none declared

Path parameters

idinteger required

Numeric resource identifier

Request body

makestring nullable

Vehicle manufacturer / brand

modelstring

Vehicle model name

yearinteger nullable

Manufacturing year

fuel_tank_capacitynumber float nullable

Fuel tank capacity in litres (positive number)

Example request

{
  "make": "Toyota",
  "model": "Camry",
  "year": 2025,
  "fuel_tank_capacity": 60
}

Response

Vehicle updated successfully

idinteger required

Unique vehicle identifier

makestring nullable

Vehicle manufacturer / brand

modelstring required

Vehicle model name

yearinteger nullable

Manufacturing year

fuel_tank_capacitystring nullable

Fuel tank capacity in litres. Returned as a decimal string (e.g. "51.1") because Postgres numeric/decimal is serialised as a string by the pg driver.

Example response

{
  "id": 1,
  "make": "Suzuki",
  "model": "S4",
  "year": 2021,
  "fuel_tank_capacity": "51.1"
}

Changes

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