curl -X POST "http://localhost:8080/api/vehicles" \ -H "Content-Type: application/json" \ -d '{ "brand": "BMW", "model": "X5", "hp": 335, "autonomy": 650, "averageconsumption": 8.5, "description": "Luxury SUV with advanced features", "price": 65000.00, "year": 2024, "fuelType": "diesel", "mileage": 15000, "extras": "Navigation, Leather seats, Sunroof", "doors": 5, "vehicleType": "SUV", "offers": "Yes" }'
{ "id": 42, "reference": "BMW2024A1B2", "brand": "BMW", "model": "X5", "hp": 335, "autonomy": 650, "averageconsumption": 8.5, "description": "Luxury SUV with advanced features", "price": 65000.00, "year": 2024, "fuelType": "diesel", "mileage": 15000, "extras": "Navigation, Leather seats, Sunroof", "createdAt": "2024-03-01T15:30:00", "updatedAt": "2024-03-01T15:30:00", "doors": 5, "vehicleType": "SUV", "offers": "Yes", "images": [] }
Add a new vehicle to the system
reference
{BRAND}{YEAR}{RANDOM}