API - Special Report

General

The special report makes it possible to create an exportable report similar to the custom query.  The difference is that with the special report, you can specify your own delimiter or you can choose to export as a text file.  When you format the export as text, you will be able to specify the starting position and number of characters for each piece of data.  This is useful when submitting data for use with older software that looks at character position in a string of text to split up data rather than a delimiter character.

Please Note: Computation fields are only intended to be used for the UI and are not intended to be used for reports or other processes that allow you to pull these fields. The use of computation fields in Special Reports is not recommended with any volume over 1000 records and/or multiple computation fields selected. If these recommendations are exceeded, the desired report may take longer than the standard allotted 24-hour time period to generate, and thus will automatically be deleted before completion. 

STEP 1: Generate the Report

In order to generate the report, you will need to have set up at least on special report template. To kick off the generation of the report, send the following request:

POST https://loanpro.simnang.com/api/public/api/1/Autopal.GenerateSpecialReport({ID})

There is no payload for this report. Remember to replace the {ID} with the ID of the template you want to generate.

STEP 2: Response

When your request is successfully sent to the server, the server will reply with a response. This response is important since it gives important information about how to find the special report once it is generated. Below is a sample response:

{
   "d":{
      "__metadata":{
         "uri":"http://loanpro.simnang.com/api/public/api/1/odata.svc/DataDumps(id=1)",
         "type":"Entity.DataDump"
      },
      "id":1,
      "entityType":"Reports.Special1",
      "fileName":null,
      "url":null,
      "status":"dataDumpProcess.status.inProgress",
      "created":"/Date(1480092388)/",
      "createUser":"API User",
      "info":"custom search"
   }}

There are several important fields. The first is the “id” field; this is the id of the DataDump entity which will hold the special report  information. The second is the status, which specifies the status of the special report. Finally, there is the URL. Initially, the URL will be null since the special report is in the generation process. However, if the special report finishes successfully then it will be the URL from which the report can be generated. Please note that custom queries are only kept on the LoanPro server for about 24 hours after generation has completed. Once the file has existed for 24 hours it will be deleted.

STEP 3: Ping the API

To check a special report status, simply send a GET request to the following URL:

GET https://loanpro.simnang.com/api/public/api/1/odata.svc/DataDumps({ID})

Replace “{ID}” with the ID received from the earlier server response. When the status field is set to “dataDumpProcess.status.complete”, it means that the report was successfully generated. When this happens, check the URL field to get the file URL.

STEP 4: Downloading a Completed Special Report

Once your special report is complete, send a GET request to the URL in the “url” field of the DataDump entity. The URL will include an AWS security token, so you won't need an Authorization header with the request. This will give you a CSV file that you can then save and process. Below is an example:

Loan ID,Nxt Pmt Amt
"44449995",""
"44450003",""
"44450053","150.00"
"44450055",""
"44450082","2083.83"
"44450083","1917.41"
"44450084","2085.83"


How did we do?


Powered by HelpDocs (opens in a new tab)