Dynamic Reports API

The Dynamic Reports API is the most flexible reporting endpoint, allowing you to specify exactly which columns to include in your report and choose between summary and detailed views.

Endpoint

POST: https://api.ag.prodoscore.com/query/reports/dynamic_report

Request Payload

{ "start_date": "2025-03-01", "end_date": "2025-03-10", "group_id": "team-123", "user_id": "user-456", "summary": false, "columns": [ "attendance_date", "identity_id", "first_name", "last_name", "email", "punch_in", "punch_out", "punch_duration", "online_duration", "active_duration", "active_percent", "idle_duration", "break_duration", "productive_duration", "unproductive_duration", "neutral_duration", "manager", "group_name" ], "download_type": "csv", "page": 1, "limit": 100 }

Key Parameters

summary (boolean): When true, returns one row per employee with aggregated metrics across the date range. When false, returns one row per employee per day for granular detail.

columns (array): List of columns to include in the response. Available columns:

  • Employee info: identity_id, first_name, last_name, email, manager, group_name
  • Attendance: attendance_date, punch_in, punch_out, shift_start, shift_end
  • Duration metrics: punch_duration, online_duration, active_duration, idle_duration, break_duration
  • Activity percent: active_percent
  • Productivity: productive_duration, unproductive_duration, neutral_duration

download_type: Format for the response: "csv", "xls", or "json". Defaults to JSON if omitted.

Summary vs. Detailed Mode

Summary Mode (summary: true):

{ "summary": true, "columns": ["email", "punch_duration", "active_duration", "productive_duration"] }

Result: One row per employee with total punch_duration, total active_duration, total productive_duration across the entire date range.

Detailed Mode (summary: false):

{ "summary": false, "columns": ["attendance_date", "email", "punch_duration", "active_duration"] }

Result: Multiple rows per employee (one per day) showing daily breakdowns.

Response Format (JSON Example)

[ { "attendance_date": "2025-03-01", "identity_id": "emp-123", "email": "john.doe@company.com", "punch_duration": 28800, "active_duration": 24120, "productive_duration": 19296 }, { "attendance_date": "2025-03-02", "identity_id": "emp-123", "email": "john.doe@company.com", "punch_duration": 30600, "active_duration": 25920, "productive_duration": 20736 } ]

Common Use Cases

  • Payroll Export: Request summary: true with columns email, punch_duration to export total hours per employee
  • Daily Timesheet: Request summary: false with columns attendance_date, email, punch_duration, break_duration for detailed daily records
  • Productivity Analysis: Request both summary and detailed views with all productivity columns to analyze trends over time
Tip: Keep your column list focused. Requesting all available columns in every call slows performance. Include only the columns you actually need.