All pages
Powered by GitBook
1 of 1

Loading...

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:

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.

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

Learn more about the endpoint in the Tuum developer portal.

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 . (If you have not defined these values while creating the field, you can also later.)

"fromSource": {
    "sourceName": "LOAN.APPLICATION",
    "sourceRef": "ID-1664282430"  }
"toSource": {
    "sourceName": "LOAN.OFFER",
    "sourceRef": "ID-1664282438"  }
copy custom field values
Create fields with copied values
update the field