Create lookup type and codes

Use case

In this scenario, we will create a lookup type code STATUS with status codes 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).

"...entity/LOAN.LOAN_APPLICATION..."

The second path parameter is the lookup type code that we want to create (in this case, STATUS). Note: This must be a unique value. If you want to create lookup codes for an existing type, see the Create lookup code for existing type topic.

"...lookup-type/STATUS"

In the body, we will enter the status codes that we want to create.

"lookupCode": "CREATED",
"lookupCode": "ACCEPTED"

Sample API call

To create the lookup type code, use the following endpoint:

https://lookup-api.sandbox.tuumplatform.com/api/v1/entity/LOAN.LOAN_APPLICATION/lookup-type/STATUS

Learn more about the create lookup type and codes endpoint in the Tuum developer portal.

Sample request

The sample request body is as follows:

{
  "lookupTypeName": "Loan application status codes",
  "lookups": [
    {
      "lookupCode": "CREATED",
      "translations": [
        {
          "languageCode": "en",
          "translation": "Loan application created"
        }
      ]
    },
    {
        "lookupCode": "ACCEPTED",
        "translations":[
            {
                "languageCode": "en",
                "translation": "Loan application accepted"
            }
        ]
    }
  ]
}

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": null
}

Result

We have created the look type code called STATUS with the lookup types ACCEPTED and CREATED for loan applications.

Last updated

Was this helpful?