API: listTeams
  • 2 Minutes to read
  • Dark
    Light

API: listTeams

  • 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 listTeams method retrieves teams that meet the specified filters.

Who Has Access

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>listTeams</Method>
   <Parameters>
      <Team>
         <Page><![CDATA[]]></Page>
         <Filters>
            <TeamStatus><![CDATA[]]></TeamStatus>
            <CreatedDate>
               <CreatedDateFrom></CreatedDateFrom>
               <CreatedDateTo></CreatedDateTo>
            </CreatedDate>
            <ModifiedDate>
               <ModifiedDateFrom></ModifiedDateFrom>
               <ModifiedDateTo></ModifiedDateTo>
            </ModifiedDate>
         </Filters>
      </Team>
   </Parameters>
</SmarterU>

Team Tag Group

The Team tag may group is a container for how the response is returned and the team filters. 

<Team>
   <Page><![CDATA[]]></Page>
   <Filters>
      <TeamStatus><![CDATA[]]></TeamStatus>
      <CreatedDate>
         <CreatedDateFrom></CreatedDateFrom>
         <CreatedDateTo></CreatedDateTo>
      </CreatedDate>
      <ModifiedDate>
         <ModifiedDateFrom></ModifiedDateFrom>
         <ModifiedDateTo></ModifiedDateTo>
      </ModifiedDate>
   </Filters>
</Team>

Page (optional)

The page number to get. The default is 1.

Filters (optional)

A container for the team filters. Refer to Filters Tag Group.

Filters Tag Group

The Filters tag group is a container for team filters. 

<Filters>
   <TeamStatus><![CDATA[]]></TeamStatus>
   <CreatedDate>
      <CreatedDateFrom></CreatedDateFrom>
      <CreatedDateTo></CreatedDateTo>
   </CreatedDate>
   <ModifiedDate>
      <ModifiedDateFrom></ModifiedDateFrom>
      <ModifiedDateTo></ModifiedDateTo>
   </ModifiedDate>
</Filters>

The Filters tag may contain the following.

TeamStatus

The team's status. Acceptable values are Active, Inactive, or All.

CreatedDate

A container for filtering teams based on the UTC date it was created. This tag contains the following.

TagDescription
CreatedDateFromThe first date to include in the team's created date range filter in UTC format.
CreatedDateToThe last date to include in the team's created date range filter in UTC format.

ModifiedDate

A container for filtering the teams based on the UTC date it was last modified. This tag contains the following.

TagDescription
ModifiedDateFromThe first date to include in the team's modified date range filter in UTC format.
ModifiedDateToThe last date to include in the team's modified date range filter in UTC format.

API Response XML Package

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

<SmarterU>
   <Result></Result>
   <Info>
      <Teams>
         <Team>
            <ID><![CDATA[]]></ID>
            <Name><![CDATA[]]></Name>
            <Status><![CDATA[]]></Status>
            <CreatedDate><![CDATA[]]></CreatedDate>
            <ModifiedDate><![CDATA[]]></ModifiedDate>
         </Team>
      </Teams>
   </Info>

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

The Teams tag is a container for the teams returned by the listTeams method. Each team is contained in a Team tag and may contain the following.

ID

The team's system-generated identifier.

Name

The team's name.

Status

The team's status.

CreatedDate

The date the team was created.

ModifiedDate

The date the team was last updated.

Example API Response XML Package

Below is an example of an API response XML package.

<SmarterU>
   <Result></Result>
   <Info>
      <Teams>
         <Team>
            <ID><![CDATA[694]]></ID>
            <Name><![CDATA[Leadership]]></Name>
            <Status><![CDATA[Active]]></Status>
            <CreatedDate><![CDATA[2013-10-23 19:26:47.43]]></CreatedDate>
            <ModifiedDate><![CDATA[2013-10-23 19:26:47.43]]></ModifiedDate>
         </Team>
         <Team>
            <ID><![CDATA[696]]></ID>
            <Name><![CDATA[Shipping]]></Name>
            <Status><![CDATA[Active]]></Status>
            <CreatedDate><![CDATA[2016-12-10 10:04:00.42]]></CreatedDate>
            <ModifiedDate><![CDATA[2020-10-14 13:50:27.43]]></ModifiedDate>
         </Team>
      </Teams>
   </Info>
</SmarterU>

Error Codes

Error CodeMessage
LT:01The page number provided is not valid.
LT:02The team status provided is invalid.
LT:03The required permissions are not met to call the listTeams method.
LT:04The created date provided is not valid.
LT:05The modified date provided is not valid.

Was this article helpful?