Retrieve Users
Developers can use the following endpoints in the User API to get detailed information about users, such as their ID, email, and phone number.
To get details about a user, including their Id, name, work locations, etc., call GetUser.
Parameter | Description |
---|---|
userId | The unique Id of the user. You can also use the aaaId , userCode, or uniqueCode with the "ref" prefix |
Sample Response
If the call is successful, the API returns a 200 status code with the user's details. See the example response below:
The data field in the response contains the details of the retrieved user:
- The id is the unique identifier of the user (user:7d2f1c9e-d454-4b3f-9f1a-e8d8f1c6d8e7).
- State represents the user's current state, which is onboarding:completed in this example.
- Other fields such as participantType, name, owner, uniqueCode, category, subCategory, and templateId provide additional information about the user.
- The properties field contains various user-specific properties such as workLocations, teams, identification, fileID, userType, department, aaaId, aaaGroups, designation, and employmentType.
- createdAt and updatedAt fields represent the timestamp of when the user was created and last updated, respectively.
- createdBy and updatedBy fields provide information about the user who created, and last updated the user record.
To get a list of all users in the organization, call ListUsers.
Parameter | Description |
---|---|
size | Number of items in a page. |
page | Page number to return(starting from 1) |
select | Specifies a list of attributes to be included in the response (id is always included in the response). If not specified, all attributes are included in the response. |
query | |
sortBy | fetching data in ascending(asc) or descending(desc) order. Available values : desc, asc Default value : desc |
sortKey | key to be used for sorting data. |
additionalInfo | key to toggle fetching of additionalInfo Available values : true, false |
You can retrieve the email for one or multiple users by specifying their userIDs in the GetUserEmail request.
Parameter | Description |
---|---|
ids | This query parameter can contain a list of user IDs or unique codes separated by a comma. Invalid user IDs are ignored. You can include up to 10 IDs in the request. |
Example Response
In this sample response, the data field contains the response data for the GetUserEmail API:
- Meta provides metadata about the response, such as the total number of elements (totalElements) matching the query. In this example, two users were returned.
- users is an array of user objects, where each object contains the following fields:
- userId: The unique identifier of the user.
- email: The email address associated with the user.
- uniqueCode: A unique code assigned to the user.
You can retrieve the mobile phone number for one or multiple users by specifying their userIDs in the GetUserMobile request.
Parameter | Description |
---|---|
userId | This query parameter can contain a list of user IDs or unique codes separated by a comma. Invalid user IDs are ignored. You can include up to 10 IDs in the request. |
Example Response
In this sample response, the data field contains the response data for the GetUserMobile API:
- meta provides metadata about the response, such as the total number of elements (totalElements) matching the query. In this example, there are 2 users returned.
- users is an array of user objects, where each object contains the following fields:
- userId: The unique identifier of the user.
- primaryMobile: An object representing the user's primary mobile number, with countryCode and number fields.
- secondaryMobile: An object representing the user's secondary mobile number, with countryCode and number fields. It can be null if the user doesn't have a secondary mobile number.
- uniqueCode: A unique code assigned to the user.