List vehicles
Returns the six sample vehicles with category, transmission, capacity, and daily USD price.
JavaScript example
const response = await rentalMockApi.request('/api/v1/vehicles');
const result = await response.json();
console.log(response.status, result.data);
Example success response JSON
{
"data": [{
"id": "corolla",
"name": "Toyota Corolla",
"category": { "code": "compact", "label": "Compact" },
"specifications": {
"transmission": "Automatic",
"passengers": 5,
"luggage": { "large": 2, "small": 1 },
"fuelType": "Hybrid"
},
"pricing": {
"currency": "USD",
"dailyRate": 54,
"includedMileageKmPerDay": 250,
"securityDeposit": 300,
"airportServiceFee": 18
},
"availability": {
"status": "available",
"pickupLocationIds": ["budapest-airport", "cluj-airport"]
},
"rating": { "average": 4.8, "reviewCount": 126 },
"features": ["Apple CarPlay", "Cruise control", "Rear camera"]
}],
"meta": {
"pagination": { "page": 1, "pageSize": 10, "totalItems": 6, "totalPages": 1 },
"sorting": { "field": "name", "direction": "asc" },
"currency": "USD"
}
}
Response appears here after a mock call.
Get one vehicle
Returns a single car by ID. The example ID corolla maps to the Toyota Corolla card on the UI page.
JavaScript example
const response = await rentalMockApi.request('/api/v1/vehicles/corolla');
const vehicle = await response.json();
Example success response JSON
{
"data": {
"vehicle": { "id": "corolla", "name": "Toyota Corolla" },
"pickupLocations": [{
"id": "budapest-airport",
"name": "Budapest Airport",
"city": "Budapest",
"countryCode": "HU",
"timezone": "Europe/Budapest"
}],
"insuranceOptions": [
{ "code": "basic", "dailyPrice": 0, "currency": "USD", "excess": 1200 },
{ "code": "plus", "dailyPrice": 14, "currency": "USD", "excess": 350 }
],
"policies": {
"minimumDriverAge": 21,
"minimumLicenseYears": 2,
"crossBorderTravel": "approval-required"
}
},
"meta": { "resource": "vehicle", "version": "v1", "requestId": "req-demo-..." }
}
Response appears here after a mock call.
Search availability
Checks a fictional route and date range. The mock validates required fields and that drop-off follows pick-up.
Request body
{
"pickupLocation": "budapest-airport",
"dropoffLocation": "cluj-airport",
"pickupDate": "2026-11-10",
"dropoffDate": "2026-11-12"
}
JavaScript example
const response = await rentalMockApi.request('/api/v1/search', {
method: 'POST',
body: searchCriteria
});
Example success response JSON
{
"data": {
"search": {
"id": "search-demo-1042",
"status": "complete",
"criteria": {
"pickupLocation": "budapest-airport",
"dropoffLocation": "cluj-airport",
"pickupDate": "2026-11-10",
"dropoffDate": "2026-11-12"
}
},
"availability": { "totalCount": 6, "availableCount": 6, "unavailableCount": 0 },
"results": [{
"vehicleId": "corolla",
"category": { "code": "compact", "label": "Compact" },
"price": {
"currency": "USD",
"durationDays": 2,
"baseAmount": 108,
"fees": [{ "code": "airport-service", "amount": 18 }],
"estimatedTax": 10.08,
"estimatedTotal": 136.08,
"securityDeposit": 300
}
}],
"priceSummary": { "currency": "USD", "lowestEstimatedTotal": 136.08, "highestEstimatedTotal": 196.56 }
},
"meta": { "pagination": { "page": 1, "pageSize": 10, "totalItems": 6, "totalPages": 1 } }
}
Response appears here after a mock call.
Create a sample reservation
Returns a fictional confirmation. No real reservation or personal data is sent or stored.
Request body
{
"vehicleId": "corolla",
"pickupLocation": "budapest-airport",
"dropoffLocation": "cluj-airport",
"pickupDate": "2026-11-10",
"dropoffDate": "2026-11-12"
}
JavaScript example
const response = await rentalMockApi.request('/api/v1/reservations', {
method: 'POST',
body: reservationRequest
});
Example created response JSON
{
"data": {
"reservation": {
"id": "reservation-demo-2048",
"confirmationCode": "QA-TRAINING-2048",
"status": "confirmed",
"vehicle": { "id": "corolla", "name": "Toyota Corolla" },
"rentalPeriod": {
"pickupDate": "2026-11-10",
"dropoffDate": "2026-11-12",
"durationDays": 2
},
"locations": {
"pickup": { "id": "budapest-airport", "countryCode": "HU" },
"dropoff": { "id": "cluj-airport", "countryCode": "RO" }
},
"pricing": {
"currency": "USD",
"baseAmount": 108,
"fees": [{ "code": "airport-service", "amount": 18 }],
"estimatedTax": 10.08,
"estimatedTotal": 136.08,
"securityDeposit": 300
},
"payment": { "status": "not-charged", "method": null },
"nextSteps": ["Review the sample confirmation"]
}
},
"meta": { "resource": "reservation", "version": "v1", "requestId": "req-demo-..." }
}
Response appears here after a mock call.