API: listUsersCounts
  • 2 Minutes to read
  • Dark
    Light

API: listUsersCounts

  • Dark
    Light

  • 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 listUsersCounts method is used to list the count of actions by status for a user. 

Who Has Access

The following users have access to the listUsersCounts method:

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>createUser</Method>
   <Parameters>
      <User>
         <Filters>
            <Users>
               <UserIdentifier>
                  <ID></ID>
                     - OR -
                  <Email></Email>
                     - OR -
                  <EmployeeID></EmployeeID>
               </UserIdentifier>
            </Users>
         </Filters>
      </User>
   </Parameters>
</SmarterU>

Filters Tag Group

A container for the filters you want to apply. 

<Filters>
   <Users>
      <UserIdentifier>
         <ID></ID>
         <Email></Email>
         <EmployeeID></EmployeeID>
      </UserIdentifier>
   </Users>
</Filters>

The Filters tag must contain the following.

Users

A container for user filters. For each user you want to include, a UserIdentifier tag must be added with one of the following.

TagDescription
IDThe system-generated identifier for the user. This tag is mutually exclusive with the Email and EmployeeID tags. This is the ID returned by the listUsers method.
EmailThe email address of the user. This tag is mutually exclusive with the ID and EmployeeID tags
EmployeeIDThe employee ID of the user. This tag is mutually exclusive with the ID and Email tags.

API Response XML Package

<SmarterU>
   <Result></Result>
   <Info>
      <Users>
         <User>
            <ID><![CDATA[]]></ID>
            <Email><![CDATA[]]></Email>
            <EmployeeID><![CDATA[]]><EmployeeID/>
            <Actions>
               <Total></Total>
               <Accepted></Accepted>
               <Review></Review>
               <Pending></Pending>
            </Actions>
         </User>
      </Users>
   </Info>

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

The response may contain the following.

Users

A container for the users returned by the listUsersCounts method. Refer to Users Tag Group (Response).

The Errors tag contains any error codes returned by the listUsersCounts method.

Below is an example of an API response XML package.

<SmarterU>
   <Result>Success</Result>
   <Info>
      <Users>
         <User>
            <ID><![CDATA[922822]]></ID>
            <Email><![CDATA[anna.cruz@finashoes.com]]></Email>                        
            <EmployeeID><![CDATA[10012]]></EmployeeID>
            <Actions>
              <Total>2</Total>
              <Accepted>1</Accepted>
              <Review>1</Review>
              <Pending>0</Pending>
           </Actions>
         </User>

         <User>
            <ID><![CDATA[923053]]></ID>
            <Email><![CDATA[dana.brown@finashoes.com]]></Email> 
            <EmployeeID><![CDATA[193847]]></EmployeeID>
            <Actions>
               <Total>3</Total>
               <Accepted>0</Accepted>
               <Review>0</Review>
               <Pending>3</Pending>
            </Actions>
         </User>
      </Users>
   </Info>

   <Errors>
   </Errors>
</SmarterU> 

Users Tag Group (Response)

The Users tag is a container for the users returned by the listUsersCounts method. Each 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.

Actions

A container for the count of actions for the user. The tag contains the following:

TagDescription
TotalThe total number of actions assigned to the user.
AcceptedThe number of actions assigned to the user that have been confirmed.
ReviewThe number of actions assigned to the user that are awaiting for activity from someone else.
PendingThe number of actions assigned to the user that are awaiting activity from the user.

Error Codes

Error CodeMessage
LUC:01The filters provided is invalid.
LUC:02The users provided is invalid.
LUC:03The ID provided is invalid.
LUC:04The email provided is invalid.
LUC:05The employee ID provided is invalid.
LUC:06The required permissions are not met to call the listUsersCounts method.

Was this article helpful?

What's Next