Analytics API
Legal spend tracking, budget forecasting, and executive dashboards.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /analytics/dashboard | Dashboard summary |
GET | /analytics/spend | Legal spend data |
GET | /analytics/forecast | Budget forecast |
GET | /analytics/activity | Activity feed |
Dashboard Summary
GET /api/v1/analytics/dashboard{
"contracts": {
"total": 42,
"active": 28,
"draft": 8,
"expired": 6
},
"signatures": {
"total_sent": 156,
"completed": 142,
"pending": 14,
"completion_rate": 91.0
},
"compliance": {
"tasks_pending": 5,
"tasks_resolved": 47
},
"vendors": {
"total": 12,
"high_risk": 1
}
}Legal Spend
GET /api/v1/analytics/spend?period=monthly&months=6{
"period": "monthly",
"data": [
{"month": "2025-10", "spend": 12500, "contracts": 4},
{"month": "2025-11", "spend": 18200, "contracts": 7},
{"month": "2025-12", "spend": 15800, "contracts": 5}
],
"total_spend": 46500,
"average_per_contract": 2906
}Budget Forecast
AI-powered budget prediction.
GET /api/v1/analytics/forecast?months_ahead=3{
"forecast": [
{"month": "2026-04", "predicted_spend": 16200, "confidence": 0.85},
{"month": "2026-05", "predicted_spend": 17100, "confidence": 0.78},
{"month": "2026-06", "predicted_spend": 16800, "confidence": 0.72}
],
"trend": "stable"
}