Xero.Accounting.Reports (Xero v1.0.0)

Copy Markdown View Source

Xero Accounting API – Financial Reports.

Requires accounting.reports.read scope. Standard users with the "No reports" role receive HTTP 403. Organisations using cashflow basis: use payments_only: true.

Available Reports

FunctionXero ReportNotes
balance_sheet/3Balance SheetAssets, liabilities, equity
profit_and_loss/3Profit and LossRevenue and expenses
trial_balance/3Trial BalanceAll accounts with debit/credit balances
executive_summary/3Executive SummaryKPI dashboard
bank_summary/3Bank SummaryBank account movements
budget_summary/3Budget SummaryBudget vs actuals
aged_receivables/4Aged Receivables By ContactDebtors report
aged_payables/4Aged Payables By ContactCreditors report
ten_ninety_nine/31099 ReportUS only
bas/2BAS ReportAU only
gst/3GST ReportAU/NZ only
list/2Report IndexAll available reports

Summary

Functions

Returns the Aged Payables By Contact report for a specific contact.

Returns the Aged Receivables By Contact report for a specific contact.

Returns the Balance Sheet report.

Returns the Bank Summary report.

Returns the BAS (Business Activity Statement) report for AU organisations. Returns a list of all completed BAS reports with no parameters.

Returns the Budget Summary report.

Returns the Executive Summary report (KPI dashboard).

Returns a specific BAS report by ID (AU organisations only).

Returns a specific GST report by ID (AU/NZ only).

Returns the GST report (AU/NZ organisations only).

Lists all reports available to the connected organisation.

Returns the Profit and Loss report.

Returns the 1099 report (US organisations only).

Returns the Trial Balance report.

Functions

aged_payables(t, tid, contact_id, opts \\ [])

@spec aged_payables(Xero.Auth.Token.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Aged Payables By Contact report for a specific contact.

Parameters

  • contact_id — UUID of the contact (required)

Options

  • :date — Reporting date (YYYY-MM-DD)
  • :from_date / :to_date — Date range

aged_receivables(t, tid, contact_id, opts \\ [])

@spec aged_receivables(Xero.Auth.Token.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Aged Receivables By Contact report for a specific contact.

Parameters

  • contact_id — UUID of the contact (required)

Options

  • :date — Reporting date (YYYY-MM-DD)
  • :from_date / :to_date — Date range

balance_sheet(t, tid, opts \\ [])

@spec balance_sheet(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Balance Sheet report.

Options

  • :date — Reporting date (YYYY-MM-DD, default: today)
  • :periods — Number of comparison periods (0–11)
  • :time_frame"MONTH" | "QUARTER" | "YEAR"

  • :tracking_option_id1 / :tracking_option_id2 — Filter by tracking options
  • :standard_layout — Use standard layout (boolean, default true)
  • :payments_only — Cash-basis mode (boolean, default false)

bank_summary(t, tid, opts \\ [])

@spec bank_summary(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Bank Summary report.

Options

  • :from_date / :to_date — Date range (YYYY-MM-DD)

bas(t, tid)

@spec bas(Xero.Auth.Token.t(), String.t()) :: {:ok, map()} | {:error, Xero.Error.t()}

Returns the BAS (Business Activity Statement) report for AU organisations. Returns a list of all completed BAS reports with no parameters.

budget_summary(t, tid, opts \\ [])

@spec budget_summary(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Budget Summary report.

Options

  • :date — Reporting date (YYYY-MM-DD)
  • :periods — Number of periods (1–12)
  • :time_frame"MONTH" | "QUARTER" | "YEAR"

executive_summary(t, tid, opts \\ [])

@spec executive_summary(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Executive Summary report (KPI dashboard).

Options

  • :date — Reporting date (YYYY-MM-DD)

get_bas(t, tid, bas_id)

@spec get_bas(Xero.Auth.Token.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns a specific BAS report by ID (AU organisations only).

get_gst(t, tid, report_id)

@spec get_gst(Xero.Auth.Token.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns a specific GST report by ID (AU/NZ only).

gst(t, tid, opts \\ [])

@spec gst(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the GST report (AU/NZ organisations only).

Options

  • :from_date / :to_date — Reporting period (YYYY-MM-DD)

list(t, tid)

@spec list(Xero.Auth.Token.t(), String.t()) :: {:ok, map()} | {:error, Xero.Error.t()}

Lists all reports available to the connected organisation.

profit_and_loss(t, tid, opts \\ [])

@spec profit_and_loss(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Profit and Loss report.

Options

  • :from_date / :to_date — Date range (YYYY-MM-DD)
  • :periods — Number of comparison periods (0–11)
  • :time_frame"MONTH" | "QUARTER" | "YEAR"

  • :tracking_category_id / :tracking_category_id2 — Segment by tracking category
  • :tracking_option_id / :tracking_option_id2 — Filter by specific tracking option
  • :standard_layout — Use standard layout (boolean)
  • :payments_only — Cash-basis mode (boolean)

ten_ninety_nine(t, tid, opts \\ [])

@spec ten_ninety_nine(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the 1099 report (US organisations only).

Options

  • :report_year — Tax year (e.g. "2024")

trial_balance(t, tid, opts \\ [])

@spec trial_balance(Xero.Auth.Token.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Xero.Error.t()}

Returns the Trial Balance report.

Options

  • :date — Reporting date (YYYY-MM-DD)
  • :payments_only — Cash-basis mode (boolean)