Skip to main content
GET
/
api
/
vehicles
/
brand
Get Vehicles by Brand
curl --request GET \
  --url https://api.example.com/api/vehicles/brand
{
  "vehicles": [
    {}
  ],
  "id": 123,
  "reference": "<string>",
  "brand": "<string>",
  "model": "<string>",
  "year": 123,
  "price": {},
  "vehicleType": "<string>",
  "hp": 123,
  "autonomy": 123,
  "averageconsumption": 123,
  "fuelType": "<string>",
  "mileage": 123,
  "doors": 123,
  "description": "<string>",
  "extras": "<string>",
  "offers": "<string>",
  "images": [
    {}
  ]
}

Request

brand
string
required
The brand name to filter vehicles by

Response

vehicles
Vehicle[]
Array of vehicle objects matching the specified brand

Vehicle Object

id
Long
Unique identifier for the vehicle
reference
string
Auto-generated reference code (e.g., BMW2024A1B2)
brand
string
Vehicle manufacturer brand
model
string
Vehicle model name
year
integer
Manufacturing year
price
BigDecimal
Daily rental price
vehicleType
string
Type of vehicle (e.g., SUV, Sedan, Coupe)
hp
integer
Horsepower
autonomy
integer
Autonomy in kilometers (for electric vehicles)
averageconsumption
double
Average fuel consumption
fuelType
string
Type of fuel (e.g., Gasoline, Diesel, Electric)
mileage
Long
Current vehicle mileage
doors
integer
Number of doors
description
string
Vehicle description
extras
string
Additional features and equipment
offers
string
Current promotional offers
images
VehicleImage[]
Array of vehicle images (OneToMany relationship)

Example

curl -X GET "http://localhost:8080/api/vehicles/brand?brand=BMW"

Response Example

[
  {
    "id": 1,
    "reference": "BMW2024A1B2",
    "brand": "BMW",
    "model": "X5",
    "year": 2024,
    "price": 150.00,
    "vehicleType": "SUV",
    "hp": 340,
    "fuelType": "Gasoline",
    "doors": 5
  },
  {
    "id": 2,
    "reference": "BMW2023C4D5",
    "brand": "BMW",
    "model": "M3",
    "year": 2023,
    "price": 180.00,
    "vehicleType": "Sedan",
    "hp": 503,
    "fuelType": "Gasoline",
    "doors": 4
  }
]
This endpoint filters vehicles by exact brand match. Use /api/vehicles/search?q={query} for partial matching across both brand and model.

Build docs developers (and LLMs) love