API – Actions & Results

General

Actions and results are a good way to standardize notes, so it can be determined how often specific actions and results occur, and facilitate searches for those actions and results. For more information on actions and results, see our article on how they're used in the UI.

Setup

You can add new actions or results to loans through the API, but can only create new actions and results that are available to add to loans through the LoanPro UI. You can navigate to actions and results within the LoanPro UI from Loan > Servicing > Notes and Alerts > Action and Results.

Adding Actions and Results to a Loan

In order to add actions and results to a loan, send a POST request to this endpoint:

https://loanpro.simnang.com/api/public/api/1/odata.svc/ActionResultNotes

Your payload should be something like:

{  
"note":"<p>Test Note (Can contain HTML)</p>",
"loanId":"${loanId}",
"ActionResultSelectionItems":{
"results":[
{
"Action":{
"__id":1
},
"Result":{
"__id":2
}
}
]
}
}

You can add multiple actions and results at once by adding more objects to the "results" array. The example below demonstrates how to add actions and results to a loan.

Getting Actions

You will likely want to pull the information about your actions and results in order to know what actions and results are available to you. In order to do this, send a GET request to this endpoint:

https://loanpro.simnang.com/api/public/api/1/odata.svc/Actions

The example below shows how to pull this information.

Actions and Results Report

You can use the API to pull a report of actions and results. To do this, send a POST request to this endpoint:

https://loanpro.simnang.com/api/public/api/1/Autopal.ActionResultsReport

Your payload should define your query parameters. Here is a sample payload:

{  
"query":null,
"reportOptions":{
"period":"today",
"dateFrom":"2019-03-07T00:00:01",
"dateTo":"2019-03-07T23:59:59",
"differenceByDate":"0",
"actions":[
{
"id":0,
"title":"Any"
}
],
"results":[
{
"id":0,
"title":"Any"
}
],
"customFields":{

},
"dateEnteredFrom":null,
"dateEnteredTo":null,
"selectedPortfolios":[
{
"category":"",
"portfolio":"",
"subportfolio":""
}
]
}
}

The example below will show you how to pull the report.


How did we do?


Powered by HelpDocs (opens in a new tab)