Vehicles

Get vehicle by ID

Returns a single vehicle by its numeric ID.

get/vehicles/{id}

Request

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

Path parameters

idinteger required

Numeric resource identifier

Response

Vehicle found

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.