Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

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-chart
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
staffIdsstring[]required

Array 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.

timeFramestringrequired

Time 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:todayweekmonthquarter
groupUsersstring

Display 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:individualtotal
Responses
200

Goal insights data in structured JSON format with goal progress and value distribution sheets

goalProgressobjectrequired

Goal progress sheet data: Employee time tracking goals (attendance, booked, billable) with goals and actuals

Show properties
headersstring[]required

Column headers for the sheet

rowsobject[]required

Data rows as array of objects, where keys match headers. Each row represents one employee or aggregated total.

titleobjectrequired

Sheet title information with main title and subtitle

metadataobjectrequired

Metadata about the query execution and results

valueDistributionobjectrequired

Value distribution sheet data: Breakdown of hours by value groups (A, B, C, D)

Show properties
headersstring[]required

Column headers for the sheet

rowsobject[]required

Data rows as array of objects, where keys match headers. Each row represents one employee or aggregated total.

titleobjectrequired

Sheet title information with main title and subtitle

400

Invalid request parameters (invalid time frame, enum values, etc.)

401

Unauthorized - Invalid or missing authentication token

403

User does not have permission to view goal insights (requires Insights.viewGoalInsights)

404

One or more staff IDs not found or user does not have access to them

Try it
Server
Authorization
Parameters
Request
curl -X GET "https://leadtime.app/api/public/insights/goal-chart?staffIds=%5B%227acff2df-a904-4323-adcc-c2f24a769bde%22%5D&timeFrame=month" \
  -H "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"
    }
  }
}