API: getUserSupervisees
  • 2 Minutes to read
  • Dark
    Light

API: getUserSupervisees

  • Dark
    Light

Article Summary

Description

The getUserSupervisees method retrieves the user's supervisees.

Who Has Access

The following users have access to the getUserSupervisees method:

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.

TagDescription
IDThe 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. 
EmailThe 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. 
EmployeeIDThe 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.

Email

The supervisee's email address.

EmployeeID

The supervisee's employee ID.

GivenName

The supervisee's first name

Surname

The supervisee's last name.

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 CodeMessage
GUS:01The page number provided is not valid.
GUS:02The page number provided is not valid.
GUS:03The sort order provided is not valid.
GUS:04The id provided is not valid.
GUS:05The email address provided is not valid.
GUS:06The employee ID provided is not valid.
GUS:07The required permissions are not met to call the getUserSupervisees method.
GUS:08The user requested does not exist.
GUS:09The requested user cannot be retrieved via the API.
GUS:10The value for the sort order must be ASC or DESC.

Was this article helpful?