Get User Hierarchy Information
Retrieves user hierarchy.
- When an Admin User passes a user’s
UserId
in the request, then –- If user hierarchy is enabled, the details of all the users reporting to the
UserId
passed will be retrieved. - If user hierarchy is disabled, then the details of all the Sales Users reporting to the group manager (who’s
UserId
is passed) will be retrieved.
- If user hierarchy is enabled, the details of all the users reporting to the
- When a Sales Manager passes a user’s
UserId
in the request, then –- If user hierarchy is enabled, the details of all the users reporting to the
UserId
passed will be retrieved, provided the Sales Manager is the reporting manager for the user (who’sUserId
is passed). - If user hierarchy is disabled, then the users in the sales group reporting to that specific user (who’s
UserId
is passed) is retrieved, depending on the User Access Permissions granted to the Sales Manager.
- If user hierarchy is enabled, the details of all the users reporting to the
- When a Marketing User passes a user’s
UserId
in the request, then –- If user hierarchy is enabled, the details of all the users reporting to the
UserId
passed will be retrieved, provided the Marketing User is the reporting manager for the user (who’sUserId
is passed). - If user hierarchy is disabled, then the users in the sales group reporting to that specific user (who’s
UserId
is passed) is retrieved, depending on the User Access Permission granted to the Marketing User.
- If user hierarchy is enabled, the details of all the users reporting to the
- When a Sales User passes a user’s UserId in the request, then –
- If user hierarchy is enabled, then the details of all the users reporting to the
UserId
passed will be retrieved, provided the Sales User is the reporting manager for the user (who’sUserId
is passed). - If user hierarchy is disabled, then the users in the sales group reporting to that specific user (who’s
UserId
is passed) is retrieved, provided the Sales User is also the Group Manager for that user (who’sUserId
is passed).
- If user hierarchy is enabled, then the details of all the users reporting to the
Note: To return only selected user fields, you can pass an additional Columns
object as follows –
{ "UserId":"3b1041fb-8374-11e7-8758-0a106ee76b21", "Include":"All", "Columns":{ "Include_CSV":"Designation,IsEmployee,EmployeeId,DateOfBirth" } }
API URL
Request
Content-Type: application/json{ "UserId":"3b1041fb-8374-11e7-8758-0a106ee76b21", "Include":"All" }
Request Parameters
Parameter | Description |
---|---|
UserId | The unique Id of each user. To get the |
Include | The status of the users you want to retrieve. The following options are available–
|
Response
{ "SearchInfo":{ "TotalUsers":3 }, "Users":[ { "UserId":"718ae557-9d0b-11e7-b0ab-02e89b2fb8f4", "Name":"John George", "Mobile":"+91-123212332", "Email":"john@example.com", "CheckedIn":"false", "IsActive":"true" }, { "UserId":"9a86dca1-9d0b-11e7-b0ab-02e89b2fb8f4", "Name":"Jack Paul", "Mobile":null, "Email":"jackdoe@example.com", "CheckedIn":"false", "IsActive":"true" }, { "UserId":"9e660b12-6fdf-11e8-8455-020714094d7e", "Name":"Zane Doe", "Mobile":null, "Email":"zane@example.com", "CheckedIn":"false", "IsActive":"true" } ] }
HTTP Response Codes
Code | Description |
---|---|
200 OK | This is the status code for successful API call. |
401 Unauthorized | The API call was made with invalid access credentials. Check your AccessKey and SecretKey. |
400 Bad Request | The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure. |
404 Not Found | The API could not be found. Please check the API signature. |
429 Too Many Requests | API calls exceeded the limit of 25 in 5 second(s) |
500 Internal Server Error | The API called failed. There could be many reasons for it. Check the exception message to get more details. |