Reports
Xero’s most commonly viewed reports (listed below) can be retrieved using the Xero API. These reports typically contain a summary of data that may be useful for your own application. e.g. it may be more easier and more efficient to use a Report endpoint to fetch data rather than retrieve individual invoices and total these yourself.
Each report has its own endpoint e.g. https://api.xero.com/api.xro/2.0/Reports/[Report Name] and can be returned in either XML (default) or JSON format.
Each report has different optional parameters. The report parameters should be added as a separate query strings. For example:
GET https://api.xero.com/api.xro/2.0/Reports/AgedReceivablesByContact?fromDate=2010-01-01&toDate=2011-01-01
The layout of each report is a collection of rows and cells. Rows can be of various types (e.g. header, section, row and summary row elements). Cells can contain values and attributes with nested values.
Try the API Previewer to get familiar with the response format for each report or see the Trial Balance example below.
More details about each reporting endpoint are listed below. To learn more about the composition of specific reports refer to the Report Centre.
Aged Payables By Contact
| URL |
https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact |
| Methods Supported |
GET |
| Description |
Returns aged payables up to the end of the current month by default |
Required parameters for GET AgedPayablesByContact
| contactID |
Contact ID e.g. 5040915e-8ce7-4177-8d08-fde416232f18 |
Optional parameters for GET AgedPayablesByContact
| date |
Shows payments up to this date e.g. 30 Apr 2010. Defaults to end of the current month |
| fromDate |
Show all payable invoices from this date for contact |
| toDate |
Show all payable invoices to this date for the contact |
Aged Receivables By Contact
| URL |
https://api.xero.com/api.xro/2.0/Reports/AgedReceivablesByContact |
| Methods Supported |
GET |
| Description |
Returns aged receivables up to the end of the current month by default |
Required parameters for GET AgedReceivablesByContact
| contactID |
Contact ID e.g. 5040915e-8ce7-4177-8d08-fde416232f18 |
Optional parameters for GET AgedReceivablesByContact
| date |
Shows payments up to this date e.g. 30 Apr 2010. Defaults to end of the current month |
| fromDate |
Show all receivable invoices from this date for contact |
| toDate |
Show all receivable invoices to this date for the contact |
BalanceSheet
| URL |
https://api.xero.com/api.xro/2.0/Reports/BalanceSheet |
| Methods Supported |
GET |
| Description |
Returns a balance sheet for the current month up to the date specified. YTD values are shown too. |
Optional parameters for GET BalanceSheet
BankStatement
| URL |
https://api.xero.com/api.xro/2.0/Reports/BankStatement |
| Methods Supported |
GET |
| Description |
Returns the balances and cash movements for each bank account |
Required parameters for GET BankStatement
| bankAccountID |
bankAccountID e.g. 5040915e-8ce7-4177-8d08-fde416232f18 |
Optional parameters for GET BankStatement
| fromDate |
e.g. 1 Mar 2010 |
| toDate |
e.g. 30 Apr 2010 |
BankSummary
| URL |
https://api.xero.com/api.xro/2.0/Reports/BankSummary |
| Methods Supported |
GET |
| Description |
Returns the statement lines for a specified bank account |
Optional parameters for GET BankSummary
| fromDate |
e.g. 1 Mar 2010 |
| toDate |
e.g. 30 Apr 2010 |
| URL |
https://api.xero.com/api.xro/2.0/Reports |
| Methods Supported |
GET |
| Description |
Returns a list of published BAS reports. NB This works for Australia based organisations only |
You can retrieve an individual published BAS Report by specifying the identifier of the report e.g. https://api.xero.com/api.xro/2.0/Reports/2BE4A28B-467A-4BD1-BAF8-8D6622A5B930
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Id>435ff851-3700-458f-b5ce-365a0eda7b4d</Id>
<Status>OK</Status>
<ProviderName>Xero API Previewer</ProviderName>
<DateTimeUTC>2011-02-21T00:36:14.3339709Z</DateTimeUTC>
<Reports>
<Report>
<ReportID>3d0a1240-e606-4fae-a823-77bcf79d5e79</ReportID>
<ReportName>Activity Statement</ReportName>
<ReportType>SalesTaxReturn</ReportType>
<ReportDate>1 Nov 2011 to 30 Nov 2011</ReportDate>
<UpdatedDateUTC>2011-12-18T19:59:27.84</UpdatedDateUTC>
<Attributes>
<ReportAttribute>
<Name>fromDate</Name>
<Description>From</Description>
<Value>2011-11-01T00:00:00</Value>
</ReportAttribute>
<ReportAttribute>
<Name>dateTo</Name>
<Description>To</Description>
<Value>2011-11-30T00:00:00</Value>
</ReportAttribute>
</Attributes>
<Fields>
<ReportField>
<FieldID>ABN</FieldID>
<Description>ABN</Description>
<Value>53003086616</Value>
</ReportField>
<ReportField>
<FieldID>GSTBasis</FieldID>
<Description>GST Accounting Method</Description>
<Value>Accruals Basis</Value>
</ReportField>
<ReportField>
<FieldID>W1</FieldID>
<Description>Total salary, wages and other payments</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>W2</FieldID>
<Description>Amount withheld from payments shown at W1</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>W4</FieldID>
<Description>Amount withheld where no ABN is quoted</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>W3</FieldID>
<Description>Other amounts withheld (excluding any amount shown in W2 or W4)</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>W5</FieldID>
<Description>Total amounts withheld (W2 + W4 + W3)</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>4</FieldID>
<Description>PAYG tax withheld</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>7</FieldID>
<Description>Deferred company/fund instalment</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>8A</FieldID>
<Description>4+7</Description>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>8B</FieldID>
<Value>0</Value>
</ReportField>
<ReportField>
<FieldID>9</FieldID>
<Description>Your refund</Description>
<Value>0</Value>
</ReportField>
</Fields>
</Report>
</Reports>
</Response>
BudgetSummary
| URL |
https://api.xero.com/api.xro/2.0/Reports/BudgetSummary |
| Methods Supported |
GET |
| Description |
Returns a summary of your monthly budget |
Optional parameters for GET BudgetSummary
| periods |
The number of periods to compare (integer between 1 and 12) |
| timeframe |
The period size to compare to (1=month, 3=quarter, 12=year) |
| URL |
https://api.xero.com/api.xro/2.0/Reports/ExecutiveSummary |
| Methods Supported |
GET |
| Description |
A summary including monthly totals and some common business ratios |
Optional parameters for GET ExecutiveSummary
| URL |
https://api.xero.com/api.xro/2.0/Reports |
| Methods Supported |
GET |
| Description |
Returns a list of published GST reports. NB This currently works for New Zealand based organisations only |
You can retrieve an individual published GST Report by specifying the identifier of the report e.g. https://api.xero.com/api.xro/2.0/Reports/2BE4A28B-467A-4BD1-BAF8-8D6622A5B930
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Id>435ff851-3700-458f-b5ce-365a0eda7b4d</Id>
<Status>OK</Status>
<ProviderName>Xero API Previewer</ProviderName>
<DateTimeUTC>2011-02-21T00:36:14.3339709Z</DateTimeUTC>
<Reports>
<Report>
<ReportID>2be4a28b-467a-4bd1-baf8-8d6622a5b930</ReportID>
<ReportName>GST and Provisional Tax Return</ReportName>
<ReportType>OtherReport</ReportType>
<ReportDate>1 Dec 2010 to 31 Jan 2011</ReportDate>
<UpdatedDateUTC>2011-02-02T03:49:10.397</UpdatedDateUTC>
<Fields>
<ReportField>
<FieldID>1</FieldID>
<Description>Registration number</Description>
<Value>98-765-043</Value>
</ReportField>
<ReportField>
<FieldID>GSTBasis</FieldID>
<Description>GST basis</Description>
<Value>Invoice Basis</Value>
</ReportField>
<ReportField>
<FieldID>PeriodCovered</FieldID>
<Description>Period covered by the return</Description>
<Value>2 Monthly</Value>
</ReportField>
<ReportField>
<FieldID>From</FieldID>
<Description>From</Description>
<Value>2010-12-01T00:00:00</Value>
</ReportField>
<ReportField>
<FieldID>2</FieldID>
<Description>To</Description>
<Value>2011-01-31T00:00:00</Value>
</ReportField>
<ReportField>
<FieldID>5</FieldID>
<Description>Total sales and income for the period (including GST and zero-rated Supplies)</Description>
<Value>115.00</Value>
</ReportField>
...
</Fields>
</Report>
</Reports>
</Response>
| URL |
https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss |
| Methods Supported |
GET |
| Description |
Returns a profit and loss for the current month. Last 3 months and YTD figures are shown too. |
Optional parameters for GET ProfitAndLoss
| fromDate |
e.g. 1 Mar 2010 |
| toDate |
e.g. 30 Apr 2010 |
Example Url
GET /api.xro/2.0/Reports/ProfitAndLoss?fromDate=2011-09-30&toDate=2011-10-31
| URL |
https://api.xero.com/api.xro/2.0/Reports/TrialBalance |
| Methods Supported |
GET |
| Description |
Returns a trial balance for the current month up to the date specified. YTD values are shown too. |
Optional parameters for GET TrialBalance
| date |
As at date e.g. 31 Oct 2010 |
| paymentsOnly |
Set this to true to get cash transactions only |
Example response for GET TrialBalance
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Id>db04a7a3-5543-4fbe-909f-0482182828c3</Id>
<Status>OK</Status>
<ProviderName>Xero API Previewer</ProviderName>
<DateTimeUTC>2011-02-20T21:50:43.6129168Z</DateTimeUTC>
<Reports>
<Report>
<ReportID>TrialBalance</ReportID>
<ReportName>Trial Balance</ReportName>
<ReportType>TrialBalance</ReportType>
<ReportTitles>
<ReportTitle>Trial Balance</ReportTitle>
<ReportTitle>Demo Company (NZ)</ReportTitle>
<ReportTitle>As at 30 August 2010</ReportTitle>
</ReportTitles>
<ReportDate>21 February 2011</ReportDate>
<UpdatedDateUTC>2011-02-20T21:50:43.6129168Z</UpdatedDateUTC>
<Rows>
<Row>
<RowType>Header</RowType>
<Cells>
<Cell>
<Value>Account</Value>
</Cell>
<Cell>
<Value>Debit</Value>
</Cell>
<Cell>
<Value>Credit</Value>
</Cell>
<Cell>
<Value>YTD Debit</Value>
</Cell>
<Cell>
<Value>YTD Credit</Value>
</Cell>
</Cells>
</Row>
<Row>
<RowType>Section</RowType>
<Title>Revenue</Title>
<Rows>
<Row>
<RowType>Row</RowType>
<Cells>
<Cell>
<Value>Interest Income (270)</Value>
<Attributes>
<Attribute>
<Value>e9482110-7245-4a76-bfe2-14500495a076</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Attributes>
<Attribute>
<Value>e9482110-7245-4a76-bfe2-14500495a076</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Value>0.00</Value>
<Attributes>
<Attribute>
<Value>e9482110-7245-4a76-bfe2-14500495a076</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Attributes>
<Attribute>
<Value>e9482110-7245-4a76-bfe2-14500495a076</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Value>500.00</Value>
<Attributes>
<Attribute>
<Value>e9482110-7245-4a76-bfe2-14500495a076</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
</Cells>
</Row>
<Row>
<RowType>Row</RowType>
<Cells>
<Cell>
<Value>Sales (200)</Value>
<Attributes>
<Attribute>
<Value>5040915e-8ce7-4177-8d08-fde416232f18</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Attributes>
<Attribute>
<Value>5040915e-8ce7-4177-8d08-fde416232f18</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Value>12180.25</Value>
<Attributes>
<Attribute>
<Value>5040915e-8ce7-4177-8d08-fde416232f18</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Attributes>
<Attribute>
<Value>5040915e-8ce7-4177-8d08-fde416232f18</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
<Cell>
<Value>20775.53</Value>
<Attributes>
<Attribute>
<Value>5040915e-8ce7-4177-8d08-fde416232f18</Value>
<Id>account</Id>
</Attribute>
</Attributes>
</Cell>
</Cells>
</Row>
</Rows>
</Row>
.....
<Row>
<RowType>Section</RowType>
<Rows>
<Row>
<RowType>SummaryRow</RowType>
<Cells>
<Cell>
<Value>Total</Value>
</Cell>
<Cell>
<Value>17447.02</Value>
</Cell>
<Cell>
<Value>17447.02</Value>
</Cell>
<Cell>
<Value>33459.76</Value>
</Cell>
<Cell>
<Value>33459.76</Value>
</Cell>
</Cells>
</Row>
</Rows>
</Row>
</Rows>
</Report>
</Reports>
</Response>