List my custody
GET
/my_custodiesRead token is enoughView own custody, including custody transferred away
custody/viewRequires feature custodyAvailable in Claudemy_custodies.listReturns 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
| Name | In | Type | Description | Example |
|---|---|---|---|---|
page | query | integer | Page number, starting at 1. min 1 | 1 |
per_page | query | integer | Records per page. Each list states its maximum. min 1 | 20 |
q[search_cont] | query | string | Reference or serial contains. | C02X |
q[status_in][] | query | array<string> | Only these statuses. | held |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 A page of the owner's custody.
| Field | Type | Description |
|---|---|---|
recordsRequired | array<object> | The owner's custody on this page. |
records[].id | integer | Custody id. |
records[].reference | string | Custody reference, e.g. CUS-0042. |
records[].employee | object | The employee holding the asset. |
records[].employee.id | integer | Employee id. |
records[].employee.full_name | string | Full name. |
records[].employee.employee_no | string | Employee number. |
records[].employee.department | object | The holder's department. |
records[].employee.department.id | integer | Department id. |
records[].employee.department.name | string | Department name. |
records[].category | object | Category as it was named when handed over. |
records[].category.id | integer | Category id. |
records[].category.name | string | Category name. |
records[].category.icon | string | Category icon key. |
records[].item | object | Item as it was named when handed over. |
records[].item.id | integer | Item id. |
records[].item.name | string | Item name. |
records[].serial | string | Serial number of the unit handed over. |
records[].value | string | Value of the asset, 2 decimals. |
records[].currency | string | Currency of the money fields (the holder's pay currency). |
records[].assigned_on | string (date) | Date it was first handed over. |
records[].held_since | string (date) | Date the current holder received it. |
records[].status | string | held (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_paid | integer | Salary deductions already paid; 0 when none. |
records[].installments_count | integer | Number of salary deductions scheduled; null when the employee pays nothing. |
records[].returned_on | string (date) | Return date; null while held. |
records[].condition | string | Condition at return: intact, damaged or lost; null until returned.Allowed values: intact, damaged, lost, null |
records[].holding | string | current when the token owner holds it now, previous when it has moved away from them.Allowed values: current, previous |
records[].transferred_to | object | Who it went to when it left the owner; null on a current record. |
records[].transferred_to.id | integer | Employee id. |
records[].transferred_to.full_name | string | Full name. |
records[].transferred_on | string (date) | When it left the owner. |
paginationRequired | object | |
pagination.current_pageRequired | integer | This page's number. |
pagination.per_pageRequired | integer | Records per page. |
pagination.total_entriesRequired | integer | Records across all pages. |
pagination.pagesRequired | integer | Number of pages. |
Errors
| HTTP | Code | Meaning | How to fix |
|---|---|---|---|
| 401 | token_missing | No Authorization: Bearer … header, or it is malformed. | Send Authorization: Bearer qhr_… with the full token. |
| 401 | token_invalid | The 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. |
| 401 | token_expired | The token is past its expiry date. | Create a new token. |
| 401 | token_revoked | The 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. |
| 401 | tenant_inactive | The company account is suspended. | Contact QHR support. |
| 403 | forbidden | The token owner's role lacks the permission this operation needs. | Ask an admin to grant the permission shown on this operation (x-permission). |
| 403 | employee_inactive | The token owner's employee record is not active. | HR must reactivate the employee record. |
| 403 | tenant_access_revoked | The 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. |
| 422 | employee_required | The 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. |
entitlement_blocked · 429 rate_limited · 500 internal_error