Dataset
Xero accounting records datasets for AI training
A Xero dataset is an export of one business's Xero organization: its Invoice records for both sales invoices and supplier bills, its CreditNote, BankTransaction, BankTransfer, Payment and ManualJournal records, the Journals feed of ledger lines they posted, and the Account, Contact, Item and TrackingCategory lists behind them, with attached files. SourceX sources it to a buyer's spec from established businesses that keep their books in Xero, with contact names, bank account numbers and payroll items removed or pseudonymized. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- One Xero organization's source documents, the ledger journals they posted, its lists and its attached files
- Typical systems
- Xero in one stated regional edition, since tax types and the default chart differ by region; multi-currency, Xero Expenses, Xero Projects and Hubdoc records only where the organization uses them; Xero Payroll out of scope unless agreed
- Typical history
- Varies by business; specify financial years and whether history and notes are wanted
- Modality
- Structured documents and journal lines, history notes as short text, attached bills and receipts as PDFs and images
- Delivery formats
- JSONL per object from the Accounting API, journals as JSONL or CSV, reports as JSON, attachments as files
- Preparation
- Contacts re-keyed, bank account and tax numbers removed, payroll postings removed or aggregated, descriptions, history notes and attachments screened
- Licensing
- Scoped per organization and financial years; permitted use agreed per license; Xero's developer platform terms on bulk export and API data checked by owner and buyer
- Availability
- Sourced to your spec; industry, region and years of history depend on the business, and supply is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| document_ref | string | Pseudonymous key replacing the InvoiceID, CreditNoteID, BankTransactionID or ManualJournalID, stable so that a Journal's SourceID still resolves. |
| document_type | object | The object and its Type: Invoice with ACCREC or ACCPAY, CreditNote with ACCRECCREDIT or ACCPAYCREDIT, BankTransaction with SPEND or RECEIVE. |
| status | enum | The document's Status as Xero spells it: DRAFT, SUBMITTED, AUTHORISED, PAID, VOIDED or DELETED on an Invoice, and POSTED on a ManualJournal. |
| contact_key | string | Pseudonymous key for the Contact's ContactID, with its IsCustomer and IsSupplier flags. |
| dates_and_numbers | object | Date, DueDate, InvoiceNumber, FullyPaidOnDate and, on sales invoices only, Reference; on a bill, InvoiceNumber is the supplier's number as keyed. |
| line_items | array | The document's LineItems: Description, Quantity, UnitAmount, ItemCode, AccountCode, TaxType, TaxAmount and LineAmount. |
| line_items[].tracking | array | The line's Tracking entries, each a TrackingCategory name and chosen option, Xero's way of tagging a department, site or job. |
| amounts | object | LineAmountTypes (Exclusive, Inclusive or NoTax), SubTotal, TotalTax, Total and AmountDue, with CurrencyCode and CurrencyRate. |
| allocations | array | Payment records and CreditNote, Prepayment and Overpayment allocations applied to the document, each with a date and amount. |
| journals | array | Rows of the Journals feed whose SourceID is this document or its payments: JournalNumber, JournalDate, CreatedDateUTC, SourceType and JournalLines with NetAmount, GrossAmount and TaxAmount. |
| account | object | The Account behind a line or journal line: Code, Name, Type, Class, Status, default TaxType and any SystemAccount role. |
| bank_reconciliation | object | IsReconciled from the BankTransaction or Payment, plus the matched bank statement line where captured, else null. |
| history | array | HistoryRecords from the per-record history endpoint: Changes, Details and DateUTC, with the user replaced by a key. |
| attachments | array | Attachments on the document, with FileName, MimeType, ContentLength and the downloaded file. |
Field names from the table above; values are masked placeholders.
Example record
{
"document_ref": "doc_4e91b2",
"document_type": {
"object": "Invoice",
"Type": "ACCPAY"
},
"status": "PAID",
"contact_key": "con_0c37",
"dates_and_numbers": {
"Date": "2024-05-06",
"DueDate": "2024-06-05",
"InvoiceNumber": "SI-20418",
"FullyPaidOnDate": "2024-06-03"
},
"line_items": [
{
"Description": "Forklift service, 500-hour interval",
"Quantity": 1,
"UnitAmount": 1200.0,
"AccountCode": "473",
"TaxType": "INPUT",
"LineAmount": 1200.0,
"tracking": [
{
"Name": "Site",
"Option": "Depot North"
}
]
}
],
"amounts": {
"LineAmountTypes": "Exclusive",
"SubTotal": 1200.0,
"TotalTax": 120.0,
"Total": 1320.0,
"CurrencyCode": "AUD"
},
"allocations": [
{
"object": "Payment",
"payment_ref": "pay_77d0",
"Date": "2024-06-03",
"Amount": 1320.0
}
],
"journals": [
{
"JournalNumber": 18842,
"JournalDate": "2024-05-06",
"CreatedDateUTC": "2024-05-09T01:22:40Z",
"SourceType": "ACCPAY",
"JournalLines": [
{
"AccountCode": "800",
"NetAmount": -1320.0
},
{
"AccountCode": "473",
"NetAmount": 1200.0,
"TaxType": "INPUT"
},
{
"AccountCode": "820",
"NetAmount": 120.0
}
]
},
{
"JournalNumber": 19107,
"SourceType": "ACCPAYPAYMENT",
"source_ref": "pay_77d0",
"JournalLines": [
{
"AccountCode": "800",
"NetAmount": 1320.0
},
{
"AccountCode": "090",
"NetAmount": -1320.0
}
]
}
],
"account": {
"Code": "473",
"Name": "Repairs and Maintenance",
"Type": "EXPENSE",
"Status": "ACTIVE"
},
"bank_reconciliation": {
"IsReconciled": true,
"statement_line": {
"date": "2024-06-03",
"description": "DIRECT DEBIT [payee removed] SI-20418",
"amount": -1320.0
}
},
"history": [
{
"Changes": "Created",
"DateUTC": "2024-05-09T01:22:40Z",
"user_key": "staff_02"
},
{
"Changes": "Paid",
"DateUTC": "2024-06-04T00:10:02Z",
"user_key": "staff_02"
}
],
"attachments": [
{
"FileName": "SI-20418.pdf",
"MimeType": "application/pdf",
"file": "att/doc_4e91b2/01.pdf"
}
]
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Train bookkeeping agents on document-to-journal pairs
Each document paired with its Journals rows shows the form as keyed and the debits and credits Xero posted.
Teach account and tax coding on line items
LineItems carry the AccountCode, TaxType and Tracking option a bookkeeper chose, labels in one business's own chart.
Model bank reconciliation decisions
Where statement lines were captured, each pairs with the BankTransaction or Payment it was reconciled against.
Extract fields from bills and receipts
Attachments on ACCPAY invoices and spend money transactions give document images with the coded result.
Build evaluation sets for accounting assistants
A held-out month with a known TrialBalance report shows whether an agent's entries reproduce the ledger.
Use-case guides: Finance and accounting agents, Document AI, enterprise search and RAG, Enterprise and computer-use agents, Private evaluation sets
What makes this data valuable
Journals resolve to documents
Every Journal's SourceID points at a delivered document of the stated SourceType.
Journals tie to the trial balance
Summed JournalLines per account match the TrialBalance report for the same date.
Statement lines present or declared absent
The manifest says whether imported bank statement lines were captured, and by what route.
History pulled per record
HistoryRecords accompany the documents, not only an UpdatedDateUTC.
Voided and archived records kept
VOIDED and DELETED documents and ARCHIVED accounts and contacts remain, so old journals and references resolve.
Edition and tax basis stated
The manifest names the regional edition, base currency, tax basis, lock dates and whether journals are accrual or cash basis.
Value drivers
Xero dataset
One Invoice object for both sides, and a Journals feed that pairs documents with postings
Xero has no separate objects for what a business sells and what it owes. Sales invoices and supplier bills are rows of one Invoice object, told apart by Type: ACCREC for a receivable, ACCPAY for a payable. Credit notes repeat the pattern with ACCRECCREDIT and ACCPAYCREDIT, and money that moved without an invoice is a BankTransaction of type SPEND or RECEIVE. Each line item carries its own AccountCode, TaxType and Tracking options, so the coding decision sits on the line a person keyed.
The ledger side is a second feed. The Journals endpoint is read-only and returns numbered journals, each holding the JournalLines one source document produced: the account, a NetAmount that is positive for a debit and negative for a credit, and the gross and tax amounts. Every journal names its origin in SourceID and SourceType, with values such as ACCPAY, CASHPAID, ACCRECPAYMENT and MANJOURNAL. An invoice can be joined to the exact lines it posted, control account and tax account included, without anyone rebuilding Xero's posting rules. A Payment posts its own journal, so an invoice and its settlement stay separate events.
The two feeds keep different history. A document from the API is its current version, stamped with UpdatedDateUTC, and an edit overwrites what was there. The Journals feed is numbered and append-only in practice. An approved document that was later edited or voided should show more than one journal under the same SourceID, the later ones reversing and replacing the first, a trace of rework the document has lost. Confirm it in the sample by finding a SourceID with several journals. Each journal carries a JournalDate and a CreatedDateUTC, and the gap between them shows entries dated back into an earlier period.
The Accounting API returns the coded side of reconciliation, not the statement line
In Xero each imported bank statement line is matched to an existing payment, turned into a new spend or receive money transaction, or coded by a bank rule. The standard Accounting API returns what that work produced: BankTransaction and Payment records, each with an IsReconciled flag. Those endpoints do not return the statement line itself, with the bank's payee and description text, and they do not say which bank rule fired. A dataset meant to teach how bank text becomes a coding decision needs those lines captured another way, such as from each bank account's statement view or the files the business imported, and the supplier should say which.
Change notes are a second gap. The History and Notes panel on each Xero document lists events such as created, approved, edited and paid, plus notes typed by staff. The API serves it from a history endpoint called once per record, which returns HistoryRecords with the change, a details sentence, a timestamp and the user. A pull that fetched only the list endpoints has none of it. Attachments work the same way: a HasAttachments flag says a file exists, and the file comes from a per-record call.
To test a sample, take one month, check that every journal's SourceID resolves to a delivered document, then sum NetAmount by account and compare with the TrialBalance report. The Journals endpoint answers on an accrual basis unless the pull set its paymentsOnly option, so ask which basis was used and run the report on the same one. Look for VOIDED and DELETED documents and ARCHIVED accounts and contacts, since old journals still point at them.
What to check before licensing
- Have the data owner and your counsel read Xero's developer platform terms on bulk export and on using API data for model training before a permitted use is agreed.
- Confirm the licensor is the subscriber of the Xero organization. An accounting practice with advisor access has access, not the right to license the books.
- Ask whether imported bank statement lines were captured, by what route (a statement view, the imported files or another Xero API), and how each is linked to the BankTransaction or Payment it was reconciled against.
- Ask whether the per-record history endpoint was called for every document type in scope, and how user names were replaced.
- Tie one sample month: sum JournalLines by AccountCode and compare with the TrialBalance report.
- Check that contact names, BankAccountNumber values and payroll items are removed or pseudonymized, in line descriptions, history notes and attachment images too.
- Ask for the organization's regional edition, tax basis and lock dates, and whether payroll postings were removed, aggregated or left in the Journals feed.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
Does a Xero dataset include the general ledger?
Yes, as the Journals feed. Xero exposes a read-only Journals endpoint in which each numbered journal lists the ledger lines one source document produced, with account and amounts, and a SourceID and SourceType naming that document. Ask for the journals beside the documents, keyed so the two can be paired.
Are bank statement lines part of the export?
Not by default. The standard Accounting API returns the coded side of reconciliation: BankTransaction and Payment records with an IsReconciled flag. Those endpoints do not return the imported statement lines the records were matched against. To learn reconciliation, the request must put statement lines in scope, and the supplier must say how they were captured and linked.
Can we see who changed an invoice and when?
Partly, through history and notes. A document from the API is its current version with an UpdatedDateUTC. The trail a user sees on a Xero document, with events such as created, approved, edited and paid and any typed notes, comes from a separate history call per record. It describes each change in words, so do not expect a full earlier copy of the document.
How are sales invoices told apart from supplier bills?
By the Type field. Xero stores both in one Invoice object, where ACCREC marks a sales invoice and ACCPAY marks a bill, and credit notes follow the same pattern with ACCRECCREDIT and ACCPAYCREDIT. Money spent or received without an invoice is a BankTransaction with a SPEND or RECEIVE type.
Which regional differences affect a Xero dataset?
Tax types and the default chart differ by edition. An Australian or New Zealand organization codes lines with GST tax types, a UK one with VAT types and a US one with sales tax, and each starts from a different default chart of accounts. Payroll is a separate regional product. Name the region in the request, and do not merge editions without a mapping.
Is SourceX affiliated with Xero?
Xero is named to identify the system the records come from. That does not imply a partnership with or endorsement by Xero. The records belong to the business that runs Xero, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.
Related datasets
- Bookkeeping firm client files across many businesses
Many small-business client files from one firm: feed lines, coding, source documents, client queries and period-end packages
- Accounting and reconciliation workflows
Coded transactions, reconciliations and close records with reviewer corrections and approvals
- ERP transaction histories across modules
One company's ERP documents across modules, with flow links, change logs, master data and the data dictionary
- QuickBooks accounting records
One company's transactions, lists, ledger reports and attachments from QuickBooks Online or a Desktop company file
- Zoho Books accounting records
One Zoho Books organization's sales and purchase transactions, payments, journals, bank transactions and per-record comments and history
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 26 November 2026. Own data like this? See how companies license it to AI developers.