Skip to main content
GET
/
api
/
favourites
/
{userId}
curl -X GET https://api.drivex.com/api/favourites/123
[
  {
    "id": 456,
    "make": "Tesla",
    "model": "Model 3",
    "year": 2024,
    "price": 89.99,
    "type": "Sedan",
    "availability": true
  },
  {
    "id": 789,
    "make": "Ford",
    "model": "Mustang",
    "year": 2023,
    "price": 129.99,
    "type": "Sports Car",
    "availability": false
  }
]
This endpoint returns a list of all vehicles that a user has marked as favorites.
userId
long
required
The unique identifier of the user

Response

Returns an array of Vehicle objects. Each vehicle contains full vehicle details.
array
Vehicle[]
Array of favorite vehicles for the specified user
id
long
Unique identifier of the vehicle
make
string
Vehicle manufacturer
model
string
Vehicle model name
year
integer
Vehicle year
price
double
Daily rental price
type
string
Vehicle type (e.g., SUV, Sedan, Truck)
availability
boolean
Whether the vehicle is currently available for rent
curl -X GET https://api.drivex.com/api/favourites/123
[
  {
    "id": 456,
    "make": "Tesla",
    "model": "Model 3",
    "year": 2024,
    "price": 89.99,
    "type": "Sedan",
    "availability": true
  },
  {
    "id": 789,
    "make": "Ford",
    "model": "Mustang",
    "year": 2023,
    "price": 129.99,
    "type": "Sports Car",
    "availability": false
  }
]

Build docs developers (and LLMs) love