API Reference
AutoElite API Documentation
Overview
The AutoElite API provides access to vehicle inventory, dealer information, and other resources. This documentation covers authentication, endpoints, and best practices for integrating with the AutoElite platform.
Base URL
Use the following base URL for all API requests:
https://api.autoelite.io
Note: This is the official API endpoint for all external integrations with the AutoElite platform.
Authentication
API Keys
All requests to the AutoElite API must include an API key. API keys can be obtained from the AutoElite Admin Portal.
API keys can be associated with:
- A specific dealer (access limited to that dealer's data)
- A specific user (access limited to that user's permissions)
- No association (super admin access to all data)
Include your API key in all requests using the X-API-Key header:
X-API-Key: autoelite-web-app-12345
Code Examples
We provide code examples for integrating with the AutoElite API in various programming languages:
Visit our Code Examples page for detailed implementation samples.
For desktop applications, also include the application type:
X-App-Type: desktop
API Key Types
- Web Application Keys: For browser-based applications
- Desktop Application Keys: For desktop software
- Mobile Application Keys: For mobile applications
Each type has different default permissions and security requirements.
Permissions
API keys have resource-based permissions:
read: Allows retrieving datawrite: Allows creating and updating datadelete: Allows deleting data
Permissions are granted per resource (e.g., vehicles, dealers, users).
Dealer-Specific Access
When an API key is associated with a specific dealer:
- Vehicle endpoints automatically filter results to only show vehicles belonging to that dealer
- Attempts to access vehicles from other dealers will be rejected
- New vehicles will automatically be assigned to the dealer associated with the API key
- Updates to vehicles will be restricted to those belonging to the associated dealer
Endpoints
Vehicles
Get All Vehicles
Query Parameters:
dealer_id(optional): Filter by dealer IDstatus(optional): Filter by status (available, sold, pending)featured(optional): Filter by featured status (true, false)limit(optional): Maximum number of results to returnoffset(optional): Number of results to skip (for pagination)
Response:
{
"meta": {
"total": 1,
"filter_applied": true,
"dealer_id": 1,
"timestamp": "2025-12-03T19:52:19.148Z",
"sql": "SELECT * FROM vehicles WHERE 1=1 AND dealer_id = ? ORDER BY created_at DESC"
},
"vehicles": [
{
"id": 32,
"dealer_id": 1,
"make": "Tesla",
"model": "Model Y",
"year": 2025,
"trim": null,
"price": 45000,
"mileage": null,
"exterior_color": null,
"interior_color": null,
"vin": null,
"stock_number": null,
"description": null,
"features": null,
"status": "available",
"featured": 0,
"created_at": "2025-11-28 05:30:15",
"updated_at": "2025-11-28 05:30:15",
"title": null
}
]
}
Get a Specific Vehicle
Response:
{
"id": 1,
"title": "2023 Toyota Camry",
"make": "Toyota",
"model": "Camry",
"year": 2023,
"price": 25000,
"dealer_id": 123,
"mileage": 15000,
"exterior_color": "Blue",
"interior_color": "Black",
"vin": "1HGBH41JXMN109186",
"stock_number": "T12345",
"description": "Well-maintained sedan with low mileage",
"features": "Bluetooth, Backup Camera, Leather Seats",
"status": "available",
"featured": true,
"fuel_type": "Gasoline",
"transmission": "Automatic",
"engine": "2.5L 4-Cylinder",
"drivetrain": "FWD",
"body_style": "Sedan",
"condition": "Used",
"seats": 5,
"created_at": "2023-11-15T14:30:00Z",
"updated_at": "2023-11-15T14:30:00Z"
}
Create a Vehicle
Request Body:
{
"title": "2023 Toyota Camry",
"make": "Toyota",
"model": "Camry",
"year": 2023,
"price": 25000,
"dealer_id": 123,
"mileage": 15000,
"exterior_color": "Blue",
"interior_color": "Black",
"vin": "1HGBH41JXMN109186",
"stock_number": "T12345",
"description": "Well-maintained sedan with low mileage",
"features": "Bluetooth, Backup Camera, Leather Seats",
"status": "available",
"featured": true,
"fuel_type": "Gasoline",
"transmission": "Automatic",
"engine": "2.5L 4-Cylinder",
"drivetrain": "FWD",
"body_style": "Sedan",
"condition": "Used",
"seats": 5
}
Required fields: dealer_id, make, model, year, price
Note: If using a dealer-specific API key, the dealer_id will be automatically set to the dealer associated with the API key.
Response:
{
"id": 1,
"title": "2023 Toyota Camry",
"make": "Toyota",
"model": "Camry",
"year": 2023,
"price": 25000,
"dealer_id": 123,
"status": "available",
"featured": true,
"created_at": "2023-11-15T14:30:00Z",
"updated_at": "2023-11-15T14:30:00Z"
}
Update a Vehicle
Request Body:
{
"price": 24500,
"status": "pending",
"description": "Updated description"
}
Response:
{
"id": 1,
"title": "2023 Toyota Camry",
"make": "Toyota",
"model": "Camry",
"year": 2023,
"price": 24500,
"dealer_id": 123,
"status": "pending",
"description": "Updated description",
"featured": true,
"created_at": "2023-11-15T14:30:00Z",
"updated_at": "2023-11-15T15:45:00Z"
}
Delete a Vehicle
Response:
{
"success": true,
"message": "Vehicle deleted successfully"
}
Vehicle Images
Get Vehicle Images
Response:
[
{
"id": 1,
"vehicle_id": 1,
"image_url": "https://storage.autoelite.io/vehicles/1/image1.jpg",
"is_primary": true,
"display_order": 0,
"created_at": "2023-11-15T14:30:00Z"
},
{
"id": 2,
"vehicle_id": 1,
"image_url": "https://storage.autoelite.io/vehicles/1/image2.jpg",
"is_primary": false,
"display_order": 1,
"created_at": "2023-11-15T14:30:00Z"
}
]
Add Vehicle Image
Request Body:
{
"image_url": "https://storage.autoelite.io/vehicles/1/image3.jpg",
"is_primary": false,
"display_order": 2
}
Response:
{
"id": 3,
"vehicle_id": 1,
"image_url": "https://storage.autoelite.io/vehicles/1/image3.jpg",
"is_primary": false,
"display_order": 2,
"created_at": "2023-11-15T16:00:00Z"
}
Dealers
Get All Dealers
Response:
[
{
"id": 123,
"name": "AutoElite Downtown",
"address": "123 Main St",
"city": "Metropolis",
"state": "NY",
"zip": "10001",
"phone": "555-123-4567",
"email": "downtown@autoelite.com",
"website": "https://downtown.autoelite.com",
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-01T00:00:00Z"
}
]
Get a Specific Dealer
Response:
{
"id": 123,
"name": "AutoElite Downtown",
"address": "123 Main St",
"city": "Metropolis",
"state": "NY",
"zip": "10001",
"phone": "555-123-4567",
"email": "downtown@autoelite.com",
"website": "https://downtown.autoelite.com",
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-01T00:00:00Z"
}
API Keys
Get All API Keys
Query Parameters:
dealer_id(optional): Filter by dealer IDapp_type(optional): Filter by application type (web, desktop, mobile)active(optional): Filter by active status (true, false)
Response:
[
{
"id": 4,
"name": "AutoPret 123 Facebook Integration",
"description": "API key for Facebook Marketplace integration",
"api_key": "autopret123-fb-key-test-2025",
"app_id": "fb-1161979592774488",
"app_type": "server",
"active": 1,
"created_at": "2025-11-28 04:11:27",
"last_used": "2025-11-28 05:04:30",
"expires_at": null,
"dealer_id": 1
}
]
Get API Key by ID
Response:
{
"id": 4,
"name": "AutoPret 123 Facebook Integration",
"description": "API key for Facebook Marketplace integration",
"api_key": "autopret123-fb-key-test-2025",
"app_id": "fb-1161979592774488",
"app_type": "server",
"active": 1,
"created_at": "2025-11-28 04:11:27",
"last_used": "2025-11-28 05:04:30",
"expires_at": null,
"dealer_id": 1,
"permissions": [
{ "resource": "vehicles", "action": "read" },
{ "resource": "facebook-integration", "action": "read" },
{ "resource": "facebook-integration", "action": "write" },
{ "resource": "xml-feed", "action": "read" }
]
}
Create an API Key
Request Body:
{
"name": "Downtown Desktop App",
"description": "API key for downtown dealer desktop application",
"app_type": "desktop",
"app_id": "downtown-desktop",
"dealer_id": 123,
"expires_at": "2024-12-31T23:59:59Z"
}
Response:
{
"id": 2,
"name": "Downtown Desktop App",
"description": "API key for downtown dealer desktop application",
"api_key": "autoelite-desktop-downtown-desktop-a1b2c3d4",
"app_id": "downtown-desktop",
"app_type": "desktop",
"active": true,
"created_at": "2023-11-15T16:30:00Z",
"expires_at": "2024-12-31T23:59:59Z"
}
Update an API Key
Request Body:
{
"name": "Updated Name",
"description": "Updated description",
"active": false
}
Response:
{
"id": 2,
"name": "Updated Name",
"description": "Updated description",
"api_key": "autoelite-desktop-downtown-desktop-a1b2c3d4",
"app_id": "downtown-desktop",
"app_type": "desktop",
"active": false,
"created_at": "2023-11-15T16:30:00Z",
"expires_at": "2024-12-31T23:59:59Z"
}
Revoke an API Key
Response:
{
"success": true,
"message": "API key revoked successfully"
}
Error Handling
The API uses standard HTTP status codes:
200 OK: Request succeeded201 Created: Resource created successfully400 Bad Request: Invalid request parameters401 Unauthorized: Missing or invalid API key403 Forbidden: Insufficient permissions or attempting to access another dealer's data404 Not Found: Resource not found500 Internal Server Error: Server error
Error responses include a JSON body with an error message:
{
"error": "Detailed error message"
}
Rate Limiting
API requests are subject to rate limiting:
- Web applications: 100 requests per minute
- Desktop applications: 300 requests per minute
- Mobile applications: 200 requests per minute
When rate limited, the API will return a 429 Too Many Requests status code.
Best Practices
-
Store API Keys Securely: Never expose API keys in client-side code or public repositories.
-
Handle Errors Gracefully: Always check for and handle error responses.
-
Implement Pagination: When retrieving large collections, use the
limitandoffsetparameters. -
Minimize Request Frequency: Cache responses when appropriate to reduce API calls.
-
Use HTTPS: Always use HTTPS for all API requests.
-
Validate Input: Validate all user input before sending it to the API.
-
Handle Rate Limiting: Implement exponential backoff when encountering rate limits.
-
Use Bulk Operations: For creating, updating, or deleting multiple resources, implement client-side batching as described in our Bulk Operations Guide.