QHR Developers

List every employee's loans

GET/hr_loans/requests
Read token is enoughView all employees' loans loan/view_othersRequires feature loanAvailable in Claudehr_loans.list

Returns the company's loans and loan requests, newest submitted first, in every status, with the borrower, who asked on their behalf, the amount, how it is repaid and whether the token's owner may approve, reject or settle each one now.

When to use: to see what waits for a decision (q[status_eq]=pending), who has loans, or a loan's id for the other hr_loans operations. For totals use hr_loans.stat_cards.

Prerequisites: none.

Side effects: none. Up to 50 per page.

Parameters

NameInTypeDescriptionExample
q[status_eq]querystringOnly this status (pending, approved, repaying…).pending
q[created_at_gteq]querystring (date)Submitted on or after.2026-11-01
q[created_at_lteq]querystring (date)Submitted on or before.2026-11-30
q[employee_employee_name_cont]querystringBorrower's name contains.Sara
q[employee_employee_no_cont]querystringEmployee number contains.E-004
q[s]querystringSort, <field> asc|desc (amount, needed_on, created_at…). Newest first otherwise.amount desc
pagequeryintegerPage number, starting at 1.
min 1
1
per_pagequeryintegerRecords per page. Each list states its maximum.
min 1
20
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 A page of loans.

FieldTypeDescription
recordsRequiredarray<object>The loans.
records[].idintegerLoan id.
records[].referencestringLoan reference, e.g. LON-0042.
records[].statusstringStatus: pending (waiting for HR), pending_accounting (HR approved, an accountant in Qoyod is deciding), approved (lent, nothing repaid yet), repaying (installments being collected), pending_settlement (a settlement waits for the accountant), settled (paid back), rejected or cancelled.
Allowed values: pending, pending_accounting, approved, repaying, pending_settlement, settled, rejected, cancelled
records[].channelstringHow the money moves, chosen by HR at approval: payroll (paid out on a payslip and repaid in monthly installments deducted from pay) or direct (paid out and repaid in one payment outside payroll). Null until approved.
Allowed values: payroll, direct, null
records[].installments_countintegerNumber of installments (payroll loans).
records[].currencystringThe employee's pay currency, ISO code.
records[].amountstringAmount lent. Decimal string.
records[].needed_onstring (date)Date the employee needs the money.
records[].submitted_atstringWhen it was requested, ISO 8601 UTC.
records[].employee_idintegerBorrower's employee id.
records[].employee_nostringEmployee number.
records[].employee_namestringBorrower's name.
records[].submitted_byobjectManager or HR officer who asked on the employee's behalf; null when the employee asked.
records[].submitted_by.idintegerEmployee id.
records[].submitted_by.full_namestringFull name.
records[].repaymentobjectWhere a direct loan's single repayment stands; null for a payroll loan or one not approved.
records[].repayment.due_onstring (date)Repayment due date.
records[].repayment.repaid_onstring (date)Date it was repaid.
records[].repayment.statestringnot_due, due_soon (within 3 days), overdue, paid_early, paid_on_time or paid_late.
records[].repayment.daysintegerDays to, past or early/late against the due date, by state.
records[].can_approvebooleanTrue when the token's owner may approve it now.
records[].can_rejectbooleanTrue when the token's owner may reject it now.
records[].can_settlebooleanTrue when the token's owner may settle it now.
paginationRequiredobject
pagination.current_pageRequiredintegerThis page's number.
pagination.per_pageRequiredintegerRecords per page.
pagination.total_entriesRequiredintegerRecords across all pages.
pagination.pagesRequiredintegerNumber of pages.

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