All pages
Powered by GitBook
1 of 5

Loading...

Loading...

Loading...

Loading...

Loading...

Find custom fields

In this section, we will learn how to find the custom fields for the Loan API:

Similarly, you can perform these searches for other modules using the module-specific API endpoints.

that have been created.

for a particular field set.

Perform a .

of a custom field.

Find the field sets
Find the details of the fields
search for custom field sources
Get the value

Get custom field value

Use case

For a particular loan contract, a value has been entered for one of the custom fields. In this scenario, we will find the value of the custom field for that loan contract.

Use case data
API parameters with values

The first query parameter is the entity name (in this case, LOAN.CONTRACT_HEADER).

The second query parameter is the loan contract number whose custom field values you want to find.

Sample API call

To find the custom field value, use the following endpoint:

Get custom field values

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": [
    {
      "fieldId": "AssetVal",
      "fieldName": "AssetAmount",
      "valueType": "NUMBER",
      "fieldValue": "4500",
      "fieldSetName": "Extra details for contract headers",
      "lookupEntityName": null,
      "lookupTypeCode": null
    }
  ]
}

Result

From the response, we can see the custom field value for the loan contract.

Search custom field sources

Use case

Consider that we have additional codes as custom fields for loan applications. Here we want to find the applications with the code number 55.

Use case data
API parameters with values

The entity name (in this case, LOAN.APPLICATION).

The field ID and the value that you want to search.

Sample API call

To search the values for the parameters we have specified, use the following endpoint:

Please remember that this API call uses the POST method to perform the search function.

Sample request

The sample request body is as follows:

{
  "pageNumber": 1,
  "pageSize": 3,
  "sourceName": "LOAN.APPLICATION",
  "fields": [
    {
      "fieldId": "codeNumber",
      "fieldValue": 55
    }
  ]
}
curl -X 'POST' \
  'https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/source/search' \
  -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 '{
  "pageNumber": 1,
  "pageSize": 3,
  "sourceName": "LOAN.APPLICATION",
  "fields": [
    {
      "fieldId": "codeNumber",
      "fieldValue": 55
    }
  ]
}'

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": {
    "values": [
      {
        "sourceName": "LOAN.APPLICATION",
        "sourceRef": "ID-1664282430",
        "sourceLink": null
      },
      {
        "sourceName": "LOAN.APPLICATION",
        "sourceRef": "ID-1664282446",
        "sourceLink": null
      }
    ],
    "pageNumber": 1,
    "pageSize": 3,
    "endReached": true,
    "sort": null
  }
}

Result

From the response, we can see the list of loan applications with the code number 55.

Find fields

Use case

Here we will find the details of all the fields for the loan contract header entity.

Sample API call

To find the fields, use the following endpoint:

Sample response

Below you will find the response to the sample request:

Result

From the response, we can see the details of the defined fields for the loan contract header entity.

If there is more than one field set in the entity, the details of all the fields are returned in the response.

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/value?sourceName=LOAN.CONTRACT_HEADER&sourceRef=INST2-1000

Learn more about the endpoint in the Tuum developer portal.

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/source/search

Learn more about the endpoint in the Tuum developer portal.

Use case data
API parameters with values

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/LOAN.CONTRACT_HEADER/field

Learn more about the endpoint in the Tuum developer portal.

Response
"...sourceName=LOAN.CONTRACT_HEADER..."
"...&sourceRef=INST2-1000"
"sourceName": "LOAN.APPLICATION"
"fieldId": "codeNumber",
"fieldValue": 55
get custom field value
search custom field sources

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

"...custom-fields/LOAN.CONTRACT_HEADER/..."
{
  "errors": null,
  "validationErrors": null,
  "data": [
    {
      "fieldId": "AssetVal",
      "name": "AssetAmount",
      "fieldSetId": "Contract Extras",
      "entityName": "LOAN.CONTRACT_HEADER",
      "valueType": "NUMBER",
      "unique": false,
      "required": false,
      "active": true,
      "copyFromEntityName": null,
      "copyFromFieldId": null,
      "activityCode": null,
      "lookupEntityName": null,
      "lookupTypeCode": null
    },
    {
      "fieldId": "InitVal",
      "name": "Initial Downpayment",
      "fieldSetId": "Contract Extras",
      "entityName": "LOAN.CONTRACT_HEADER",
      "valueType": "NUMBER",
      "unique": false,
      "required": false,
      "active": true,
      "copyFromEntityName": null,
      "copyFromFieldId": null,
      "activityCode": null,
      "lookupEntityName": null,
      "lookupTypeCode": null
    },
    {
      "fieldId": "ResVal",
      "name": "Residual Value",
      "fieldSetId": "Contract Extras",
      "entityName": "LOAN.CONTRACT_HEADER",
      "valueType": "NUMBER",
      "unique": false,
      "required": false,
      "active": true,
      "copyFromEntityName": null,
      "copyFromFieldId": null,
      "activityCode": null,
      "lookupEntityName": null,
      "lookupTypeCode": null
    }
  ]
}
find fields

Find field sets

Use case

Here we will find the existing field sets for the loan contract entity.

Use case data
API parameters with values

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

Sample API call

To find the field sets, use the following endpoint:

Sample response

Below you will find the response to the sample request:

Response
{
  "errors": null,
  "validationErrors": null,
  "data": [
    {
      "entityName": "LOAN.CONTRACT_HEADER",
      "fieldSetId": "Contract Extras",
      "name": "Contracts"
    }
  ]
}

Result

From the response, we can see that the entity LOAN.CONTRACT_HEADER has one field set with ID Contract Extras. Next, we will find the details of all the fields for this entity.

https://loan-api.sandbox.tuumplatform.com/api/v1/custom-fields/LOAN.CONTRACT_HEADER/field-set

Learn more about the endpoint in the Tuum developer portal.

"...custom-fields/LOAN.CONTRACT_HEADER/..."
find field sets