Attendance API

The Attendance API provides two endpoints for retrieving employee attendance data: one for daily details and one for monthly summaries.

Daily Attendance Endpoint

Endpoint: POST https://api.ag.prodoscore.com/query/reports/daily_attendance_details

Description: Returns per-employee daily attendance records with punch-in/out times, shift compliance, and duration metrics.

Request Payload:

{ "start_date": "2025-03-01", "end_date": "2025-03-10", "group_id": "team-123", "user_id": "user-456", "page": 1, "limit": 50 }

Response Fields (per employee, per day):

  • date — Attendance date (YYYY-MM-DD format)
  • name — Employee full name
  • email — Employee email address
  • shift — Assigned shift name
  • arrival_status — One of: "early", "on_time", "late"
  • punch_in — Actual punch-in timestamp
  • punch_out — Actual punch-out timestamp
  • departure_status — One of: "early", "on_time", "late"
  • punch_duration — Total seconds from punch-in to punch-out
  • online_duration — Seconds employee was online (including break time)

Monthly In/Out Endpoint

Endpoint: POST https://api.ag.prodoscore.com/query/reports/monthly_inout_attendance

Description: Returns a month-by-month summary of punch-in/out events for payroll and compliance.

Request Payload:

{ "start_date": "2025-01-01", "end_date": "2025-03-31", "group_id": "team-123", "user_id": "user-456", "page": 1, "limit": 50 }

Response Fields (per employee, per month):

  • employee_id — Unique employee identifier
  • employee_name — Full name
  • month — Month in YYYY-MM format
  • logs — Array of daily records with: date, punch_in, punch_out, punch_duration (seconds), att_status (P for present, A for absent), workplace (full_day or half_day)

Common Query Parameters

date_range Parameters:

  • start_date (required) — Beginning of date range (YYYY-MM-DD)
  • end_date (required) — End of date range (YYYY-MM-DD)

Filter Parameters:

  • group_id (optional) — Filter by team ID. Omit for all teams.
  • user_id (optional) — Filter by employee ID. Omit for all employees.

Pagination Parameters:

  • page (optional, default: 1) — Results page number
  • limit (optional, default: 50, max: 500) — Records per page

Example Request (cURL)

curl -X POST https://api.ag.prodoscore.com/query/reports/daily_attendance_details \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "start_date": "2025-03-01", "end_date": "2025-03-10", "limit": 100 }'

Error Handling

401 Unauthorized: Your access token has expired or is invalid. Use your refresh token to get a new one (see API Authentication & Authorization).
403 Forbidden: Your user account does not have permission to view this data. Ensure your API user has Admin role and access to the requested teams.
400 Bad Request: Check your payload for missing required fields or invalid date formats. Dates must be YYYY-MM-DD.