Field types

The following table summarizes every field type for it's corresponding data to be passed in any REST API.

Field Type Additional Notes

Data to be passed in Rest API

Auto-number Field

At the field level, Display Format, Starting Number can be defined.

The value for this field is not allowed during post call, however, we can change the existing value using Put call

{
"name":"AutoNumber Testing1",
"Auto": "S.NO#{YYYY}-{00001}"
}
Base Currency field Is a read-only field. Cannot pass data to this field from API  
Checkbox Field

Default value of the checkbox can be defined at the time of field creation

Valid values for checkbox are true or false.

When true is passed, the checkbox field is checked else unchecked.

{
"CheckboxField": "true"
}

Currency field Currency symbol is appended at the runtime based on the country defined for the field. {
"name":"CurrencyField Testing",
"CurrencyField": "223,561,089.02"
}
Date Field Valid format is - YYYY-MM-DD {
"name":"Date Testing",
"DateOfBirth": "2021-02-10"
}
Date/Time field Valid Format is -- YYYY-MM-DDThh:mm:ssZ {
"name":"DateTime Testing",
"StartTime": "2021-01-01T23:00:05Z"
}
Decimal field Default Size, Decimal Places, Default Value, Minimum and Maximum values can be defined at the time of field creation {
"name":"Decimal Testing",
"DecimalField": "19.757"
}
Dependent Picklist Field Values and its codes for the Group of Checkboxes field are defined at the field level.

In below example, values for Group of Checkboxes are "Baseball|BB", "Football|FB", "Cricket|cric", "Tennis|TN"

This is the request to set the values Cricket and Football

DPickListField

{
"name":"Setting Value for Dependent picklist",
"Country":"India",
"State": "Delhi"
}
Document Template Field   Similar to file upload field
Email Field   {
"name":"emailField Testing",
"email": "sailaja230221@yopmail.com"
}
Email Template Field   Similar to file upload field
Expression Field   We cannot set the value from the API. It is a read-only field
File Upload field Maximum File size can be defined at the field level. Default is 2MB

There are two ways to upload a file.

Directly giving the fileName in body in form-data mode

curl --location --request POST
'http://localhost:8830/prod1
/api2/data/RBObjWithAllFields
/442703363/fields/FileUploadField'
--header 'JWT: <JWT Value>
--header 'Content-Type: application/json'
--form 'value=@"/C:/Users/Jane Doe/Pictures/PDF 2.png"'

Passing the base64 encoded binary value of the file via form-date mode. In this way of passing contentType and fileName are mandatory.

curl --location --request POST 'http://localhost:8830/prod1
/api2/data/RBObjWithAllFields
/442703363/fields/FileUploadField'
--header 'JWT: value
--header 'Content-Type: application/json'
--form 'value="value"'
--form 'contentType="image/png"'
--form 'fileName="database.jpg"'

 

Formula Field   We cannot set the value from the API. It is a read-only field
Group Checkbox Field Values and its codes for the Group of Checkboxes field are defined at the field level.

For below example Values for Group of Checkboxes are "Baseball|BB", "Football|FB", "Cricket|cric", "Tennis|TN"

This is the request to set the values Cricket and Football

{
"name":"GroupCheckField Testing", "Sports": "Cricket|Football"
}

This is the request to set the codes for Cricket and Football via codes

{
"name":"Setting Group of Checkboxes using code",
"Sports": "BB|FB"
}
Image Upload field   Similar to file upload field
Integer field

Default, min and maximum values can be defined at the field level.

If the default value is defined at the field level, and if the user do not pass the value from the rest call, the default value will be populated automatically. Else, the user provided value will be set

{
"name":"IntegerField Testing",
"IntegerField": "30"
}
Integration Link Field   We cannot set the integration link value from the API. It is a read-only field
Password Field   {
"name":"passwordfield Testing",
"passwordfield": "sample"
}
Percent Field

Decimal Places, Default value, Minimum value and Maximum value can be defined at the field level.

If the default value is defined at the field level, and if user donot pass the value from the rest call, the default value will be populated automatically. Else, the user provided value will be set.

Default value for the Decimal Places is 2. Users can increase this value at the time of field creation. Based on this value the decimals will get stored.

{
"name":"PercentField Testing",
"Marks": "80.46"
}
Phone Number field Format should be based on the format defined at the phone field

When the country code option is not enabled

{
"name":"PhoneField Testing without country code option",
"PhoneNumber": "1234567890"
}

When the Country Codes option is enabled at the Phone Field

{
"name":"PhoneField Testing with country code enabled",
"PhoneNumber": "+1 1234567890"
}

Picklist Field Values and its codes for the picklist field are defined at the field level.

For below example, values for picklistField are "America|usa", "India|ind", "Australia|aus"

This is the request data to set the PicklistField value to the USA

{
"name":"Setting data using value",
"Country": "America"
}

This is the request data to set the PicklistField data via the code

{
"name":"Setting data using code",
"Country": "ind"
}

Picklist Multiselect Values and its codes for the Picklist (Multi-Select) field are defined at the field level.

For below example, values for picklistField are "Baseball|BB", "Football|FB", "Cricket|cric", "Tennis|TN"

This is the request data to select the values Baseball and Football

{
"name":"Seting Setting data using value",
"Sports": "Baseball|Football" }

This is the request data to set the PicklistField data via the code

{
"name":"Setting data using code",
"Sports": "BB|FB"
}
Radio Button Field Values and its codes for the Radio Button are defined at the field level.

For below example, values for Radio button field are "Computer Science Engineering|CS", "Electronics and Communications Engeneering|ECE", "Information Technology|IT"

This is the request to select the Information Technology value

{
"name":"Seting Setting data using value",
"Group": "Information Technology" }

This is the request to select the Information Technology value via code {
"name":"RadioField Testing",
"Group": "IT"
}

Reference Field   {
"name":"referencerecord Testing2",
"referencerecord": "442703394"
}
Related Field   {
"name":"RelatedField Testing2",
"R3158343": "442703394"
}
Roll-Up Summary Field   We cannot set the Roll-Up Summary field value from the API. It is a read-only field
Shared Image field   Similar to file upload field
Status Field   {
"name":"status Testing1", "Loanstatus": "Applied"
}
Tag Field   {
"name":"tag Testing2",
"fixVersion": "IBP_V5.10 IBP_V5.11"
}
Template Field   Similar to file upload field
Text field   {
"TextField": "Mytext"
}
Text Area Field   {
"textarea": "I am testing the textarea context"
}
Time field Valid Format is -- hh:mm:ss {
"name":"timefield Testing",
"EndTime": "23:00:05"
}
URL Field Format required - http/<https://<URL> Value> {
"name":"Setting website Url",
"website": "http://www.test.com"
}
Version Number Field Default Value and option for incrementing the version number when the record clone or updated can be set while defining the field values. {
"name":"VersionField Testing2",
"VersionField": "2"
}