API reference
Every endpoint is listed below, grouped by area of QHR. Each page explains what the endpoint does in business terms, who may call it, what to send, what comes back and how to fix every error.
- Base URL
https://qhr-api.qdev.it/open/v1- Authentication
Authorization: Bearer qhr_…- Version
v1- OpenAPI document
- https://qhr-api.qdev.it/open/v1/openapi.json Import it into Postman, Insomnia or a code generator.
About this API
The QHR Open API lets your systems, partners' apps and Claude work with your company's HR data: employees, attendance, leave, requests and payroll. It runs the same rules as the QHR web app — a token can never see or do more than the person who created it.
Authentication. Create a token in QHR › Settings › API & Integrations and send it on every request as Authorization: Bearer qhr_…. A token works in one company only (the one active when it was created). A *read* token can call operations marked x-access: read; anything else needs a token created with "Allow changes".
Errors. Every error body is { "error": "<message>", "code": "<stable_code>" }. Branch on code; error is human text in the requested language and may be reworded. Each operation lists the codes it can return with their meaning and how to fix them.
Errors every operation can return. Besides the ones listed on each operation: 402/412/425 entitlement_blocked when the company cannot use the feature, 429 rate_limited above 120 requests a minute per token, and 500 internal_error. They are listed once, by status, under the top-level x-global-responses, in the same shape as an operation's responses.
Language. Send Accept-Language: ar or en for messages and translated labels.
Pagination. List operations take page and per_page and answer { "records": [...], "pagination": { "current_page", "per_page", "total_entries", "pages" } }.
Getting started
People & organisation
Audit log
Who changed what and when: every record created, updated or deleted in the company, with the fields that changed and their old and new values.
2 operationsDashboard
The home-page widgets of QHR: company headcount figures, the leave requests waiting for your decision and the ones already decided, who is away, upcoming public holidays and team news such as new joiners and work anniversaries.
7 operationsDepartments
The company's departments (Finance, Sales…), which employees belong to and which handle request types.
4 operationsDocuments
Employees' files kept in QHR — ID and residency copies, passports, contracts, certificates — filed in folders on each employee's profile. A document can carry an expiry date: QHR flags it as expiring soon or expired, reminds the employee by email, keeps every renewed copy as a version, and records whether HR has verified it.
14 operationsEmployee imports & bulk updates
Spreadsheet work on many employees at once: adding up to 500 new employees from the import template, and editing existing employees through a sheet that is previewed before anything changes.
7 operationsEmployee invitations
Who can sign in to QHR: each employee's login status, sending an employee an email invitation to sign in, and withdrawing an invitation that was not accepted yet.
3 operationsEmployees
The company's people: who works here, their personal, job and contract data, who reports to whom, and whose profile still needs completing.
14 operationsNotifications
The token owner's in-app notifications (the bell in QHR): requests assigned to them, approvals they are asked for, decisions on their own requests, comments and due dates.
3 operationsRoles & permissions
Roles decide what each user may see and do in QHR. A role is a named bundle of permissions (view, create, edit, delete… per module) given to users. This tag covers the company's roles and the catalogue of permissions a role can grant.
9 operationsUsers
The people who can sign in to the company's QHR, each with a role that decides what they may see and do. A user is not the same as an employee: an employee is an HR record (job, salary, leave), and a user is a login. An employee becomes a user when invited to QHR; a user with no employee record (the owner, an outside accountant) is a "system user" and takes one of the plan's user seats.
8 operationsTime & attendance
Attendance
The working day itself: checking in and out from an app, pausing for breaks, an employee's own attendance history and schedule, and a manager correcting a team member's day.
13 operationsAttendance calendar
The company-wide calendar settings: which weekdays are the weekend and which timezone the company's working days, check-ins and reports are counted in.
2 operationsAttendance device support
Requests to the QHR team to support a device model that is not in the catalogue yet, or one that will not connect, and the replies the team has sent.
3 operationsAttendance devices
Fingerprint, card and face readers that record attendance at a location: registering a device and connecting it, linking each number on the device to an employee, and the raw log of every scan the devices send.
18 operationsAttendance log
The detailed attendance log: one row per employee per working day with the check-in and check-out times, where and how each was punched, minutes late or left early, and the day's status — plus status counts per day and punctuality insights.
5 operationsAttendance profiles
Working-time rules: each profile sets the working hours, days off, day shifts, grace period, correction and permission requests. Every employee is on one profile at a time; this tag also covers the weekly schedule grid and moving employees between profiles from a future date.
15 operationsAttendance reports
How well people keep their working hours: today's live headcount (present, absent, on leave), attendance rates over time and by department, and per-employee totals of attendance, absence, lateness, overtime and permissions — for the whole company (HR) or for a manager's direct reports.
12 operationsOvertime
Hours worked outside the schedule. An employee requests them, their manager and then HR approve, and approved hours are paid in the next payroll run for that date at the company's overtime rate.
14 operationsPermission requests
Hourly leave of absence within a working day: an employee asks in advance to arrive late, leave early or step out for a few hours, and their manager and/or HR approve it. An approved permission excuses that time, so the late arrival, early leave or short hours it covers are not deducted from pay. This is not about access rights or roles.
18 operationsPublic holidays
The company's public holidays, per country: the days employees living in that country are not expected at work, which attendance, leave balances and absence deductions all respect.
5 operationsTime incidents
Absences, late arrivals, early leaves and short hours that QHR detects from attendance, and the decision to
deduct them from pay or let them go.
What an incident is. Every working day QHR compares the employee's attendance with their attendance
profile (shift, grace period). A working day with no attendance is an absence worth the day's hours; a
check-in after the shift start beyond the grace period is late; a check-out before the shift end is
early_leave; on a flexible day, working fewer than the day's hours is short_hours; a day missing its
check-in or check-out is incomplete (nothing to deduct until the record is corrected). Grace is a
threshold, not a discount: 20 minutes late with 15 minutes' grace is a 20-minute incident. Weekends,
public holidays, approved leave and approved permissions raise nothing. While undecided, an incident follows
the attendance: a correction updates its minutes or removes it.
Who decides. The attendance profile's approval route is fixed on the incident when it is created:
manager — the employee's direct manager decides, and that is final; hr — HR decides; manager_and_hr
— the manager decides first: "ignore" is final, "deduct" only recommends and passes the incident to HR, who
make the final call. An employee whose manager cannot act (no manager, or a manager without the team
attendance permission) goes straight to HR. Managers work from time_incidents.team_list, HR from
time_incidents.list; both decide with time_incidents.decide. Before anyone acts, the employee may attach
a reason with time_incidents.submit_justification, which the decider sees.
What "deduct" does. A decision is final and cannot be reversed. A deducted incident is picked up by the
payroll run that covers its date: absence minutes go to the employee's timesheet as absence and late, early
and short minutes as undertime, and the run reduces that month's pay accordingly. An ignored incident costs
nothing. Once a payroll run covering the date is past time verification, or has paid the incident, it can
no longer be decided.
Leave & requests
All requests (HR)
HR's view over every internal request in the company, whatever its department or status, with the company-wide cards and bulk changes of assignee, priority and due date.
6 operationsCustody
Company assets in employees' hands — laptops, phones, car keys: who holds what, its value, and handing it over, moving it to someone else, taking it back, and recovering the cost of a damaged or lost asset from the employee's salary.
11 operationsCustody settings
The catalogue HR hands custody from: categories (devices, vehicles, keys…) and the items inside each, with their default value and whether a serial number is required.
7 operationsDepartment requests
The work queue of the caller's own department: approved requests the department handles, plus anything assigned to the caller. Members take open requests, assign them to colleagues and accept what was assigned to them, one by one or several at once.
6 operationsEmployee leave policies
Which employees hold which leave policy, and their balances. Assigning a policy is what gives an employee a leave balance; an employee's own balances and day-by-day balance statement are here too.
6 operationsEmployee time off
HR working on one employee's time off: their leave requests and balances, filing leave on their behalf, correcting a balance by hand, the day-by-day balance statement, which leave policies they hold, and the leave settlement when they leave the company.
13 operationsHR leave overview
The company-wide view of leave for HR: the headline counts, every leave request waiting on a decision, each employee's balances and who is off today, and the export of the request list.
6 operationsLeave categories
The kinds of leave the company recognises (annual, sick, maternity…). Every leave policy belongs to one category, an employee holds at most one policy per category, and a category decides whether unused days may be carried over into the next year.
4 operationsLeave policies
The rules for one kind of leave: how many days an employee is entitled to, how and when the days are granted (accrual), how much is carried into the next year, how the leave is paid and who approves it.
7 operationsLeave requests
Requesting time off and deciding on it: an employee's own leave requests with their balance check, edits and cancellations, and the manager and HR approval steps that follow.
18 operationsLeave settings
Company-wide leave settings: whether approvers are reminded by email of leave requests still waiting for them, after how many days, and how often.
2 operationsMy custody
The token owner's own custody: the assets they hold now, the ones they held before, and what they still owe for a damaged or lost one. Read only.
5 operationsRequest approvals
Requests waiting on the caller's decision: the manager stage for their direct reports and, for HR, the HR stage — one by one or several at a time.
3 operationsRequest catalog
What an employee can ask for: the enabled request categories and, in each, the request types with the form to fill in, who approves and which department does the work. Read it before submitting a request.
2 operationsRequest settings
HR's set-up of internal requests: the categories shown in the catalog and the request types inside them. A request type decides the form employees fill in, the approval stages (direct manager, HR, both or none), the department that handles the work, the default priority and the target number of days.
11 operationsRequests
Requests employees raise to an internal department (a laptop from IT, a salary certificate from HR…): submitting one, following it, approving it as the direct manager or HR, and the department's work on it — take, assign, send for review, close — with its conversation and activity log.
20 operationsSupport
Conversations between the token owner and the QHR support team: raising a problem, question or feature request, reading support's replies, replying, and closing it.
6 operationsTeam leaves
A manager's view of their team's leave: who is away and when, the requests waiting for a decision, and filing leave on behalf of a direct report.
8 operationsPayroll & finance
Accounting connection
The company's link to Qoyod accounting, read-only: whether it is connected and to which Qoyod company, whether Qoyod has an account for every cost the payroll uses, what each finalised payroll run became in Qoyod (journal entry, held, failed), and which employees Qoyod knows. Connecting, settings and re-sending stay in the QHR web app.
5 operationsBonuses
One-off amounts paid to an employee on top of their salary — a reward, a commission or a grant. HR adds them (or a manager proposes one for a direct report), HR approves them, and the next payroll run pays them as a line on the payslip.
12 operationsDeductions
One-off amounts taken from an employee's pay — a penalty for a policy violation, a repayment or a reimbursement owed. HR adds them (or a manager proposes one for a direct report), HR approves them, and the next payroll run deducts them on the payslip.
12 operationsEnd of service
What an employee is owed when they leave: the end-of-service award under the Saudi labour law, unused leave paid out, the final salary and pending bonuses, minus outstanding loans, deductions and custody. A package is calculated, saved as a draft, then confirmed — which settles the loans, starts the offboarding and records the payout.
15 operationsExports
The files the token's owner exported from QHR lists (employees, payslips, loans…) to Excel or CSV: their progress while a large export is built in the background, and how long the file is kept (7 days).
3 operationsGOSI
Live checks against GOSI (the Saudi General Organization for Social Insurance) through Masdr: the establishment's wage-protection compliance and head-count breakdown, a person's contributor record, and whether an employee's employment, registered wage and IBAN match what GOSI and the banks hold. Also the company's GOSI connection (its unified number).
13 operationsInsurance
The company's insurance plans — social insurance (GOSI), medical and others — with the percentage the employee pays from their salary and the percentage the company pays on top. Employees are enrolled in a plan on their salary (salaries.enrol_insurance).
Loans
Salary advances and loans: an employee's own requests, a manager's requests for their team, and HR's queue, where a loan is approved through payroll (paid out on a payslip, repaid in monthly installments) or directly (paid and repaid outside payroll), settled when the employee pays it back, and sent to Qoyod accounting.
21 operationsLocations
The company's work sites: their names, whether they are active, the geo-fence (a map pin and radius, or allowed office networks) that attendance check-ins are held to, and how many employees are assigned to each as their main or an additional location.
6 operationsPayments
Money actually transferred to an employee (paid) or received back from them (received), and how each payment is allocated against what it settles: payslips, bonuses and deductions. Allocating a payment is what marks a payslip paid and, through it, a loan installment repaid.
Payroll runs
Paying the company's people for a period. A run picks its employees, takes their time (timesheets), calculates every payslip, moves through verification to finalised — or, for companies whose Qoyod accounting approves payroll, waits for that approval — and is then paid and posted to accounting.
23 operationsPayroll settings
Company-wide payroll rules: how overtime, lateness and undertime are priced, and which day salaries are paid.
2 operationsPayslips
What each employee earned and had deducted in a payroll run: the payslip's totals, its lines (salary, allowances, overtime, bonuses, deductions, loan installments, insurance), its payment status and its PDF. Employees read their own issued payslips here too.
12 operationsSalaries
What each employee is contracted to earn: the basic salary, its allowances (housing, transport…) and fixed deductions, the social-insurance enrolments payroll deducts, and the history of earlier salaries. Payroll runs read the active salary.
10 operations