Skip to main content

Reports Service

Reports gives you access to Deskera Books' core financial reports — General Ledger, Trial Balance, Profit and Loss, and Balance Sheet. These reports summarize your accounting data over a given date range and accounting basis (accrual or cash), letting you monitor account balances, business performance, and the overall financial position of your company.

API


Get General Ledger

Returns account balances and period movement for a given date range. Supports filtering by account group, specific account codes, and currency.

Parameters

  • fromDate Date
  • toDate Date
  • accountGroupId long
  • customfield string
  • basis string
  • accountCodes list
  • amountInPrimaryCurrency boolean
  • baseCurrency string
  • primaryCurrency string
  • page int
  • limit int
  • budget boolean
  • currencyCodes list
  • accessToken string

Code

  @Autowired
private ReportsApiClient reportsApiClient;

public Page<AccountGLInfo> getGeneralLedgerReport(Date fromDate, Date toDate, Long accountGroupId, String customfield,
ACCOUNTING_BASIS basis, List<String> accountCodes, Boolean amountInPrimaryCurrency, String baseCurrency,
String primaryCurrency, Integer page, Integer limit, Boolean budget, List<String> currencyCodes, String accessToken){
return this.reportsApiClient.getGeneralLedgerReport(fromDate, toDate, accountGroupId, customfield, basis,
accountCodes, amountInPrimaryCurrency, baseCurrency, primaryCurrency, page, limit, budget, currencyCodes, accessToken);
}

Get General Ledger Detail

Returns the journal entry line items that make up the General Ledger balance for a single account.

Parameters

  • account string
  • fromDate Date
  • toDate Date
  • customfield string
  • contactCodes list
  • amountInPrimaryCurrency boolean
  • baseCurrency string
  • primaryCurrency string
  • page int
  • limit int
  • sortDir string
  • accessToken string

Code

  @Autowired
private ReportsApiClient reportsApiClient;

public List<JournalEntryDetails> getGeneralLedgerDetail(String account, Date fromDate, Date toDate, String customfield,
Set<String> contactCodes, Boolean amountInPrimaryCurrency, String baseCurrency, String primaryCurrency,
Integer page, Integer limit, String sortDir, String accessToken){
return this.reportsApiClient.getGeneralLedgerDetail(account, fromDate, toDate, customfield, contactCodes,
amountInPrimaryCurrency, baseCurrency, primaryCurrency, page, limit, sortDir, accessToken);
}

Get Trial Balance

Returns a snapshot of opening, debit, credit, and closing balances for every account over a given date range.

Parameters

  • fromDate Date
  • toDate Date
  • customfield string
  • basis string
  • amountInPrimaryCurrency boolean
  • baseCurrency string
  • primaryCurrency string
  • sort string
  • sortDir string
  • optimisedFetch boolean
  • accessToken string

Code

  @Autowired
private ReportsApiClient reportsApiClient;

public TrialBalanceDetailsDto getTrialBalanceReport(Date fromDate, Date toDate, String customfield, ACCOUNTING_BASIS basis,
Boolean amountInPrimaryCurrency, String baseCurrency, String primaryCurrency, String sort, String sortDir,
Boolean optimisedFetch, String accessToken){
return this.reportsApiClient.getTrialBalanceReport(fromDate, toDate, customfield, basis, amountInPrimaryCurrency,
baseCurrency, primaryCurrency, sort, sortDir, optimisedFetch, accessToken);
}

Get Profit and Loss

Returns income, cost of goods sold, expenses, and net profit/loss for the requested period(s), grouped into a nested account hierarchy.

Parameters

Code

  @Autowired
private ReportsApiClient reportsApiClient;

public PNLCustomViewGrouping getProfitAndLossReport(CustomViewRequest customViewRequest, String accessToken){
return this.reportsApiClient.getProfitAndLossReport(customViewRequest, accessToken);
}

Get Balance Sheet

Returns assets, liabilities, and equity as of the requested period(s), grouped into a nested account hierarchy.

Parameters

Code

  @Autowired
private ReportsApiClient reportsApiClient;

public BalanceSheetInfoCustomGroupingView getBalanceSheetReport(CustomViewRequest customViewRequest, String accessToken){
return this.reportsApiClient.getBalanceSheetReport(customViewRequest, accessToken);
}

Objects


AccountGLInfo

Account-level General Ledger balance, returned by Get General Ledger.

AttributeTypeDescription
codestringRow code.
accountCodestringAccount code.
accountNamestringAccount name.
accountGroupstringAccount group name.
openingAmountBigDecimalOpening balance amount.
openingAmountInAccountCurrencyBigDecimalOpening balance amount in the account's currency.
openingBalanceTypestringOpening balance credit/debit indicator.
periodAmountBigDecimalNet movement amount for the period.
periodAmountInAccountCurrencyBigDecimalNet movement amount in the account's currency.
endingAmountBigDecimalClosing balance amount.
endingAmountInAccountCurrencyBigDecimalClosing balance amount in the account's currency.
periodAmountInPrimaryCurrencyBigDecimalNet movement amount in the tenant's primary currency.
openingAmountInPrimaryCurrencyBigDecimalOpening balance amount in the tenant's primary currency.
endingAmountInPrimaryCurrencyBigDecimalClosing balance amount in the tenant's primary currency.
accountNaturestringNature of the account (e.g. Asset, Liability).
accountCurrencystringCurrency code of the account.
accountidlongUnique identifier of the account.
parentAccountlongIdentifier of the parent account, if any.
groupidlongIdentifier of the account group.
subGrouplongIdentifier of the account sub-group.
subGroupNamestringName of the account sub-group.
groupbooleanHas the value true if this row represents an account group rather than an individual account.
budgetobjectBudget details for the account, if requested.
jeDataarrayJournal entry details contributing to this account's balance, when requested.
isRevaluedbooleanHas the value true if the account balance includes a currency revaluation.

JournalEntryDetails

A single journal entry line item, returned by Get General Ledger Detail.

AttributeTypeDescription
documentCodestringCode of the source document.
documentSequenceCodestringSequence code of the source document.
jeCodestringJournal entry code.
memostringMemo of the journal entry.
descriptionstringDescription of the journal entry line.
amountBigDecimalAmount of the journal entry line.
amountInDocumentCurrencyBigDecimalAmount in the document's currency.
currencyExchangeRateBigDecimalExchange rate applied to the journal entry line.
transactionTypeenumCredit/debit indicator for the journal entry line.
currencyenumCurrency of the journal entry line.
jeDatestringJournal entry date.
dateDateDate of the journal entry line.
debitAmountBigDecimalDebit amount of the journal entry line.
creditAmountBigDecimalCredit amount of the journal entry line.
balanceBigDecimalRunning balance after this journal entry line.
balanceInDocumentCurrencyBigDecimalRunning balance in the document's currency.
contactCodestringContact code linked to the journal entry line.
contactSeqCodestringContact sequence code.
contactNamestringContact name.
documentTypeenumType of the source document.

TrialBalanceDetailsDto

Response of Get Trial Balance.

AttributeTypeDescription
trialBalanceDetailDtolistList of account balances. Attributes of TrialBalanceDetailDto.
totalCreditAmountBigDecimalTotal credit amount across all accounts.
totalDebitAmountBigDecimalTotal debit amount across all accounts.
diffOpeningBalanceBigDecimalDifference in opening balance, if any.

TrialBalanceDetailDto

A single account row within TrialBalanceDetailsDto.

AttributeTypeDescription
namestringAccount name.
groupstringAccount group name.
codestringAccount code.
accountCodestringAccount code.
amountBigDecimalAccount balance amount.
cdTypeenumCredit/debit indicator of the balance.
totalBalanceBigDecimalTotal balance of the account.
openingBalanceBigDecimalOpening balance of the account.
openingBalanceCdTypeenumCredit/debit indicator of the opening balance.
totalBalanceCdTypeenumCredit/debit indicator of the total balance.
debitAmountBigDecimalDebit amount of the account.
creditAmountBigDecimalCredit amount of the account.

CustomViewRequest

Request body used by Get Profit and Loss and Get Balance Sheet.

AttributeTypeDescription
vIdlongIdentifier of a saved custom view.
vNamestringName of a saved custom view.
savebooleanHas the value true to save this request as a custom view.
isPeriodViewbooleanHas the value true if the report is broken down by period.
periodslistList of reporting periods. Attributes of Period.
fileFormatenumFile format, used when the report is exported.
exportDetailsbooleanHas the value true to include line-level detail in an export.
basisenumAccounting basis. Defaults to ACCRUAL.
columnByenumHow report columns are grouped. Defaults to TOTAL_ONLY.
departmentLevel1CFstringCustom field code for department level 1.
departmentLevel2CFstringCustom field code for department level 2.
departmentLevel3CFstringCustom field code for department level 3.
dateMacroenumPredefined date range shortcut. Defaults to ALL_DATES.
strictbooleanHas the value true to apply strict date filtering.
budgetbooleanHas the value true to include budget data.
sortDirstringSort direction.
startDatestringStart date of the report (dd-MM-yyyy).
endDatestringEnd date of the report (dd-MM-yyyy).
custom_fieldstringCustom field filter.
accountslistList of account codes to filter by.
contactslistList of contact codes to filter by.
productslistList of product codes to filter by.
amountInPrimaryCurrencybooleanHas the value true if amounts should be shown in the tenant's primary currency.
primaryCurrencystringPrimary currency code.
baseCurrencystringBase currency code.
optimisedFetchbooleanHas the value true to use the optimised data fetch path. Defaults to true.

Period

A single reporting period within CustomViewRequest.

AttributeTypeDescription
fromDateDateStart date of the period.
toDateDateEnd date of the period.
periodNamestringDisplay name of the period.
bookBeginningDateDateBooks beginning date used for opening balance calculation.

PNLCustomViewGrouping

Response of Get Profit and Loss.

AttributeTypeDescription
periodNamemapPeriod key to display name.
incomemapPeriod key to income line items. Attributes of ReportItemDto.
totalIncomemapPeriod key to total income amount.
revenuemapPeriod key to revenue line items. Attributes of ReportItemDto.
totalRevenuemapPeriod key to total revenue amount.
costOfGoodsSoldmapPeriod key to cost of goods sold line items. Attributes of ReportItemDto.
totalCostOfGoodsSoldmapPeriod key to total cost of goods sold amount.
cogsmapPeriod key to COGS line items. Attributes of ReportItemDto.
totalCogsmapPeriod key to total COGS amount.
grossProfitmapPeriod key to gross profit amount.
expensesmapPeriod key to expense line items. Attributes of ReportItemDto.
totalExpensesmapPeriod key to total expense amount.
operatingExpensesmapPeriod key to operating expense line items. Attributes of ReportItemDto.
totalOperatingExpensesmapPeriod key to total operating expense amount.
operatingProfitmapPeriod key to operating profit amount.
otherIncomemapPeriod key to other income line items. Attributes of ReportItemDto.
totalOtherIncomemapPeriod key to total other income amount.
otherExpensesmapPeriod key to other expense line items. Attributes of ReportItemDto.
totalOtherExpensesmapPeriod key to total other expense amount.
profitBeforeTaxmapPeriod key to profit before tax amount.
incomeTaxExpensesmapPeriod key to income tax expense amount.
netProfitOrLossmapPeriod key to net profit or loss amount.
displayTextmapPeriod key to display text.
groupNamesmapGroup code to group display name.

ReportItemDto

A single line item within the grouped Profit and Loss and Balance Sheet reports. Line items can nest child line items to form an account hierarchy.

AttributeTypeDescription
namestringAccount or group name.
codestringAccount or group code.
amountBigDecimalAmount for this line item.
amountWithChildsBigDecimalAmount for this line item including all child line items.
isGroupbooleanHas the value true if this line item represents an account group rather than an individual account.
parentlongIdentifier of the parent line item.
accountidlongIdentifier of the account.
groupidlongIdentifier of the account group.
subGroupidlongIdentifier of the account sub-group.
subGroupNamestringName of the account sub-group.
periodMapmapPeriod key to amount, when the report is broken down by period.
itemDtolistList of child line items. Attributes of ReportItemDto.
budgetMapmapPeriod key to budget details, when budget data is requested.

BalanceSheetInfoCustomGroupingView

Response of Get Balance Sheet.

AttributeTypeDescription
periodNamemapPeriod key to display name.
assetsobjectAsset line items. Attributes of BalanceSheetAssetsInfoGroupingCustomView.
liabilitiesobjectLiability and equity line items. Attributes of BalanceSheetLiabilitiesInfoCustomGroupingView.
diffOpeningBalancemapPeriod key to opening balance difference, if any.
displayTextmapPeriod key to display text.
groupNamesmapGroup code to group display name.

BalanceSheetAssetsInfoGroupingCustomView

Asset section of BalanceSheetInfoCustomGroupingView. Each attribute below is a period key to ReportItemDto line items, and each has a matching totalXxx attribute (period key to total amount).

AttributeTypeDescription
bankmapBank account line items.
totalBankmapTotal bank amount per period.
cashmapCash account line items.
totalCashmapTotal cash amount per period.
currentAssetmapCurrent asset line items.
totalCurrentAssetmapTotal current asset amount per period.
nonCurrentAssetmapNon-current asset line items.
totalNonCurrentAssetmapTotal non-current asset amount per period.
otherCurrentAssetsmapOther current asset line items.
totalOtherCurrentAssetsmapTotal other current asset amount per period.
longTermAssetsmapLong term asset line items.
totalLongTermAssetsmapTotal long term asset amount per period.
accountsReceivablemapAccounts receivable line items.
totalAccountsReceivablemapTotal accounts receivable amount per period.
fixedAssetsmapFixed asset line items.
totalFixedAssetsmapTotal fixed asset amount per period.
otherAssetsmapOther asset line items.
totalOtherAssetsmapTotal other asset amount per period.
ppemapProperty, plant, and equipment line items.
totalPpemapTotal property, plant, and equipment amount per period.
intangiblesmapIntangible asset line items.
totalIntangiblesmapTotal intangible asset amount per period.
otherLongTermAssetmapOther long term asset line items.
totalOtherLongTermAssetmapTotal other long term asset amount per period.
totalAssetmapTotal asset amount per period.

BalanceSheetLiabilitiesInfoCustomGroupingView

Liabilities and equity section of BalanceSheetInfoCustomGroupingView. Each attribute below is a period key to ReportItemDto line items, and each has a matching totalXxx attribute (period key to total amount).

AttributeTypeDescription
equitymapEquity line items.
totalEquitymapTotal equity amount per period.
currentLiabilitiesmapCurrent liability line items.
totalCurrentLiabilitiesmapTotal current liability amount per period.
currentYearEarningsmapCurrent year earnings amount per period.
nonCurrentLiabilitiesmapNon-current liability line items.
totalNonCurrentLiabilitiesmapTotal non-current liability amount per period.
otherCurrentLiabilitiesmapOther current liability line items.
totalOtherCurrentLiabilitiesmapTotal other current liability amount per period.
longTermLiabilitiesmapLong term liability line items.
totalLongTermLiabilitiesmapTotal long term liability amount per period.
accountsPayablemapAccounts payable line items.
totalAccountsPayablemapTotal accounts payable amount per period.
totalLiabilitiesmapTotal liabilities amount per period.

Enums


ACCOUNTING_BASIS

  • ACCRUAL
  • CASH

ExportFileFormat

  • XLS
  • PDF
  • CSV
  • TXT

ColumnBy

  • TOTAL_ONLY
  • DAYS
  • WEEKS
  • MONTHS
  • QUARTERS
  • YEARS
  • CONTACTS
  • PRODUCTS
  • CLASS
  • LOCATION

DateMacro

  • ALL_DATES
  • CUSTOM
  • TODAY
  • THIS_WEEK
  • THIS_WEEK_TO_DATE
  • THIS_MONTH
  • THIS_MONTH_TO_DATE
  • THIS_QUARTER
  • THIS_QUARTER_TO_DATE
  • THIS_YEAR
  • THIS_YEAR_TO_DATE
  • THIS_YEAR_TO_LAST_MONTH
  • YESTERDAY
  • RECENT
  • LAST_WEEK
  • LAST_WEEK_TO_DATE
  • LAST_MONTH
  • LAST_MONTH_TO_DATE
  • LAST_QUARTER
  • LAST_QUARTER_TO_DATE
  • LAST_YEAR
  • LAST_YEAR_TO_DATE
  • SINCE_30_DAYS_AGO
  • SINCE_60_DAYS_AGO
  • SINCE_90_DAYS_AGO
  • SINCE_365_DAYS_AGO
  • NEXT_WEEK
  • NEXT_4_WEEKS
  • NEXT_MONTH
  • NEXT_QUARTER
  • NEXT_YEAR

FinancialReport

  • PNL
  • BALANCE_SHEET
  • PNL_BY_DEPARTMENT
  • GL