All pages
Powered by GitBook
1 of 1

Loading...

Create lookup translation

You can create or update the lookup code translation for a language using the language code.

Use case

Here we will create a translation for the lookup code DECLINED.

Use case data
API parameters with values

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

The second path parameter is the existing lookup type code (in this case, STATUS).

The third path parameter is the lookup code for which we want to create or update the translation (in this case, DECLINED).

The body consists of the language code and the translation text.

Sample API call

To create the translation, use the following endpoint:

https://lookup-api.sandbox.tuumplatform.com/api/v1/entity/LOAN.APPLICATION/lookup-type/STATUS/lookup/DECLINED/translation

Learn more about the create lookup transaction endpoint in the Tuum developer portal.

Sample request

The sample request body is as follows:

{
  "languageCode": "en",
  "translation": "Loan application declined"
}
curl -X 'POST' \
  'https://lookup-api.dev.tuum.xyz/api/v1/entity/LOAN.APPLICATION/lookup-type/STATUS/lookup/DECLINED/translation' \
  -H 'accept: */*' \
  -H 'x-channel-code: SYSTEM' \
  -H 'x-tenant-code: MB' \
  -H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDgtMTVUMTQ6MzQ6MTciLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIuRVUiLCJleHAiOjE2OTIxMTAwNTd9.TQNjpwGcewRRmkWGxeWiIWkC3heUcu25_lKgxYVcNJ8' \
  -H 'Content-Type: application/json' \
  -d '{
  "languageCode": "en",
  "translation": "Loan application declined"
}'

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": {
    "languageCode": "en",
    "translation": "Loan application declined"
  }
}

Result

We have created a translation for the DECLINED lookup code. You can also update the translation using the same endpoint.

"...entity/LOAN.LOAN_APPLICATION..."
"...lookup-type/STATUS/..."
"../DECLINED/translation..."
{
  "languageCode": "en",
  "translation": "Loan application declined"
}