Overview
The Dashboard Analytics API provides aggregated statistics and performance metrics for your dealership operations. Get real-time insights into sales, inventory, and customer metrics with flexible time period filtering.Endpoints
Get Dashboard Statistics
/analytics/dashboard/stats
Time period for statistics calculation. Options:
last7days- Last 7 dayslast30days- Last 30 days (default)last90days- Last 90 daysthisWeek- Current week (Monday-Sunday)lastWeek- Previous weekthisMonth- Current calendar monthlastMonth- Previous calendar month
Current period value
Previous period value for comparison
Absolute change between periods
Percentage change between periods
Trend direction:
up, down, stableUnit of measurement (days, MAD, %, etc.)
Get Inventory Turnover Chart Data
/analytics/inventory-turnover
Time period for chart data (same options as dashboard stats)
Metrics Explained
Average Days to Sell
What it measures: The average number of days from when a vehicle is listed until it’s sold. Formula:Total Days in Inventory / Number of Vehicles Sold
Good trend: ⬇️ Lower is better - indicates faster sales
Industry benchmark: 30-45 days
Average Selling Price
What it measures: The mean sale price of vehicles sold during the period. Formula:Total Revenue / Number of Vehicles Sold
Good trend: ⬆️ Higher indicates better pricing or premium inventory
Use case: Track pricing strategy effectiveness
Gross Profit Margin
What it measures: The percentage of revenue remaining after subtracting the cost of goods sold. Formula:((Revenue - COGS) / Revenue) × 100
Good trend: ⬆️ Higher margins indicate better profitability
Industry benchmark: 15-20%
Average Age of Inventory
What it measures: The average number of days vehicles have been in inventory. Formula:Sum of (Days Since Added) / Total Vehicles in Inventory
Good trend: ⬇️ Lower indicates fresher inventory
Alert threshold: > 60 days (aging inventory)
Inventory Turnover Ratio
What it measures: How many times inventory is sold and replaced over a period. Formula:Cost of Goods Sold / Average Inventory Value
Good trend: ⬆️ Higher turnover means more efficient operations
Industry benchmark: 6-12 times per year
Customer Satisfaction Score
What it measures: Average customer rating from feedback and reviews. Scale: 1-5 stars Good trend: ⬆️ Higher scores indicate better customer experience Target: 4.5+Customer Retention Rate
What it measures: Percentage of customers who return for repeat business. Formula:(Repeat Customers / Total Customers) × 100
Good trend: ⬆️ Higher retention reduces acquisition costs
Industry benchmark: 60-70%
Total Repair Cost
What it measures: Total amount spent on vehicle repairs and refurbishment. Good trend: ⬇️ Lower costs improve margins (but don’t compromise quality) Use case: Budget planning and cost controlTime Period Comparisons
The API automatically compares each metric against the previous equivalent period:| Current Period | Comparison Period |
|---|---|
| last7days | Previous 7 days |
| last30days | Previous 30 days |
| last90days | Previous 90 days |
| thisWeek | Last week |
| lastWeek | Week before last |
| thisMonth | Last month |
| lastMonth | Month before last |
Caching
Dashboard statistics are cached for 5 minutes to optimize performance. Subsequent requests within this window will return cached data. To force a refresh, wait for the cache to expire or use cache-busting techniques.Use Cases
Example 1: Weekly Performance Review
Example 2: Monthly Business Review
Example 3: Quarterly Analysis
Example 4: Visualize Inventory Trends
Integration Patterns
Real-time Dashboard
Trend Alerts
Best Practices
Choose appropriate time periods
Choose appropriate time periods
Use shorter periods (7 days) for operational metrics, longer periods (90 days) for strategic decisions.
Monitor trends, not just values
Monitor trends, not just values
Focus on the
trend and changePercentage fields to identify improving or declining performance.Set up automated alerts
Set up automated alerts
Configure alerts when metrics exceed thresholds (e.g., days to sell > 45).
Respect cache timing
Respect cache timing
The 5-minute cache improves performance. Don’t poll more frequently than necessary.
Compare like periods
Compare like periods
Ensure you’re comparing equivalent time periods (e.g., same day of week, same month).
Error Codes
| Code | Status | Description |
|---|---|---|
INVALID_PERIOD | 400 | Invalid time period specified |
INSUFFICIENT_DATA | 400 | Not enough data for the requested period |
ANALYTICS_SERVICE_ERROR | 500 | Error calculating statistics |