API: getOrganization
  • 1 Minute to read
  • Dark
    Light

API: getOrganization

  • 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 getOrganization method retrieves an organization's details.

Who Has Access

The following users have access to the createOrganization method:

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>getOrganization</Method>
   <Parameters>
      <Organization>
         <Name><![CDATA[]]></Name>
      </Organization>
   </Parameters>
</SmarterU>

Organization Tag Group

The Organization tag group is a container for the organization filter. 

<Organization>
   <Name><![CDATA[]]></Name>
</Organization>

The Organization tag contains the following.

Name

The organization's name. This is the Organization returned by the getUser method.

API Response XML Package

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

<SmarterU>
   <Result></Result>
   <Info>
      <Organization>
         <Name><![CDATA[]]></Name>
         <OrganizationID><![CDATA[]]></OrganizationID>
         <Created_Date><![CDATA[]]></Created_Date>
         <Modified_Date><![CDATA[]]></Modified_Date>
         <Status><![CDATA[]]></Status>
         <Email><![CDATA[]]></Email>
         <PhonePrimary><![CDATA[]]></PhonePrimary>
         <PhoneAlternate><![CDATA[]]></PhoneAlternate>
         <Fax><![CDATA[]]></Fax>
         <Address1><![CDATA[]]></Address1>
         <Address2><![CDATA[]]></Address2>
         <City><![CDATA[]]></City>
         <PostalCode><![CDATA[]]></PostalCode>
         <Province><![CDATA[]]></Province>
         <Country><![CDATA[]]></Country>
         <Website><![CDATA[]]></Website>
         <UserCount></UserCount>
 
         <CustomFields>
            <CustomField type="">
               <Name><![CDATA[]]></Name>
               <Value><![CDATA[]]></Value>
            </CustomField>
         </CustomFields>

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

The organization is contained in an Organization tag and may contain the following.

Name

The organization's name.

OrganizationID

The organization's user-specified identifier.

Created Date

The date the organization was added.

Modified Date

The date the organization was last updated.

Status

The organization's status (i.e., Active or Inactive).  

Email

The email address for the organization.

PhonePrimary

The organization's primary phone number.

PhoneAlternate

The organization's alternate phone number.

Fax

The organization's fax number.

Address1

The first line of the organization's physical address.

Address2

The second line of the organization's physical address.

City

The city where the organization is located.

PostalCode

The postal code where the organization is located.

Province

The province where the organization is located.

Country

The country where the organization is located.

Website

The URL of the organization's website.

UserCount

The number of users associated with the organization.

CustomFields

A container for custom organization fields. Each custom field is contained in a CustomField tag and contains the following.

Name

The custom organization field's name.

Value

The custom organization field's value.

Example API Response XML Package

Below is an example of an API response XML package.

<SmarterU>
   <Result>Success</Result>
   <Info>
      <Organization>
         <Name><![CDATA[Finesse Inc.]]></Name>
         <OrganizationID><![CDATA[O-945]]></OrganizationID>
         <Created_Date><![CDATA[2013-06-10 18:09:27.333]]></Created_Date>
         <Modified_Date><![CDATA[2018-06-06 15:02:03.34]]></Modified_Date>
         <Status><![CDATA[Active]]></Status>
         <Email><![CDATA[info@finesseinc.com]]><Email/>
         <PhonePrimary><![CDATA[800-877-1722]]></PhonePrimary>
         <PhoneAlternate><![CDATA[800-877-1744]]></PhoneAlternate>
         <Fax><![CDATA[800-877-1799]]></Fax>
         <Address1><![CDATA[59201 Jezebel Lane SW]]></Address1>
         <Address2><![CDATA[Suite 100]]></Address2>
         <City><![CDATA[New York]]></City>
         <PostalCode><![CDATA[12345]]></PostalCode>
         <Province><![CDATA[New York]]></Province>
         <Country><![CDATA[United States]]></Country>
         <Website><![CDATA[http://www.finesseinc.com]]></Website>
         <UserCount>4</UserCount>
         <CustomFields>
 
            <CustomField type="String">
               <Name><![CDATA[Distributor Level]]></Name>
               <Value><![CDATA[Platinum]]></Value>
            </CustomField>
 
         </CustomFields>
      </Organization>
   </Info>
 
   <Errors>
   </Errors>
</SmarterU>

Error Codes

Error CodeMessage
GO:01
The name provided is not valid.
GO:02
The required permissions are not met to call the getOrganization method.
GO:03
The requested organization does not exist.

Was this article helpful?