All pages
Powered by GitBook
1 of 4

Loading...

Loading...

Loading...

Loading...

Create fields with copied values

In cases where you want the values of a custom field to be carried forward to other entities within the same module, you can define the parameters as shown in this topic.

Use case

We will create fields for an existing field set under the risk scoring request entity. In this scenario, we want the values for this field to be copied from a field in another entity in the risk module.

Use case data
API parameter with values

The path parameter is the entity name for which you are creating the field (in this case, RISK.SCORING_REQUEST).

In the body, we will enter a unique field ID, name, and data type. Also, we will specify the field set ID for which we are creating the field. Note: The data type must be the same as the field from which you want to copy values. The field ID and name can be different.

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

The entity name and field ID from which the values will be copied.

You can only copy values within the same module.

Sample API call

To create the field, use the following endpoint:

Sample request

The sample request body is as follows:

{
  "fieldId": "internalCreditRating",
  "name": "Measures probability of default according to internal credit rating model",
  "fieldSetId": "CreditCheck",
  "valueType": "TEXT",
  "unique": false,
  "required": false,
  "active": true,
  "copyFromEntityName": "RISK.SCORING_DECISION",
  "copyFromFieldId": "internalCreditRating"
}
curl -X 'POST' \
  'https://risk-api.sandbox.tuumplatform.com/api/v1/custom-fields/RISK.SCORING_REQUEST/field' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMjdUMTk6MjQ6MzUiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTMxNjQyNzV9.KJZZkUnt78W3AQ1him30sETCp1WIGFvnRK9h-QGnbmo' \
  -H 'Content-Type: application/json' \
  -d '{
  "fieldId": "internalCreditRating",
  "name": "Measures probability of default according to internal credit rating model",
  "fieldSetId": "CreditCheck",
  "valueType": "TEXT",
  "unique": false,
  "required": false,
  "active": true,
  "copyFromEntityName": "RISK.SCORING_DECISION",
  "copyFromFieldId": "internalCreditRating"
}'

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": "CreditCheck",
    "entityName": "RISK.SCORING_REQUEST",
    "valueType": "TEXT",
    "unique": false,
    "required": false,
    "active": true,
    "copyFromEntityName": "RISK.SCORING_DECISION",
    "copyFromFieldId": "internalCreditRating",
    "activityCode": null,
    "lookupEntityName": null,
    "lookupTypeCode": null
  }
}

Result

We have created a custom field so that values that are entered for one entity will be copied to another.

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

Learn more about the endpoint in the Tuum developer portal.

".../custom-fields/RISK.SCORING_REQUEST..."
"fieldId": "internalCreditRating",
"name": "Measures probability of default according to internal credit rating model",
"fieldSetId": "CreditCheck",
"valueType": "TEXT"
"unique": false,
"required": false,
"active": true
"copyFromEntityName": "RISK.SCORING_DECISION",

"copyFromFieldId": "internalCreditRating"
create field

Create field set

Use case

We will create a field set for additional scoring details under the risk scoring decision entity.

Use case data
API parameter with values

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

The body consists of a unique field set ID and name.

Sample API call

To create the field set, use the following endpoint:

Sample request

The sample request body is as follows:

{
  "name": "Additional scoring details",
  "fieldSetId": "additional_scoring"
}
curl -X 'POST' \
  'https://risk-api.sandbox.tuumplatform.com/api/v1/custom-fields/RISK.SCORING_DECISION/field-set' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMjVUMTY6Mzc6MDkiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTI5ODE0Mjl9.XrSvnLNcGZZZT4V1iW9-N0CxRu-85oZlKouH8o6r9ao' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Additional scoring details",
  "fieldSetId": "additional_scoring"
}'

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": {
    "entityName": "RISK.SCORING_DECISION",
    "fieldSetId": "additional_scoring",
    "name": "Additional scoring details"
  }
}

Result

We have created a field set for additional risk scoring details. Next, we will create fields for the field set that we just made.

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.

  • 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:

Sample request

The sample request body is as follows:

Sample response

Below you will find the response to the sample request:

Response

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.

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

Learn more about the endpoint in the Tuum developer portal.

Use case data
API parameter with values

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

Learn more about the endpoint in the Tuum developer portal.

".../custom-fields/RISK.SCORING_DECISION..."
"name": "Additional scoring details",
"fieldSetId": "additional_scoring"
create field set

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
{
  "fieldId": "internalCreditRating",
  "name": "Measures probability of default according to internal credit rating model",
  "fieldSetId": "additional_scoring",
  "valueType": "TEXT",
  "unique": false,
  "required": false,
  "active": true
}
curl -X 'POST' \
  'https://risk-api.sandbox.tuumplatform.com/api/v1/custom-fields/RISK.SCORING_DECISION/field' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMjVUMTc6MDc6MDkiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTI5ODMyMjl9.Y0_3k2kYrzzlF74jKZrHzprX1LUXOgTVrbeKN0s5fzo' \
  -H 'Content-Type: application/json' \
  -d '{
  "fieldId": "internalCreditRating",
  "name": "Measures probability of default according to internal credit rating model",
  "fieldSetId": "additional_scoring",
  "valueType": "TEXT",
  "unique": false,
  "required": false,
  "active": true
}'
{
  "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
  }
}
create fields

Create custom fields

In this section, we will learn how to create custom fields for the entities under Risk API:

Similarly, you can create custom fields for other modules using the module-specific API endpoints.

First, we will for the risk scoring entity.

Then, we will for the field set.

We will also from another entity.

create a field set
create a field
create a field whose values can be copied