Create fields

Use case

We will create fields for the additional scoring details field set under the risk scoring decision entity. In this scenario, we are creating a field for internal credit ratings.

Use case data
API parameter with values

The path parameter is the entity name (in this case, RISK.SCORING_DECISION).

".../custom-fields/RISK.SCORING_DECISION..."

In the body, we will enter a unique field ID, name, and value type.

Also, we will specify the field set ID for which we are creating the field.

"fieldId": "internalCreditRating",
"name": "Measures probability of default according to internal credit rating model",
"fieldSetId": "additional_scoring",
"valueType": "TEXT"

We will also specify whether the field is unique, required, and active.

"unique": false,
"required": false,
"active": true
  • The allowed values for the parameter valueType are: NUMBER, TEXT, DATE, DATETIME, BOOLEAN, JSON

  • The parameter "unique": false means that the field value does not need to be unique. If you set it as true the field value must be unique.

  • The parameter "required": false means that the field is an optional field. If you set it as true a value must be entered for the field.

  • The parameter "active": true means that the field will be used for the entity. If you set it as false the field will not be applicable.

Sample API call

To create the field, use the following endpoint:

https://risk-api.sandbox.tuumplatform.com/api/v1/custom-fields/RISK.SCORING_DECISION/field

Learn more about the create fields endpoint in the Tuum developer portal.

Sample request

The sample request body is as follows:

{
  "fieldId": "internalCreditRating",
  "name": "Measures probability of default according to internal credit rating model",
  "fieldSetId": "additional_scoring",
  "valueType": "TEXT",
  "unique": false,
  "required": false,
  "active": true
}

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": {
    "fieldId": "internalCreditRating",
    "name": "Measures probability of default according to internal credit rating model",
    "fieldSetId": "additional_scoring",
    "entityName": "RISK.SCORING_DECISION",
    "valueType": "TEXT",
    "unique": false,
    "required": false,
    "active": true,
    "copyFromEntityName": null,
    "copyFromFieldId": null,
    "activityCode": null,
    "lookupEntityName": null,
    "lookupTypeCode": null
  }
}

Result

We have created a custom field so that values can be entered for internal credit rating for the additional risk scoring details field set.

Last updated

Was this helpful?