Get goal insights data in structured JSON format
What are Goal Insights? Goal Insights provides detailed analysis of employee time tracking goal progress, showing how team members perform against their attendance, booked hours, and billable hours targets. This helps managers track productivity, identify employees who need support, and ensure team members are meeting their performance goals.
What data is returned: The response includes two “sheets” of data in JSON format (matching the Excel export structure):
- Goal Progress sheet: Employee time tracking goals with goal and actual values for:
- Attendance (optional, based on workspace settings)
- Booked hours (total time logged)
- Billable hours (chargeable time logged)
- Value Distribution sheet: Breakdown of hours by value groups (A, B, C, D) showing how time is categorized by value
Supported display modes:
- INDIVIDUAL mode: One row per employee showing their individual goals and actuals. Perfect for tracking individual performance.
- TOTAL mode: Single aggregated row with combined totals across all selected employees. Useful for team-level overview.
Time frame options:
- TODAY: Current day’s goal progress
- WEEK: Current week’s goal progress
- MONTH: Current month’s goal progress
- QUARTER: Current quarter’s goal progress
Goal types explained:
- Attendance Goal: Target hours for employee presence (if attendance tracking is enabled)
- Booked Goal: Target hours for total time logged (all work activities)
- Billable Goal: Target hours for chargeable/billable work (revenue-generating activities)
Value groups: Hours are categorized into value groups based on project and task settings:
- Group A: Highest value work (premium projects/tasks)
- Group B: High value work
- Group C: Standard value work
- Group D: Lower value work
Special features:
- Attendance columns are conditionally included based on workspace settings (only shown if attendance tracking is enabled)
- All headers and titles are fully localized based on user’s language preference
- Human-readable employee names (never UUIDs)
- Goal vs actual comparison makes it easy to identify performance gaps
Use cases:
- Track individual employee goal achievement
- Monitor team-level goal performance
- Identify employees who need support to meet goals
- Analyze value group distribution to optimize time allocation
- Export to Excel for performance reviews and reporting
GET
/insights/goal-chartAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredQuery parameters
staffIdsany[][]requiredArray of staff member (employee) UUIDs to analyze. Can select single employee for detailed analysis or multiple employees for comparison. At least one employee is required. Goal data comes from employee goal settings and time tracking records.
timeFramestringrequiredTime period for goal analysis. `TODAY` analyzes current day's goal progress, `WEEK` analyzes current week, `MONTH` analyzes current month, and `QUARTER` analyzes current quarter. Goals are compared against actual time logged during the selected period.
Allowed:
todayweekmonthquartergroupUsersstringDisplay mode for goal data. `INDIVIDUAL` shows one row per employee with their individual goals and actuals (default), perfect for tracking individual performance. `TOTAL` shows a single aggregated row with combined totals across all selected employees, useful for team-level overview.
Allowed:
individualtotalResponses
200Goal insights data in structured JSON format with goal progress and value distribution sheets
goalProgressobjectrequiredGoal progress sheet data: Employee time tracking goals (attendance, booked, billable) with goals and actuals
Show propertiesHide properties
headersstring[]requiredColumn headers for the sheet
rowsobject[]requiredData rows as array of objects, where keys match headers. Each row represents one employee or aggregated total.
titleobjectrequiredSheet title information with main title and subtitle
metadataobjectrequiredMetadata about the query execution and results
valueDistributionobjectrequiredValue distribution sheet data: Breakdown of hours by value groups (A, B, C, D)
Show propertiesHide properties
headersstring[]requiredColumn headers for the sheet
rowsobject[]requiredData rows as array of objects, where keys match headers. Each row represents one employee or aggregated total.
titleobjectrequiredSheet title information with main title and subtitle
400Invalid request parameters (invalid time frame, enum values, etc.)
401Unauthorized - Invalid or missing authentication token
403User does not have permission to view goal insights (requires Insights.viewGoalInsights)
404One or more staff IDs not found or user does not have access to them
Request
curl -X GET "https://leadtime.app/api/public/insights/goal-chart?staffIds=7acff2df-a904-4323-adcc-c2f24a769bde&timeFrame=month" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/insights/goal-chart?staffIds=7acff2df-a904-4323-adcc-c2f24a769bde&timeFrame=month", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/insights/goal-chart?staffIds=7acff2df-a904-4323-adcc-c2f24a769bde&timeFrame=month",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"goalProgress": {
"headers": [
"Employee",
"Attendance Goal",
"Attendance Actual",
"Booked Goal",
"Booked Actual",
"Billable Goal",
"Billable Actual"
],
"rows": [
{
"Attendance Actual": 152,
"Attendance Goal": 160,
"Billable Actual": 115,
"Billable Goal": 120,
"Booked Actual": 148,
"Booked Goal": 160,
"Employee": "John Doe"
},
{
"Attendance Actual": 160,
"Attendance Goal": 160,
"Billable Actual": 125,
"Billable Goal": 120,
"Booked Actual": 160,
"Booked Goal": 160,
"Employee": "Jane Smith"
}
],
"title": {
"main": "Goal Insights - Multiple Staff",
"subtitle": "This Month | Individual"
}
},
"metadata": {
"attendanceEnabled": true,
"queryExecutionTime": 234,
"totalEmployeesProcessed": 2
},
"valueDistribution": {
"headers": [
"Employee",
"Attendance Goal",
"Attendance Actual",
"Booked Goal",
"Booked Actual",
"Billable Goal",
"Billable Actual"
],
"rows": [
{
"Attendance Actual": 152,
"Attendance Goal": 160,
"Billable Actual": 115,
"Billable Goal": 120,
"Booked Actual": 148,
"Booked Goal": 160,
"Employee": "John Doe"
},
{
"Attendance Actual": 160,
"Attendance Goal": 160,
"Billable Actual": 125,
"Billable Goal": 120,
"Booked Actual": 160,
"Booked Goal": 160,
"Employee": "Jane Smith"
}
],
"title": {
"main": "Goal Insights - Multiple Staff",
"subtitle": "This Month | Individual"
}
}
}Invalid request parameters (invalid time frame, enum values, etc.)
Unauthorized - Invalid or missing authentication token
User does not have permission to view goal insights (requires Insights.viewGoalInsights)
One or more staff IDs not found or user does not have access to them