Get Profile fields

Description

This service provides a comprehensive list of all potential fields that can be used in a party's profile, including their properties, types, and validation rules. This is essential for dynamically building registration or profile update forms.


Field Properties

Each field object returned by the service has the following properties:

Property
Description

name

A unique key that identifies the field (e.g., person.profile.address).

code

A short, non-unique code for the field (e.g., address).

owner

The entity the field belongs to (profile or point_of_sale).

type

The data type of the field, which determines how it should be rendered. See "Field Types" below.

required

A boolean indicating if the field is mandatory.

editable

A boolean. If false, the field can be set during registration but not edited later.

principal

A boolean. If true, this field is a primary identifier for the user (e.g., for login).

enumValues

If the type is ENUM, this array contains the list of possible string values.

refEntity

If the type is REFERENCE, this property specifies the entity being referenced (e.g., Country).

subfields

An array of field objects for composite types like ADDRESS or PHONE_NUMBER.


Field Types

The type property can have one of the following values:

Type
Description

TEXT

A single line of text.

LARGETEXT

A multi-line block of text.

DECIMAL

A number that accepts decimal values.

NUMBER

An integer without decimal values.

BOOLEAN

A true or false value.

DATE

A date value.

PASSWORD

A string for a password field.

EMAIL

A string that must be a valid email address.

IMAGE

A string containing a URL to an image.

DOCUMENT

A composite field with type (Reference to DocumentType) and number (Text) subfields.

REFERENCE

A reference to another entity, typically rendered as a dropdown. See refEntity.

ENUM

A field with a fixed set of options. See enumValues.

PHONE_NUMBER

A composite field with intCode, areaCode, number, and type (Enum) subfields.

CELL_PHONE

A composite field with intCode, areaCode, and number subfields.

ADDRESS

A composite field with street1, street2, city, postalCode, stateId (Reference), countryId (Reference), type (Enum), latitude, and longitude subfields.


API Endpoint

Description

This API call retrieves the field definitions for the touchpoint.

Endpoints

This service can be called on a Person, Physical Location, or Company entity.

GET https://<server-url>/api/v4/person/fields
GET https://<server-url>/api/v4/physicallocation/fields
GET https://<server-url>/api/v4/company/fields

Parameters

Parameter
Location
Description

touchpoint

Query / Header

The identifier for the touchpoint. Use Thalamus-Touchpoint for the header.

token

Query / Header

The authentication token for the API. Use Thalamus-Token for the header.

activity

Query / Header

Optional. The activity to be used. Use Thalamus-Activity for the header.

Content-Type

Header

Specifies the content type of the request body. Must be application/json.

Full URL Example

https://<server-url>/api/v4/person/fields?touchpoint=test&token=...

Request Body

This request does not have a body.


Example Response

A successful request returns a 200 OK status and a JSON object containing three arrays of field definitions: profileFields, consumerFields, and credentialFields.

JSON

{
  "profileFields": [
    {
      "code": "address",
      "name": "person.profile.address",
      "type": "ADDRESS",
      "required": false,
      "editable": true,
      "subfields": [
        {
          "code": "street1",
          "type": "TEXT"
        },
        {
          "code": "countryId",
          "type": "REFERENCE",
          "refEntity": "Country"
        },
        {
          "code": "type",
          "type": "ENUM",
          "enumValues": [
            "home",
            "work",
            "other"
          ]
        }
      ]
    },
    {
      "code": "email",
      "name": "person.profile.email",
      "type": "EMAIL",
      "required": true,
      "editable": false,
      "principal": true
    }
  ],
  "consumerFields": [
    {
      "code": "activeConsumer",
      "type": "BOOLEAN",
      "required": true
    },
    {
      "code": "preferedBrandId",
      "type": "REFERENCE",
      "required": false,
      "refEntity": "Brand"
    }
  ],
  "credentialFields": [
    {
      "code": "principal",
      "type": "TEXT",
      "required": true
    },
    {
      "code": "password",
      "type": "PASSWORD",
      "required": true
    }
  ]
}

Last updated

Was this helpful?