Fields in JSON Data

In addition to standard properties such as Id and ProjectId etc, the API data may also contain a collection of Fields.

These are presented in name/value pairs that can be parsed and consumed.

Fields are useful when it is not known what data will be sent back and the JSON needs to be interrorgated dynamically.

Fields are also used for data that has been dynamically defined in the project. See Data Definitions for more details.

Example

A Submission contains a ReferenceNumber as an explict property but also as a field:

{
    "ReferenceNumber": "0007",
    "Fields": [{
        "Name": "ReferenceNumber",
        "Value": "0007"
    }]
}

HTML Fields

If there are any fields that contain HTML (RichText), then an additional field will be automatically added with the suffix _Text which shows the same data stripped of any HTML:

{
    "Name": "Label",
    "Value": "<b>magna</b>"
},
{
    "Name": "Label_Text",
    "Value": "magna"
}

Files

If the Field contains a file instead of a value then there will a Files property instead of Value

{
    "Name": "Presentation",
    "Files": [
        {
            "Id": 31,
            "MimeType": "application/pdf",
            "FileType": "PDF"
        }
    ]
}

The file can be downloaded from the Files End Point.

Label

If the data is for a dynamic object then it will include a Label property and field as defined by the Label Setting.