All pages
Powered by GitBook
1 of 1

Loading...

Update field

Use case

We will update an existing field in the loan header contract entity. In this case, we will mark the field as required.

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 that you want to update.

In the body, we will enter the required parameters with the updated values.

Sample API call

To update the field, use the following endpoint:

Sample request

The sample request body is as follows:

{
  "name": "Residual Value",
  "fieldSetId": "Contract Extras",
  "unique": false,
  "required": true,
  "active": true
}
curl -X 'PUT' \
  'https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/LOAN.CONTRACT_HEADER/field/ResVal' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMjZUMTE6Mzg6MTQiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTMwNDk4OTR9.h1D0THssTHbFygVvRpwI6Bcz9TrogtS80wvf8IqTrI4' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Residual Value",
  "fieldSetId": "Contract Extras",
  "unique": false,
  "required": true,
  "active": true
}'

Sample response

Below you will find the response to the sample request:

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

Result

We have now updated the field Residual Value as a required field.

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

Learn more about the endpoint in the Tuum developer portal.

".../custom-fields/LOAN.CONTRACT_HEADER..."
".../field/ResVal"
"required": true
update field