Create lookup code for existing type
Use case
Here we will create a lookup code DECLINED for an existing lookup type code STATUS for the LOAN.LOAN_APPLICATION entity.
Use case data
API parameters with values
The first path parameter is the entity name (in this case, LOAN.LOAN_APPLICATION).
The lookup code we want to create.
Sample API call
To create the lookup code, use the following endpoint:
Sample request
The sample request body is as follows:
{
"lookupCode": "DECLINED",
"translations": [
{
"languageCode": "en",
"translation": "Loan application declined"
}
]
}
curl --location 'https://lookup-api.sandbox.tuumplatform.com/api/v1/entity/LOAN.LOAN_APPLICATION/lookup-type/STATUS/lookup' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMDJUMjA6MjU6MzYiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTEwMDc5MzZ9.O4yMuD2hILuixy1bavlUdF7qTiPNjh1IzH5e_B54hsY' \
--header 'x-channel-code: system' \
--header 'Content-Type: application/json' \
--data '{
"lookupCode": "DECLINED",
"translations": [
{
"languageCode": "en",
"translation": "Loan application declined"
}
]
}'
Sample response
Below you will find the response to the sample request:
Response
{
"errors": null,
"validationErrors": null,
"data": null
}
Result
We have created a new lookup code for the STATUS
lookup type for loan applications.