API: getUser
  • 5 Minutes to read
  • Dark
    Light

API: getUser

  • Dark
    Light

Article summary

  • Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
  • If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
  • Tags are required unless specified.

Description

The getUser method retrieves a user's details. 

Who Has Access

The following users have access to the getUser method:

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>getUser</Method>
   <Parameters>
      <User>
         <ID><![CDATA[]]></ID>
            - OR -
         <Email><![CDATA[]]></Email>
            - OR -
         <EmployeeID><![CDATA[]]></EmployeeID>
      </User>
   </Parameters>
</SmarterU>

User Tag Group

The User tag group is a container for the user filters.

<User>
   <ID><![CDATA[]]></ID>
      - OR -
   <Email><![CDATA[]]></Email>
      - OR -
   <EmployeeID><![CDATA[]]></EmployeeID>
</User>

The User tag contains one of the following.

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 listUsers method.

Email

The user's email address. This tag is mutually exclusive with the ID and EmployeeID tags. This is the Email returned by the listUsers method.

EmployeeID

The user's employee ID. This tag is mutually exclusive with the ID and Email tags. This is the EmployeeID returned by the listUsers method.

API Response XML Package

The API response XML package will always include a Result, Info, and Errors tag.

Wage data is only returned if the calling user has the Edit Wages & Training Costs or View Wages & Training Costs account permission, or is an administrator or owner.
<SmarterU>
   <Result></Result>
   <Info>
      <User>
         <ID><![CDATA[]]></ID>
         <Email><![CDATA[]]></Email>
         <EmployeeID><![CDATA[]]></EmployeeID>
         <CreatedDate><![CDATA[]]></CreatedDate>
         <ModifiedDate><![CDATA[]]></ModifiedDate>
         <GivenName><![CDATA[]]></GivenName>
         <Surname><![CDATA[]]></Surname>
         <Language><![CDATA[]]></Language>
         <AllowFeedback><![CDATA[]]></AllowFeedback>
         <Status><![CDATA[]]></Status>
         <AuthenticationType><![CDATA[]]></AuthenticationType>
         <Timezone><![CDATA[]]></Timezone>
         <AlternateEmail><![CDATA[]]></AlternateEmail>
         <HomeGroup><![CDATA[]]></HomeGroup>
         <Organization><![CDATA[]]></Organization>
         <Title><![CDATA[]]></Title>
         <Division><![CDATA[]]></Division>

         <Supervisors>
            <Supervisor>
               <SupervisorName><![CDATA[]]></SupervisorName>
               <SupervisorEmail><![CDATA[]]></SupervisorEmail>
               <SupervisorEmployeeID><![CDATA[]]></SupervisorEmployeeID>
            </Supervisor>
         </Supervisors>
            
         <PhonePrimary><![CDATA[]]></PhonePrimary>
         <PhoneAlternate><![CDATA[]]></PhoneAlternate>
         <PhoneMobile><![CDATA[]]></PhoneMobile>
         <SendMailTo><![CDATA[]]></SendMailTo>
         <SendEmailTo><![CDATA[]]></SendEmailTo>
         <Fax><![CDATA[]]></Fax>
         <Address1><![CDATA[]]></Address1>
         <Address2><![CDATA[]]></Address2>
         <City><![CDATA[]]></City>
         <PostalCode><![CDATA[]]></PostalCode>
         <Province><![CDATA[]]></Province>
         <Country><![CDATA[]]></Country>        
         <SendWeeklyTaskReminder><![CDATA[]]></SendWeeklyTaskReminder>
         <SendWeeklyProgressSummary><![CDATA[]]></SendWeeklyProgressSummary>

         <Teams>
            <Team><![CDATA[]]></Team>
         </Teams>

         <Roles>
            <Role><![CDATA[]]></Role>
         </Roles>

         <CustomFields>
            <CustomField type="">
               <Name><![CDATA[]]></Name>
               <Value><![CDATA[]]></Value>
            </CustomField>
         </CustomFields>

         <Venues>
            <Venue>
               <Name><![CDATA[]]></Name>
               <Visibility><![CDATA[]]></Visibility>
               <AutoWaitingList><![CDATA[]]></AutoWaitingList>
            </Venue>
         </Venues>

         <Wages>
            <Wage>
               <WageID><![CDATA[]]></WageID>
               <EffectiveDate><![CDATA[]]></EffectiveDate>
               <HourlyWage><![CDATA[]]></HourlyWage>
            </Wage>
         </Wages>        

         <ReceiveNotifications><![CDATA[]]></ReceiveNotifications>
      </User>
   </Info>

   <Errors>
      <Error>
         <ErrorID></ErrorID>
         <ErrorMessage></ErrorMessage>
     </Error>
   </Errors>

</SmarterU>

The user is contained in a User tag and may contain the following.

ID

The user's system-generated identifier. 

Email

The user's email address

EmployeeID

The user's employee ID

CreatedDate

The date the user was added.

ModifiedDate

The date the user was last edited.

GivenName

The user's first name.

Surname

The user's last name.

Language

The language used for the user's account.

AllowFeedback

Indicates whether the user can provide feedback on online course tasks:

  • 1 - The user can provide feedback on online course tasks. 
  • - The user cannot provide feedback on online course tasks. 

Status

The user's status:

  • Active - The user account may be used to access SmarterU. 
  • Inactive - The user account may not be used to access SmarterU. 

AuthenticationType

Indicates how you would like the user to authenticate:

  • SmarterU - The user will log into SmarterU via the SmarterU interface. 
  • External - The user will log into SmarterU via an external system using single-sign on.
  • Both - The user will log into SmarterU via the SmarterU interface or an external system.

TimeZone

The user's primary time zone

AlternateEmail

HomeGroup

The name of the user's home group.

Organization

Title

Division

Supervisors

A container for the user's supervisors. Each supervisor is contained in a Supervisor tag and contains the following.

TagDescription
SupervisorNameThe supervisor's name.
SupervisorEmailThe supervisor's email address.
SupervisorEmployeeIDThe supervisor's employee ID.

PhonePrimary

PhoneAlternate

PhoneMobile

SendMailTo

Indicates where the user's physical mail should be sent:

SendEmailTo

Indicates where the user's emails should be sent:

  • Supervisor -  Emails to the user will be sent to the supervisors' email addresses. If the user has multiple supervisors, emails will be sent to all of the user's supervisors. A supervisor must have a primary email address specified for this option to be allowed. 
  • Self  - Emails to the user are sent to the user's primary email address. An email address must be provided for this option to be allowed.
  • Alternate - Emails to the user will be sent to the email address specified in the AlternateEmail tag. For this option to be allowed, a valid email address must be provided in the AlternateEmail tag.

Fax

Address1

Address2

City

PostalCode

Province

Country

The country of the user's address:

  • Canada
  • United States
  • International

SendWeeklyTaskReminder

Indicates whether the user should receive weekly reminders of their pending or outstanding courses in SmarterU:

  • 1 - The user will receive weekly reminders.
  • 0 - The user will not receive weekly reminders. 

SendWeeklyProgressSummary

Indicates whether the user should receive weekly reports on the status of their supervisees:

  • 1 - The user will receive weekly reports on their supervisees.
  • 0 - The user will not receive weekly reports on their supervisees.

Teams

A container for the user's team. Each team name is contained in a Team tag.

Roles

A container for the user's learning plans. Each learning plan name is contained in a Role tag.

CustomFields

A container for the account's custom user fields. Each custom field is contained in a CustomField tag and contains the following. 

TagDescription
NameThe custom field's name.
ValueThe custom field's value.

Venues

The Venues tag group is a container for the user's venues. Each venue is contained in a Venue tag and contains the following. 

TagDescription
NameThe venue's name.
VisibilityIndicates whether the venue is visible to the user by default:
  • 1 - The venue is visible to the user by default. 
  • 0 - The venue is not visible to the user by default.
AutoWaitingListNot yet implemented.

Wages

The Wages tag is a container for the user's wages. Each wage is contained in a Wage tag and contains the following.

TagDescription
WageIDThe system-generated internal identifier for the user's wage.
EffectiveDateThe wage's effective date
HourlyWageThe user's hourly wage.

ReceiveNotifications

Indicates whether the user will receive email notifications:

  • True - The user will receive email notifications. 
  • False - The user will not receive email notifications.

Example API Response XML Package

Below is an example of an API response XML package.

<SmarterU>
   <Result>Success</Result>
   <Info>
      <User>
         <ID><![CDATA[25365]]></ID>
         <Email><![CDATA[dana.brown@finashoes.com]]></Email>
         <EmployeeID><![CDATA[294]]></EmployeeID>
         <CreatedDate><![CDATA[2013-05-29 20:01:53.663]]></CreatedDate>
         <ModifiedDate><![CDATA[2018-03-09 16:03:45.487]]></ModifiedDate>
         <GivenName><![CDATA[Dana]]></GivenName>
         <Surname><![CDATA[Brown]]></Surname>
         <Language><![CDATA[English]]></Language>
         <AllowFeedback><![CDATA[0]]></AllowFeedback>
         <Status><![CDATA[Active]]></Status>
         <AuthenticationType><![CDATA[SmarterU]]></AuthenticationType>
         <Timezone><![CDATA[(GMT-6:00) - US/Central]]></Timezone>
         <AlternateEmail><![CDATA[cherry@intindi.com]]></AlternateEmail>
         <HomeGroup><![CDATA[Retail]]></HomeGroup>
         <Organization/>
         <Title><![CDATA[Store Manager]]></Title>
         <Division><![CDATA[Retail]]></Division>

         <Supervisors>
            <Supervisor>
               <SupervisorName><![CDATA[Vasquez, Maria]]></SupervisorName>
               <SupervisorEmail><![CDATA[maria.vasquez@finashoes.com]]></SupervisorEmail>
               <SupervisorEmployeeID/>
            </Supervisor>
         </Supervisors>

         <PhonePrimary><![CDATA[(855) 830-4800]]></PhonePrimary>
         <PhoneAlternate><![CDATA[(855) 133-3300]]></PhoneAlternate>
         <PhoneMobile><![CDATA[(855) 303-4011]]></PhoneMobile>
         <SendMailTo><![CDATA[Personal]]></SendMailTo>
         <SendEmailTo><![CDATA[Alternate]]></SendEmailTo>
         <Fax><![CDATA[(855) 830-4801]]></Fax>
         <Address1><![CDATA[449 Provencher Blvd]]></Address1>
         <Address2/>
         <City><![CDATA[Winnipeg]]></City>
         <PostalCode><![CDATA[MB R2J 0B8]]></PostalCode>
         <Province/>
         <Country><![CDATA[United States]]></Country>
         <SendWeeklyTaskReminder><![CDATA[1]]></SendWeeklyTaskReminder>
         <SendWeeklyProgressSummary><![CDATA[1]]></SendWeeklyProgressSummary>

         <Teams>
            <Team><![CDATA[Leadership]]></Team>
         </Teams>

         <Roles>
            <Role><![CDATA[Sales Associate]]></Role>
            <Role><![CDATA[Employee]]></Role>
            <Role><![CDATA[Store Manager]]></Role>
         </Roles>

         <CustomFields>
            <CustomField type="Date">
               <Name><![CDATA[Community Service Date]]></Name>
               <Value><![CDATA[28-Jun-2013]]></Value>
            </CustomField>
            <CustomField type="String">
               <Name><![CDATA[Comm. Service Beneficiary]]></Name>
               <Value><![CDATA[Aspen Lake Animal Shelter]]></Value>
            </CustomField>
            <CustomField type="Date">
               <Name><![CDATA[Annual Review Date]]></Name>
               <Value><![CDATA[30-Sep-2013]]></Value>
            </CustomField>
            <CustomField type="Hierarchy">
               <Name><![CDATA[Location]]></Name>
               <Value><![CDATA[United States]]></Value>
            </CustomField>
         </CustomFields>

         <Venues>
            <Venue>
               <Name>Education Center - HQ</Name>
               <Visibility>0</Visibility>
               <AutoWaitingList>0</AutoWaitingList>
            </Venue>
            <Venue>
               <Name>Retail Location - Chicago</Name>
               <Visibility>0</Visibility>
               <AutoWaitingList>0</AutoWaitingList>
            </Venue>
            <Venue>
               <Name>Main Office</Name>
               <Visibility>1</Visibility>
               <AutoWaitingList>0</AutoWaitingList>
            </Venue>
         </Venues>

         <Wages>
         </Wages>

         <ReceiveNotifications>1</ReceiveNotifications>
      </User>
   </Info>

   <Errors>

   </Errors>
</SmarterU> 

Error Codes

Error CodeMessage
GU:01
The email address provided is not valid.
GU:02
The required permissions are not met to call the getUser method.
GU:03
The user requested does not exist.
GU:04
The requested user cannot be retrieved via the API.
GU:05
The employee ID provided is not valid.
GU:06
The user ID provided is not valid.
GU:07
The user requested does not have a home group. Home group must be updated before additional information can be retrieved for this user.

Was this article helpful?