QHR Developers

List loans I requested for my team

GET/team_loans
Read token is enoughRequest loans for direct reports loan/create_for_teamRequires feature loanAvailable in Claudeteam_loans.list

Returns the loans the token's owner requested for their current direct reports, newest first, with whose loan it is, its status and what is still owed.

When to use: for a manager following up on requests they made for their team ("was Sara's loan approved?").

Prerequisites: the token's owner must be an employee with direct reports.

Side effects: none. Up to 50 per page.

Parameters

NameInTypeDescriptionExample
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 team loans.

FieldTypeDescription
recordsRequiredarray<object>The loans, newest first.
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[].installments_remainingintegerInstallments still to collect; null before approval.
records[].outstandingstringStill owed. Decimal string.
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[].editablebooleanTrue while it can be changed (pending).
records[].cancellablebooleanTrue while it can be withdrawn (pending).
records[].employeeobjectThe borrower.
records[].employee.idintegerEmployee id.
records[].employee.full_namestringFull name.
records[].submitted_byobjectWho requested it.
records[].submitted_by.idintegerEmployee id.
records[].submitted_by.full_namestringFull name.
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 →