Run a predefined report
/lokta-lms/api/v1/runreports/{reportName}This resource allows you to run and receive output from pre-defined Lokta reports.
Reports can also be used to provide data for searching and workflow functionality.
The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URL.
The Lokta reference application uses a JQuery plugin called stretchy reporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).
Example Requests:
runreports/Client%20Listing?R_officeId=1
runreports/Client%20Listing?R_officeId=1&exportCSV=true
runreports/OfficeIdSelectOne?R_officeId=1¶meterType=true
runreports/OfficeIdSelectOne?R_officeId=1¶meterType=true&exportCSV=true
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1
Available Parameters (All Optional):
Common Control Parameters:
exportCSV: Set to true to export results as CSV (default: false)parameterType: Indicates if this is a parameter type request (default: false)output-type: Output format type (HTML, XLS, CSV, PDF)enable-business-date: Enable business date filteringobligDateType: Obligation date typedecimalChoice: Decimal formatting choicePortfolio at Risk by Branch: Portfolio risk parameter
Common Report Parameters (R_ prefixed):
R_officeId: Office ID filterR_loanOfficerId: Loan officer ID filterR_currencyId: Currency ID filterR_fromDate,R_toDate: Date range filters (yyyy-MM-dd)R_accountNo: Account number filterR_transactionId: Transaction ID filterR_branch: Branch filterR_ondate: Specific date filterR_cycleX,R_cycleY: Cycle filtersR_fromX,R_toY: Range filtersR_overdueX,R_overdueY: Overdue filtersR_endDate: End date filter
Other Common Parameters:
OfficeId: Office ID filter (alternative)loanOfficerId: Loan officer ID filter (alternative)currencyId: Currency ID filter (alternative)fundId: Fund ID filterloanProductId: Loan product ID filterloanPurposeId: Loan purpose ID filterparType: Portfolio at risk typeSelectGLAccountNO: GL account number selectionSelectLoanType: Loan type selection
Note: All parameters are optional and report-specific.
The exact parameters required depend on the specific report being executed.
Some reports may accept additional parameters not listed here.
Path parameters
reportNamepath · string · requiredThe name of the report to execute (e.g., 'Client Listing', 'Expected Payments By Date')
Query parameters
exportCSVquery · boolean · optionalSet to true to export results as CSV
parameterTypequery · boolean · optionalIndicates if this is a parameter type request
output-typequery · string · optionalOutput format type (HTML, XLS, CSV, PDF)
R_officeIdquery · string · optionalOffice ID filter
R_loanOfficerIdquery · string · optionalLoan officer ID filter
R_fromDatequery · string · optionalStart date filter (yyyy-MM-dd)
R_toDatequery · string · optionalEnd date filter (yyyy-MM-dd)
R_currencyIdquery · string · optionalCurrency ID filter
R_accountNoquery · string · optionalAccount number filter
Responses
200OK - Report executed successfully400Bad Request - Missing or invalid parameters401Unauthorized - Not authorized to run this report500Internal Server ErrorResponse fields
columnHeadersarray of ResultsetColumnHeaderData · optionaldataarray of ResultsetRowData · optionalEvery request authenticates with HTTP Basic and carries a Tenant-Identifier header. See the conventions for dates, commands, pagination and errors.
Open this operation in the interactive explorer, or read it as Markdown.
This is the API reference for Lokta, the agentic loan servicing platform. Go to lokta.ai