Pagination & Filtering
Query parameters for filtering and paginating API responses
Catalog Endpoints
Catalog endpoints (/cars, /locations, /categories, /addons, /features) return the full list of resources without pagination. For most car rental businesses, these lists are small enough to fetch in a single request.
Filtering
Cars
GET /api/v1/cars?categoryId=cat_abc123
GET /api/v1/cars?featured=true
GET /api/v1/cars?withPrices=true| Parameter | Description |
|---|---|
categoryId | Filter by category ID |
featured | Only featured vehicles (includes starting prices) |
withPrices | Include startingFromPrice for all vehicles |
Addons
GET /api/v1/addons?carId=car_abc123| Parameter | Description |
|---|---|
carId | Filter addons by vehicle scope (returns car + category + all-scoped addons) |
Without carId, only globally-scoped addons are returned.
Settings
GET /api/v1/settings?locale=el| Parameter | Description |
|---|---|
locale | Return labels in the specified locale (e.g., el for Greek) |
Bookings
The bookings list endpoint (GET /api/v1/bookings) is admin-only (session auth) and does not support pagination via the public API.
Caching Recommendations
Catalog data changes infrequently. Cache these responses client-side:
| Endpoint | Suggested Cache TTL |
|---|---|
| Settings | 5 minutes |
| Locations | 15 minutes |
| Categories | 15 minutes |
| Features | 15 minutes |
| Cars | 5 minutes |
| Addons | 15 minutes |
Use the catalog.updated webhook event to invalidate cached data when changes are made in the admin dashboard.