A user with access to the CareHQ application.
A unique Id for the user.
The date/time the user was created.
The user's email address.
The user's first name.
The date/time the user accepted their invite to the application.
The date/time the user was invited to the application.
The user's last name.
A list of location groups Ids that a regional manager has access to.
The user's role at their associated location (manager, deputy_manager, administrator, receptionist, senior_carer, carer, customer_relations_adviser, nurse, other). Only applicable to location users.
The user's role at their associated location defined when the role does not fit the standard list of roles. Only applicable to location users.
A list of locations Ids that a regional manager or location user has access to (location users will only ever have access to one location).
Flag indicating if the user has enabled Multi-Factor Authentication (a.k.a 2FA) for their account.
The user's mobile number.
The date/time the user was last modified.
Flag indicating that this user is notified about service user admissions and discharges.
Flag indicating that this user is notified when a tracked fund for a service user is about to run out.
Flag indicating that this user is notified about data exports.
Flag indicating that this user is notified when ledger balances are low.
Flag indicating that this user is notified when a reply is received form a care seeker, service user or contact this user has previously sent a message to.
Flag indicating that this user is notified when a service user's funding is flagged as at risk.
Flag indicating if the user is an account owner and location operator. Typically only applicable to single location accounts. Only applies to the account owner role.
The Id of the location a user with the owner operator flag set is associated with. Only applicable to account owners with the owner operator flag set.
The user's profile picture URL.
The reason for the user's suspension (if suspended).
Flag indicating that a regional manager can act as an operator for locations they are assigned (either via locations or location groups). Only applicable to regional managers.
The role of the user within CareHQ (['account_owner', 'regional_manager', 'location_user', 'care_advisor']).
Flag indicating if dedicated finance inbox is visible to the user.
The date/time the user was suspended (if suspended).
{
"_id": "6724fbc74f73a2cebf637800",
"created": "2024-11-01 16:03:19",
"email": "ant.demo@crmhq.co.uk",
"first_name": "Anthony",
"invite_accepted": null,
"invited": null,
"last_name": "Blackshaw",
"location_groups": [],
"location_role": null,
"location_role_label": null,
"location_role_other": null,
"locations": [],
"mfa_enabled": null,
"mobile": "07832 963 114",
"modified": "2024-11-01 16:03:19",
"notify_on_admission_or_discharge": null,
"notify_on_care_fund_depleted": null,
"notify_on_data_export": null,
"notify_on_ledger_balance_low": null,
"notify_on_reply_received": null,
"notify_on_service_user_funding_at_risk": null,
"owner_operator": true,
"owner_operator_location": "6724fbc74f73a2cebf6377fa",
"picture": null,
"reason_for_suspension": null,
"regional_operator": null,
"role": "account_owner",
"show_finance_inbox": null,
"suspended": null
}
Return a list of CareHQ users for your organisation.
['_id']
A list of attributes to include for fetched objects.
A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.
A filter that accepts a list of location Ids and filters users by the locations they are associated with (as regional managers or location users).
A filter that accepts a date/time and filters the items returned to those modified after the date/time.
A filter that accepts a date/time and filters the items returned to those modified before the date/time.
A case insensitive keyword filter applied to the following fields; email_lower, full_name_lower.
A filter that accepts a list of roles for users and filters users by their role.
no
A filter that allows users that are currently suspended to be included or excluded.
1
The page number to fetch.
10
The number of items to return per page.
_id
A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.
Returns a page of users.
var users = apiClient.Request(
HttpMethod.Get,
"users",
new MultiValueDict()
.Add("attributes", "email", "first_name")
.Add("filters-role", "location_user")
);
<?php
$users = $api_client->request(
'GET',
'users',
[
'attributes'=>['email', 'first_name'],
'filters-role'=>['location_user']
]
);
users = api_client(
'GET',
'users',
params={
'attributes': ['email', 'first_name'],
'filters-roles': ['location_user']
}
)
users = api_client.request(
'GET',
'users',
params: {
'attributes' => ['email', 'first_name'],
'filters-role' => ['location_user']
}
)
{
"item_count": 6,
"items": [
{
"_id": "6724fbc74f73a2cebf6377fe",
"email": "account.owner@marshallcare.co.uk",
"first_name": "Account"
},
{
"_id": "6724fbc74f73a2cebf637800",
"email": "ant.demo@crmhq.co.uk",
"first_name": "Anthony"
},
{
"_id": "6724fbc74f73a2cebf637802",
"email": "care.advisor@marshallcare.co.uk",
"first_name": "Care"
},
{
"_id": "6724fbc74f73a2cebf637804",
"email": "location.user@marshallcare.co.uk",
"first_name": "Location"
},
{
"_id": "6724fbc74f73a2cebf637806",
"email": "mark.demo@crmhq.co.uk",
"first_name": "Mark"
},
{
"_id": "6724fbc74f73a2cebf637808",
"email": "regional.manager@marshallcare.co.uk",
"first_name": "Regional"
}
],
"page": 1,
"page_count": 1,
"per_page": 10
}
var user = apiClient.Request(HttpMethod.Get, $"users/{userId}");
<?php
$user = $api_client->request('GET', 'users/' . $user_id);
user = api_client('GET', f'users/{user_id}')
user = api_client.request('GET', "users/#{user_id}")
{
"_id": "6724fbc74f73a2cebf637800",
"created": "2024-11-01 16:03:19",
"email": "ant.demo@crmhq.co.uk",
"first_name": "Anthony",
"invite_accepted": null,
"invited": null,
"last_name": "Blackshaw",
"location_groups": [],
"location_role": null,
"location_role_label": null,
"location_role_other": null,
"locations": [],
"mfa_enabled": null,
"mobile": "07832 963 114",
"modified": "2024-11-01 16:03:19",
"notify_on_admission_or_discharge": null,
"notify_on_care_fund_depleted": null,
"notify_on_data_export": null,
"notify_on_ledger_balance_low": null,
"notify_on_reply_received": null,
"notify_on_service_user_funding_at_risk": null,
"owner_operator": true,
"owner_operator_location": "6724fbc74f73a2cebf6377fa",
"picture": null,
"reason_for_suspension": null,
"regional_operator": null,
"role": "account_owner",
"show_finance_inbox": null,
"suspended": null
}