Skip to main content
GET
/
api
/
vehicles
/
offers
Get Vehicles with Offers
curl --request GET \
  --url https://api.example.com/api/vehicles/offers
{
  "vehicles": [
    {}
  ]
}

Request

This endpoint requires no parameters.

Response

Returns an array of vehicles that have offers defined (non-null offers field).
vehicles
Vehicle[]
Array of vehicle objects with active offers

Example

curl -X GET "http://localhost:8080/api/vehicles/offers"

Response Example

[
  {
    "id": 1,
    "reference": "BMW2024A1B2",
    "brand": "BMW",
    "model": "X5",
    "year": 2024,
    "price": 150.00,
    "vehicleType": "SUV",
    "offers": "20% off for weekend rentals"
  },
  {
    "id": 5,
    "reference": "AUD2024C3D4",
    "brand": "Audi",
    "model": "Q7",
    "year": 2024,
    "price": 145.00,
    "vehicleType": "SUV",
    "offers": "Free upgrade on 7+ day rentals"
  }
]
This endpoint filters vehicles where the offers field is not null. To update offers for a vehicle, use the PATCH /api/vehicles/{id}/offers endpoint.

Build docs developers (and LLMs) love