QHR Developers

Count attendance log rows by status, per day

GET/hr_attendance_log/overview
Read token is enoughView attendance reports attendance/view_reportsRequires feature attendanceAvailable in Claudeattendance_log.overview

Counts the detailed log's rows (one per employee per working day) by day status over the period and for each date: present, late, early leave, still working, missing check-out, absent, on leave. Also lists the rest days (dates that were a weekend or holiday for everyone recorded).

Rows are working days only: weekends and holidays are never rows (a check-in on one still shows as a row). Employees who have since left keep their past rows. Today is partial — absences are recorded each night for the previous day — and future dates appear only where approved leave is already written. A day counts as late when it has a counted late arrival (pending with a manager or HR, or deducted; not one HR excused); late wins over early leave. status is deliberately not a filter here, so the counts show what a status filter would choose between.

When to use: "how many late arrivals were there this month, and on which days?". For per-person totals use attendance_reports.employees; for the rows themselves, attendance_log.records.

Prerequisites: none. department_id and location ids from employees.meta_data.

Side effects: none.

Before you call this

You will need ids that come from these operations:

Parameters

NameInTypeDescriptionExample
fromquerystring (date)First day of the period, YYYY-MM-DD, included. A calendar date in the company's timezone (the timezone set on the company, e.g. Asia/Riyadh), not UTC. Defaults to the first day of the current month in that timezone. from to to may span at most 366 days.2026-07-01
toquerystring (date)Last day of the period, YYYY-MM-DD, included, in the company's timezone. Defaults to the last day of the current month (a future date for most of the month; future days hold no attendance yet, so they change no number). Must be on or after from.2026-07-31
department_idqueryintegerOnly employees of this department (id from employees.meta_data, departments). An id that does not exist answers 422.4
searchquerystringName or employee number contains this text, case-insensitive. The name matched is the full name in the request's language (Accept-Language): the English name for en, the Arabic name for ar.Sara
sourcequerystringOnly rows where the check-in or the check-out came from: mobile (QHR mobile app), web (QHR in a browser), app (QHR app, client not recorded), device (attendance device), manual (entered or adjusted by HR/manager) or system (closed automatically).
Allowed values: mobile, web, app, device, manual, system
mobile
locationquerystringOnly rows punched at this place: a location id (from employees.meta_data, locations) matched on either side, or remote for a check-in or check-out marked remote.remote
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 Counts per status, overall and per day.

FieldTypeDescription
countsobjectRows per status over the whole period; all is their sum.
counts.allintegerEvery row.
counts.presentintegerCompleted on time.
counts.lateintegerLate arrival counted.
counts.early_leaveintegerLeft early (and not late).
counts.workingintegerChecked in, day still open.
counts.missing_check_outintegerChecked in, day over, no check-out.
counts.absentintegerAbsent.
counts.on_leaveintegerOn leave.
daysarray<object>One entry per date that has rows, oldest first, with the same per-status counts.
days[].datestring (date)The day.
days[].presentintegerCompleted on time.
days[].lateintegerLate arrival counted.
days[].early_leaveintegerLeft early (and not late).
days[].workingintegerChecked in, day still open.
days[].missing_check_outintegerChecked in, day over, no check-out.
days[].absentintegerAbsent.
days[].on_leaveintegerOn leave.
rest_daysarray<string>Dates in the period on which every recorded employee had a weekend or a holiday.
periodobjectThe period used, after defaults.
period.fromstring (date)First day.
period.tostring (date)Last day.
todaystring (date)Today in the company's timezone; today's numbers are still partial.

Errors

HTTPCodeMeaningHow to fix
401token_missingNo Authorization: Bearer … header, or it is malformed.Send Authorization: Bearer qhr_… with the full token.
401token_invalidThe token is unknown or wrong, or its owner's account is locked.Check the token was copied in full, or create a new one in QHR › Settings › API & Integrations.
401token_expiredThe token is past its expiry date.Create a new token.
401token_revokedThe token was revoked by its owner or an admin, or the owner was removed from the company (which revokes all their tokens).Create a new token, or ask your admin. If the owner was removed, they must be re-invited to the company first.
401tenant_inactiveThe company account is suspended.Contact QHR support.
403forbiddenThe token owner's role lacks the permission this operation needs.Ask an admin to grant the permission shown on this operation (x-permission).
403employee_inactiveThe token owner's employee record is not active.HR must reactivate the employee record.
403tenant_access_revokedThe token's owner is no longer an active member of this company. Rare: removing a member normally revokes their tokens, which answers 401 token_revoked instead.The owner must be re-invited to the company, then create a new token. If the owner is still a member, contact QHR support.
422validation_failedA filter is not valid: a date not in YYYY-MM-DD, from after to, a period longer than 366 days, a department_id that does not exist, or a status, source or location outside its list. error says which.Fix the parameter named in error and send again.
This endpoint can also return the errors that can happen on any endpoint →402 / 412 / 425 entitlement_blocked · 429 rate_limited · 500 internal_error

See the full error catalogue →