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.