QHR Developers

List my custody

GET/my_custodies
Read token is enoughView own custody, including custody transferred away custody/viewRequires feature custodyAvailable in Claudemy_custodies.list

Returns the token owner's own custody, newest first, in every status: what they hold now (holding: current) and what they held before — transferred to someone else, or moved to HR when they left (holding: previous, with transferred_to / transferred_on and nothing about the next holder).

When to use: for an employee's "what do I have?", "which laptop is mine?" or "what am I still paying for?". For totals only, my_custodies.stat_cards is lighter. HR reads other people's custody with custodies.list.

Prerequisites: none — the employee is the token owner, who must be linked to an employee record.

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
q[search_cont]querystringReference or serial contains.C02X
q[status_in][]queryarray<string>Only these statuses.held
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 A page of the owner's custody.

FieldTypeDescription
recordsRequiredarray<object>The owner's custody on this page.
records[].idintegerCustody id.
records[].referencestringCustody reference, e.g. CUS-0042.
records[].employeeobjectThe employee holding the asset.
records[].employee.idintegerEmployee id.
records[].employee.full_namestringFull name.
records[].employee.employee_nostringEmployee number.
records[].employee.departmentobjectThe holder's department.
records[].employee.department.idintegerDepartment id.
records[].employee.department.namestringDepartment name.
records[].categoryobjectCategory as it was named when handed over.
records[].category.idintegerCategory id.
records[].category.namestringCategory name.
records[].category.iconstringCategory icon key.
records[].itemobjectItem as it was named when handed over.
records[].item.idintegerItem id.
records[].item.namestringItem name.
records[].serialstringSerial number of the unit handed over.
records[].valuestringValue of the asset, 2 decimals.
records[].currencystringCurrency of the money fields (the holder's pay currency).
records[].assigned_onstring (date)Date it was first handed over.
records[].held_sincestring (date)Date the current holder received it.
records[].statusstringheld (with the employee), returned (back with the company), deducting (returned damaged or lost, the employee repaying it from salary) or deducted (fully recovered or settled).
Allowed values: held, returned, deducting, deducted
records[].installments_paidintegerSalary deductions already paid; 0 when none.
records[].installments_countintegerNumber of salary deductions scheduled; null when the employee pays nothing.
records[].returned_onstring (date)Return date; null while held.
records[].conditionstringCondition at return: intact, damaged or lost; null until returned.
Allowed values: intact, damaged, lost, null
records[].holdingstringcurrent when the token owner holds it now, previous when it has moved away from them.
Allowed values: current, previous
records[].transferred_toobjectWho it went to when it left the owner; null on a current record.
records[].transferred_to.idintegerEmployee id.
records[].transferred_to.full_namestringFull name.
records[].transferred_onstring (date)When it left the owner.
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.
422employee_requiredThe token owner is a user with no employee record, so they have no custody of their own.Use a token created by a user linked to an employee record.
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 →