All pages
Powered by GitBook
1 of 5

Loading...

Loading...

Loading...

Loading...

Loading...

Insert custom field values

Use case

We want to enter values for a custom field in a particular loan contract.

Use case data
API parameter with values

The field ID and the value you want to enter for the field.

The entity name and the contract for which you want to enter the value.

Sample API call

To enter the custom field value, use the following endpoint:

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/value

Learn more about the insert custom field values endpoint in the Tuum developer portal.

Sample request

The sample request body is as follows:

{
  "fieldValues": [
    {
      "fieldId": "AssetVal",
      "fieldValue": "5000"
    }
  ],
  "source": {
    "sourceName": "LOAN.CONTRACT_HEADER",
    "sourceRef": "INST2-1000"
  }
}
curl -X 'POST' \
  'https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/value' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMjZUMTM6MjE6NDIiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTMwNTYxMDJ9.Z1frJzD4gdb6P9sQ_D74s7tjj4Httc5cXEKuihXEHP4' \
  -H 'Content-Type: application/json' \
  -d '{
  "fieldValues": [
    {
      "fieldId": "AssetVal",
      "fieldValue": "5000"
    }
  ],
  "source": {
    "sourceName": "LOAN.CONTRACT_HEADER",
    "sourceRef": "INST2-1000"
  }
}'

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": null
}

Result

We have entered a custom field value for a loan contract. The field ID is AssetVal with the value 5000.

  • You can also enter values for other fields in the same request.

  • You cannot enter more than one value for the same custom field ID.

"fieldId": "AssetVal",
"fieldValue": "5000"
"sourceName": "LOAN.CONTRACT_HEADER",
"sourceRef": "INST2-1000"

Copy custom field values

Use case

In this scenario, we want to copy the value of a custom field from a particular loan application to a loan offer.

Use case data
API parameter with values

The entity and the ID from which you want to copy the values (in this case, LOAN.APPLICATION).

The entity and the ID to which you want to copy the values (in this case, LOAN.OFFER).

Sample API call

To copy the custom field values, use the following endpoint:

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/copy-values

Learn more about the copy custom field values endpoint in the Tuum developer portal.

Sample request

The sample request body is as follows:

{
  "fromSource": {
    "sourceName": "LOAN.APPLICATION",
    "sourceRef": "ID-1664282430"
  },
  "toSource": {
    "sourceName": "LOAN.OFFER",
    "sourceRef": "ID-1664282438"
  }
}
curl -X 'POST' \
  'https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/copy-values' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMjdUMTg6MDQ6MDAiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTMxNTk0NDB9.BANujXLC6EGVcD2lVe5vtr2Tbwz5gzGpQkA8gCOPSlc' \
  -H 'Content-Type: application/json' \
  -d '{
  "fromSource": {
    "sourceName": "LOAN.APPLICATION",
    "sourceRef": "ID-1664282430"
  },
  "toSource": {
    "sourceName": "LOAN.OFFER",
    "sourceRef": "ID-1664282438"
  }
}'

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": null
}

Result

With this API call, we have copied the values of the custom field from the LOAN.APPLICATION entity to the LOAN.OFFER entity.

For this API call to be successful, keep the following points in mind:

  • The field sets and the fields must exist in both entities and must have the same data type. The field ID and name can be different.

  • You can only copy values within the same module.

  • To copy the values, the field to which you are copying must have the parameters copyFromEntityName and copyFromFieldId defined. To know how to set these parameters, see Create fields with copied values. (If you have not defined these values while creating the field, you can also update the field later.)

"fromSource": {
    "sourceName": "LOAN.APPLICATION",
    "sourceRef": "ID-1664282430"  }
"toSource": {
    "sourceName": "LOAN.OFFER",
    "sourceRef": "ID-1664282438"  }

Deactivate field

Use case

If you do not want to use a custom field for an entity, you can deactivate it. Here we will learn how to do this.

You cannot delete a custom field once you have created it, you can only deactivate it.

Use case data
API parameter with values

The first path parameter is the entity name (in this case, LOAN.CONTRACT_HEADER).

The second path parameter is the field ID of the custom field that you want to deactivate.

Sample API call

To deactivate the custom field, use the following endpoint:

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/LOAN.CONTRACT_HEADER/field/AssetVal/deactivate

Learn more about the deactivate field endpoint in the Tuum developer portal.

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": {
    "fieldId": "AssetVal",
    "name": "AssetAmount",
    "fieldSetId": "Contract Extras",
    "entityName": "LOAN.CONTRACT_HEADER",
    "valueType": "NUMBER",
    "unique": false,
    "required": false,
    "active": false,
    "copyFromEntityName": null,
    "copyFromFieldId": null,
    "activityCode": null,
    "lookupEntityName": null,
    "lookupTypeCode": null
  }
}

Result

The custom field AssetVal has been deactivated and will not be usable for the loan contract header entity.

To activate the field, use the Update field endpoint and set the parameter as "active": true.

"...custom-fields/LOAN.CONTRACT_HEADER..."
"...field/AssetVal..."

Manage custom fields

In this section, we will learn about the operations we can perform with custom fields for the Loan API entities.

  • Enter values for custom fields.

  • Copy custom field values from one entity to another.

  • Deactivate the custom field.

  • Delete the value of a custom field.

Similarly, you can do these operations for other modules using the module-specific API endpoints.

Delete custom field value

Use case

In this scenario, we have a value for one of the custom fields in a particular loan contract. Here we will see how to delete the custom field value.

Use case data
API parameter with values

The entity name (in this case, LOAN.CONTRACT_HEADER).

The loan contract number.

The field ID whose value you want to delete.

Sample API call

To delete the custom field value, use the following endpoint:

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/value

Learn more about the delete custom field value endpoint in the Tuum developer portal.

Sample request

The sample request body is as follows:

{
  "source": {
    "sourceName": "LOAN.CONTRACT_HEADER",
    "sourceRef": "INST2-1000"
  },
  "fieldId": "AssetVal"
}
curl -X 'DELETE' \
  'https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/value' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMjZUMTU6MDA6MTAiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTMwNjIwMTB9.gScjkG6yEBnptOA9H4jGw5Jss8t5g5sOM7KU_AFpbCg' \
  -H 'Content-Type: application/json' \
  -d '{
  "source": {
    "sourceName": "LOAN.CONTRACT_HEADER",
    "sourceRef": "INST2-1000"
  },
  "fieldId": "AssetVal"
}'

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": null
}

Result

The value of the custom field AssetVal of the LOAN.CONTRACT_HEADER entity has been deleted.

"sourceName": "LOAN.CONTRACT_HEADER"
"sourceRef": "INST2-1000"
"fieldId": "AssetVal"