Output API function
Before using the functions on this page, you may find it useful to review the following information:
The list of all functions is here.
Description of this function |
|
---|---|
List of functions |
|
/service/getReportList
function – Get a list of all available tables and charts
To get the complete list of tables and charts, call the following:
function OnGetReportList() {
OnGetJson('/service/getreportlist');
}
A very abbreviated list of what is returned is as follows. The actual list is close to 100 charts and tables.
{
"Tables": [
"Cash flows (detailed)",
"Insurance premiums summary",
"ConsolidatedWealthSummaryReportIndividual",
"Co-contributions",
"Tax",
"TrustSummary",
"TrustBeneficiarySummary",
"TrustOrCompanySummary",
"PortfolioTrustOrCompany",
"PortfolioTrustOrCompanyDetailed",
"TrustOrCompanyDistribution",
"TrustOrCompanyDistributionDetails",
"TaxDistributionTrustOrCompany",
"TrustOrCompanyDetailsPerBeneficiary",
"TrustOrCompanyTaxDistributionDetails",
"PortfolioSMSFBalances",
"IndividualPortfolioBalanceSMSF",
"SMSFCashSummary",
"SMSFSummary",
"SMSFMemberBalance"
],
"Charts": [
"WealthSummary\\Assets and Loans",
"WealthSummary\\Assets Distribution",
"CashReserveSummary\\Balance",
"BuildSuperSummary\\Concessional",
"TrustSummary\Trust Assets and Loans",
"TrustSummary\Trust Assets Distribution",
"TrustBeneficiarySummary\Gifts Income",
"SMSFSummary\SMSF Assets and Loans",
"SMSFSummary\SMSF Assets Distribution",
"SMSFMemberSummary\SMSF Member Balance",
"SMSFCashSummary\SMSF Cash Balance",
"SMSFSharesSummary\Balance",
"SMSFSharesSummary\Purchased Sold",
"SMSFPropertySummary\Value and Loan balance",
"SMSFPropertySummary\Income vs Expenses",
"SMSFFixedInterestSummary\Balance",
"SMSFFixedInterestSummary\InvestmentsPayments"
]
};
The above sample list is provided in the sample case, and is loaded as follows:
function OnLoadSampleReports() {
$("#resultjson").show().html(JSON.stringify(tablesAndCharts, null, 2));
$("#apiresult").html("Sample list of reports loaded.");
}
/service/getDataFromReportList
function – Get data for a list of tables and charts
To get all the data for the sample list of tables and charts shown above, the user could call the following:
function OnGetReportDataFromList() {
var guid = $('#scenarioguid').val();
var data = JSON.parse($("#resultjson").html());
data.scenarioGuid = guid;
OnGetJson('/service/GetDataFromReportList', data);
}
Note: multiple reports can have the same ReportName
, so to have a unique identifier, the ReportName
needs to be combined with the ReportPath
and OwnerName
.
The OwnerName
can be:
On individual name
An SMSF name
A Trust name
"Consolidated" - this is for items that are owned by two or more individuals or for reports that cover the entire case, such as the 'Wealth summary report' that typically includes everything.
For example, if your list has the 'Cash flows (detailed)' report, it will return three reports with a ReportName
of 'Cash flows (detailed)', but combined with their ReportPath
, you will have three unique repors:
One table for 'Consolidated' (i.e. totals for all the individuals in the case). It will have:
ReportName
: "Cash flows (detailed)"ReportPath
: “Data\Actual value reports\INDL: Consolidated\Cash flows (detailed)”OwnerName
: "Consolidated"
One table for each individual in the case. In this format:
ReportName
: "Cash flows (detailed)"ReportPath
: “Data\Actual value reports\INDL: (individual name)\Cash flows (detailed)”OwnerName
: “Individual\(individual name)”
A very abbreviated sample of what is returned is as follows:
{
"Tables": [
{
"ReportName": "Cash flows (detailed)",
"ReportPath": "Data\Actual value reports\INDL: Robert Demo\Cash flows (detailed)",
"OwnerName": "Individual\Robert Demo",
"Data": [
{
"ColNames": [
"",
"",
"2022/23",
"2023/24",
"2024/25",
"2025/26",
"2026/27",
"2027/28",
"2028/29",
"2029/30",
"2030/31",
"2031/32",
"Presentation"
],
/service/getStrategyPaper
function – Get Strategy Paper
The third and final call in the Output API is to get the Strategy paper which is a Word document. This is the same call as in the Legacy API (for more details, see Legacy API). To get the Strategy paper call code similar to the following.
function OnGetStrategyPaper() {
var caseId = $('#caseid').val();
var guid = $('#scenarioguid').val();
window.location = "/service/getstrategypaper?caseId=" + caseId +
"&scenarioGuid=" + guid;
}