Introduction
The Vehicles API provides comprehensive endpoints for managing your vehicle inventory throughout the entire vehicle lifecycle - from initial listing to final sale. This includes vehicle data management, damage tracking, inspection coordination, and status updates.Key Features
Inventory Management
Create, update, search, and filter your vehicle inventory with advanced search capabilities
Damage Tracking
Record and manage damage assessments with detailed reporting and cost estimation
Inspection Integration
Connect with AI-powered inspection services for automated damage detection
Status Workflow
Track vehicles through statuses: LOADING, INSPECTED, SOLD with full history
Vehicle Lifecycle
API Endpoints
Vehicle Management
| Endpoint | Method | Description |
|---|---|---|
/vehicles | GET | List all vehicles with filters and pagination |
/vehicles/{id} | GET | Get vehicle details by ID |
/vehicles | POST | Create a new vehicle |
/vehicles/{id} | PATCH | Update vehicle information |
/vehicles/{id} | DELETE | Delete a vehicle |
Search & Filter
| Endpoint | Method | Description |
|---|---|---|
/vehicles/public | GET | Get published public vehicles |
/vehicles/status/{status} | GET | Filter by purchase status |
/vehicles/make/{make} | GET | Filter by vehicle make |
/vehicles/location/{location} | GET | Filter by location |
/vehicles/search/{q} | GET | Full-text search across vehicles |
Damage Management
| Endpoint | Method | Description |
|---|---|---|
/vehicles/{id}/complete | PUT | Complete vehicle data with damages and analytics |
/vehicles/{id}/damages | POST | Add damage record to vehicle |
/vehicles/{id}/damages/{damageId} | DELETE | Remove damage record |
/vehicles/{id}/estimate-damages | POST | Trigger AI damage estimation |
Inspection Workflow
| Endpoint | Method | Description |
|---|---|---|
/vehicles/phase/preprocess/{id} | POST | Attach preprocessing job to vehicle |
/vehicles/webhooks/ml-results | POST | Webhook for ML processing results |
Vehicle Object Schema
Query Parameters
Filtering Options
All list endpoints support the following filters:search- Global search across make, model, locationmake- Filter by vehicle makemodel- Filter by vehicle modelminPrice/maxPrice- Price range filterminYear/maxYear- Year range filterminKm/maxKm- Mileage range filterfuel- Filter by fuel typegearBox- Filter by transmission typelocation- Filter by locationpurchaseStatus- Filter by status (LOADING, INSPECTED, SOLD)published- Filter by publication statusarchive- Filter by archive status
Pagination & Sorting
page- Page number (default: 1)limit- Items per page (default: 10, max: 100)sortBy- Sort field (price, overviewYear, km, createdAt)sortOrder- Sort direction (asc, desc)
Purchase Status Workflow
Status Transitions
1
LOADING
Vehicle is being added to inventory. Images and details are being collected.
2
INSPECTED
Vehicle has been inspected. Damage reports and condition assessments are complete.
3
SOLD
Vehicle has been sold. Transaction complete.
Damage Object Schema
Severity Levels
minor- Cosmetic damage, minimal repair neededmoderate- Visible damage requiring professional repairsevere- Structural damage requiring significant work
Rate Limits
Vehicle API endpoints follow the standard rate limits:| Plan | Requests/Hour | Burst Limit |
|---|---|---|
| Free | 1,000 | 50 |
| Starter | 10,000 | 200 |
| Professional | 100,000 | 1,000 |
| Enterprise | Unlimited | Custom |
Error Codes
| Code | Description |
|---|---|
VEHICLE_NOT_FOUND | Vehicle ID does not exist |
VEHICLE_ALREADY_SOLD | Cannot modify sold vehicles |
UNAUTHORIZED_VEHICLE_ACCESS | User does not own this vehicle |
INVALID_PURCHASE_STATUS | Invalid status transition |
DUPLICATE_IMMATRICULE | License plate already exists |
Best Practices
Always validate vehicle data before creation
Always validate vehicle data before creation
Ensure all required fields are provided and valid. Use the schema validation to prevent errors.
Use pagination for large inventories
Use pagination for large inventories
For inventories with 1000+ vehicles, always use pagination with reasonable page sizes (10-50).
Leverage caching for public listings
Leverage caching for public listings
Public vehicle listings are cached for 5 minutes. Use this to optimize performance.
Track status transitions
Track status transitions
Maintain audit logs of status changes for compliance and business intelligence.