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).
"fromSource": {
"sourceName": "LOAN.APPLICATION",
"sourceRef": "ID-1664282430" }The entity and the ID to which you want to copy the values (in this case, LOAN.OFFER).
"toSource": {
"sourceName": "LOAN.OFFER",
"sourceRef": "ID-1664282438" }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
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:
Result
With this API call, we have copied the values of the custom field from the LOAN.APPLICATION entity to the LOAN.OFFER entity.
Last updated
Was this helpful?