- 2 Minutes to read
- Print
- DarkLight
API: getUserSupervisees
- 2 Minutes to read
- Print
- DarkLight
Description
The getUserSupervisees method retrieves the user's supervisees.
Who Has Access
The following users have access to the getUserSupervisees method:
- Users with the Group Manager or Manage Users group permission.
- Supervisors. If the account's Supervisor Access setting'sView Supervisees or Edit Supervisees option is checked, supervisors will also be able to run the getUserSupervisees for the users that they supervise.
- Administrators and owners.
API Call XML Package
<SmarterU>
<AccountAPI><![CDATA[]]></AccountAPI>
<UserAPI><![CDATA[]]></UserAPI>
<Method>getUserSupervisees</Method>
<Parameters>
<User>
<Page></Page>
<PageSize></PageSize>
<SortOrder></SortOrder>
<Identifier>
<ID><![CDATA[]]></ID>
- OR -
<Email><![CDATA[]]></Email>
- OR -
<EmployeeID><![CDATA[]]></EmployeeID>
</Identifier>
</User>
</Parameters>
</SmarterU>
User Tag Group
The User tag group is a container for how the response is returned and the user/supervisor filters.
<User>
<Page></Page>
<PageSize></PageSize>
<SortOrder></SortOrder>
<Identifier>
<ID><![CDATA[]]></ID>
- OR -
<Email><![CDATA[]]></Email>
- OR -
<EmployeeID><![CDATA[]]></EmployeeID>
</Identifier>
</User>
The User tag group may contain the following.
Page (optional)
The number page to return. The default is 1.
PageSize (optional)
The maximum number of records to return. If the PageSize tag is not provided, up to 1000 results are returned by default. The maximum allowed value is 1000.
SortOrder (optional)
The direction that the results will be sorted:
- Asc - The results will be sorted in ascending order.
- Desc - The results will be sorted in descending order.
The default is Asc.
Identifier
The Identifier tag must contain one of the following.
Tag | Description |
---|---|
ID | The user's system-generated identifier. This tag is mutually exclusive with the Email and EmployeeID tags. This is the ID returned by the getUser and listUsers methods. |
The user's email address. This tag is mutually exclusive with the ID and EmployeeID tags. This is the Email returned by the getUser and listUsers methods. | |
EmployeeID | The user's employee ID. This tag is mutually exclusive with the ID and Email tags. This is the EmployeeID returned by the getUser and listUsers methods. |
API Response XML Package
The API response XML package will always include a Result, Info, and Errors tag.
<SmarterU>
<Result></Result>
<Info>
<UserSupervisees>
<UserSupervisee>
<ID><![CDATA[]]></ID>
<Email><![CDATA[]]></Email>
<EmployeeID><![CDATA[]]></EmployeeID>
<GivenName><![CDATA[]]></GivenName>
<Surname><![CDATA[]]></Surname>
</UserSupervisee>
</UserSupervisees>
<TotalRecords></TotalRecords>
</Info>
</SmarterU>
The UserSupervisees tag is a container for the supervisees returned by the getUserSupervisees method. Each supervisee is contained in a UserSupervisee tag and may contain the following.
ID
The supervisee's system-generated identifier.
The supervisee's email address.
EmployeeID
GivenName
Surname
Example API Response XML Package
Below is an example of an API response XML package.
<SmarterU>
<Result>Success</Result>
<Info>
<UserSupervisees>
<UserSupervisee>
<ID><![CDATA[344718]]></ID>
<Email><![CDATA[david.glass@finashoes.com]]></Email>
<EmployeeID><![CDATA[DG1234]]></EmployeeID>
<GivenName><![CDATA[David]]></GivenName>
<Surname><![CDATA[Glass]]></Surname>
</UserSupervisee>
<UserSupervisee>
<ID><![CDATA[183768]]></ID>
<Email><![CDATA[mark.roberts@finashoes.com]]></Email>
<EmployeeID><![CDATA[1271]]></EmployeeID>
<GivenName><![CDATA[Mark]]></GivenName>
<Surname><![CDATA[Roberts]]></Surname>
</UserSupervisee>
</UserSupervisees>
<TotalRecords>2</TotalRecords>
</Info>
</SmarterU>
Error Codes
Error Code | Message |
---|---|
GUS:01 | The page number provided is not valid. |
GUS:02 | The page number provided is not valid. |
GUS:03 | The sort order provided is not valid. |
GUS:04 | The id provided is not valid. |
GUS:05 | The email address provided is not valid. |
GUS:06 | The employee ID provided is not valid. |
GUS:07 | The required permissions are not met to call the getUserSupervisees method. |
GUS:08 | The user requested does not exist. |
GUS:09 | The requested user cannot be retrieved via the API. |
GUS:10 | The value for the sort order must be ASC or DESC. |