API: listCustomFields
  • 2 Minutes to read
  • Dark
    Light

API: listCustomFields

  • 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 listCustomFields method retreives custom user fields and custom organization fields.

Who Has Access

Administrators and owners have access to the listCustomFields method.

API Call XML Package

<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>listCustomFields</Method>
   <Parameters>
      <CustomField></CustomField>
   </Parameters>
</SmarterU>

CustomField Tag Group

The CustomField tag is required, but does not require any values.

API Response XML Package

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

<SmarterU>
    <Result>![CDATA[]]</Result>
    <Info>
        <CustomFields>
            <CustomField>
                <ID>![CDATA[]]</ID>
                <Name>![CDATA[]]</Name>
                <CreatedDate>![CDATA[]]</CreatedDate>
                <ModifiedDate>![CDATA[]]</ModifiedDate>
                <Type>![CDATA[]]</Type>
                <DataType>![CDATA[]]</DataType>
                <Status>![CDATA[]]</Status>
                <UserEditable>![CDATA[]]</UserEditable>
                <CertificateDisplay>![CDATA[]]</CertificateDisplay>
                <DataEncrypted>![CDATA[]]</DataEncrypted>
            </CustomField>
        </CustomFields>
    </Info>
    <Errors>
        <Error>
            <ErrorID></ErrorID>
            <ErrorMessage></ErrorMessage>
        </Error>
    </Errors>
</SmarterU> 

The CustomFields tag is a container for the custom fields returned by the listCustomFields method. Each custom field is contained in a CustomField tag and may contain the following.

ID

The custom field's system-generated identifier. 

Name

The custom field's name. 

CreatedDate

The date the custom field was added to the account.

ModifiedDate

The last date the custom field was edited. 

Type

Indicates the custom field's type:

DataType

The custom field's data type (i.e., date, text, hierarchy).

Status

Indicates whether the custom field is active:

  • Active - The custom field is active.
  • Deleted - The custom field has been deleted.

UserEditable

Indicates whether non-admin users can modify information for the custom user field:

  • 1 - Non-admin users are able to modify the custom user field's information.
  • 0 - Only administrators are able to modify the custom user field's information.

CertificateDisplay

Indicates whether the custom field's value displays when it's added to a certificate:

  • 1 - The custom field's value displays when it is added to a certificate.
  • 0 - The custom field's value is obscured using "****" when it is added to a certificate.

DataEncrypted

Indicates whether the custom field's value is encrypted in the database:

  • 1 - The custom field's value is encrypted in the database.
  • 0 - The custom field's value is not encrypted in the database.

Example API Response XML Package

Below is an example of an API response XML package.

<SmarterU>
    <Result>Success</Result>
    <Info>
        <CustomFields>
            <CustomField>
                <ID>1551</ID>
                <Name><!--[CDATA[Birth Date]]--></Name>
                <CreatedDate>2014-07-26 13:23:56.793</CreatedDate>
                <ModifiedDate>2018-05-30 19:31:55.997</ModifiedDate>
                <Type>User</Type>
                <DataType>Date</DataType>
                <Status>Active</Status>
                <UserEditable>1</UserEditable>
                <CertificateDisplay>1</CertificateDisplay>
                <DataEncrypted>0</DataEncrypted>
            </CustomField>

            <CustomField>
                <ID>1824</ID>
                <Name><!--[CDATA[Location]]--></Name>
                <CreatedDate>2015-05-23 15:30:04.09</CreatedDate>
                <ModifiedDate>2018-05-30 19:31:56.05</ModifiedDate>
                <Type>User</Type>
                <DataType>Hierarchy</DataType>
                <Status>Active</Status>
                <UserEditable>0</UserEditable>
                <CertificateDisplay>0</CertificateDisplay>
                <DataEncrypted>0</DataEncrypted>
            </CustomField>
        </CustomFields>
    </Info>

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

Error Codes

Error CodeMessage
LCF:01
The required permissions are not met to call the listCustomFields method.

Was this article helpful?