Journals
Used for querying line items in journals. Journals in Xero are used to record debits and credits for financial transactions.
Table Specific Information
The Journals view allows you to SELECT the journal lines in journals for a Xero organization. The Id column is generated by the connector; this value combines the index of the line item with the unique, Xero-generated JournalId.
Optimized Filters and High Volume Thresholds
The Xero API defines a list of optimized filters for certain tables and views. If any query filter not included in this list is applied to any such table or view, and the number of records available in that table or view exceeds a certain value (what Xero calls a "high volume threshold"), the Xero API will block the query.
To avoid the rejection of your queries by the Xero API, if the the number of records in your table or view exceed the high volume threshold, make sure to use filters from the list of optimized filters.
Note that the high volume threshold, as well as the exact list of optimized filters, is subject to change as Xero updates its API.
The Journals view has a high volume threshold of 100. The Xero API does not list any optimized filters for this view.
SELECT
The Xero API allows extensive filtering and ordering. You can define WHERE and ORDER BY clauses in a query to filter and order the results using any non-line-item column.
Note: The Xero API does not support filtering on line items or journal lines.
Columns
| Name | Type | Description |
| Id [KEY] | String | A unique identifier for the journal line, combining its position in the history log with the Xero-generated identifier of the journal. This ensures each journal entry is distinctly identifiable, enabling accurate tracking of changes. |
| JournalId | String | The unique identifier assigned by Xero to the journal. This field links the journal line to a specific journal entry, making it easier to track the source of the transaction. |
| JournalDate | Date | The date the journal was posted. This field indicates when the journal entry was officially recorded in Xero, providing a timestamp for when the financial action took place. |
| JournalNumber | Integer | The unique journal number assigned by Xero. This value helps identify and reference the journal for internal tracking purposes. |
| CreatedDateUTC | Datetime | The timestamp when the journal was entered into the system. This field indicates when the journal entry was initially created, which may differ from the journal posting date. |
| Reference | String | An optional reference value that provides additional context or identification for the journal entry. This is often used for cross-referencing within internal systems or reports. |
| SourceId | String | The identifier for the source transaction that generated the journal entry. For example, it could be an 'InvoiceId' or another reference that links the journal to a specific transaction. |
| SourceType | String | The type of the transaction that created the journal. Valid values include 'ACCREC', 'ACCPAY', 'ACCRECCREDIT', indicating the type of financial action (for example, sales or purchase). |
| JournalLine_JournalLineId | String | The unique identifier for the journal line item within the journal entry. This ID is generated by Xero and helps to track individual lines within a journal. |
| JournalLine_Description | String | A description of the journal line item, providing context for the transaction recorded in that line (for example, description of services or goods purchased). |
| JournalLine_AccountId | String | The account associated with the journal line item. This links the journal entry to a specific account in the organization's chart of accounts. |
| JournalLine_AccountCode | String | The customer-defined alphanumeric code for the account. For example, '200' or 'SALES'. This field helps identify which account the transaction is recorded under. |
| JournalLine_AccountType | String | The type of account associated with the journal line. Possible values include 'BANK', 'CURRENT', or 'CRRLIAB', indicating the account's classification within the general ledger. |
| JournalLine_AccountName | String | The name of the account associated with the journal line. This field provides a more descriptive label for the account (for example, 'Cash' or 'Accounts Receivable'). |
| JournalLine_NetAmount | Decimal | The net amount of the journal line item, representing the transaction amount before tax. This value is positive for debits and negative for credits. |
| JournalLine_GrossAmount | Decimal | The total amount of the journal line item, including the tax amount. This represents the full amount of the transaction after tax has been applied. |
| JournalLine_TaxAmount | Decimal | The total tax amount applied to the journal line, based on the applicable tax rate for the transaction. |
| JournalLine_TaxType | String | The tax rate applied to the journal line item. This field defines the specific tax treatment for the transaction, such as 'TAX001', 'TAX002', or other user-defined tax codes. |
| JournalLine_TaxName | String | The name associated with the tax type applied to the journal line item. This provides more descriptive context for the specific tax rate being used (for example, 'Standard VAT'). |
| LineItem_TrackingCategory1_CategoryId | String | The ID of the first tracking category associated with the journal line item. Xero allows two optional tracking categories to be defined for detailed reporting. |
| LineItem_TrackingCategory1_CategoryName | String | The name of the first tracking category. This helps categorize the journal line item for reporting and analysis based on internal classifications. |
| LineItem_TrackingCategory1_OptionId | String | The ID of the selected option within the first tracking category. This specifies which option within the category the journal line item belongs to. |
| LineItem_TrackingCategory1_OptionName | String | The name of the selected option within the first tracking category. This provides more detail about how the journal line item is classified. |
| LineItem_TrackingCategory1_Option_Stat | String | The status of the first tracking category option. This indicates whether the tracking option is active, inactive, or in some other status for reporting purposes. |
| LineItem_TrackingCategory2_CategoryId | String | The ID of the second tracking category for the journal line item. Like the first category, this allows further categorization of the item for reporting. |
| LineItem_TrackingCategory2_CategoryName | String | The name of the second tracking category. This provides a label for the second category used to classify the journal line item. |
| LineItem_TrackingCategory2_OptionId | String | The ID of the selected option within the second tracking category. This helps specify the option that the journal line item is classified under. |
| LineItem_TrackingCategory2_OptionName | String | The name of the selected option within the second tracking category. This gives more context about how the journal line item is categorized. |
| LineItem_TrackingCategory2_Option_Stat | String | The status of the second tracking category option. This indicates whether the second tracking option is active, inactive, or in another status. |
| TenantId | String | The unique identifier for the tenant. This ensures that the query retrieves data specific to a particular tenant in multi-tenant environments, ensuring proper isolation of data. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| ModifiedAfter | String | If set, only journals created or modified since this timestamp will be returned (for example, '2009-11-12T00:00:00'). This filter helps retrieve recent data for reporting or updates. |
| PaymentsOnly | Boolean | Set this to 'true' to retrieve only cash-based transactions (for example, payments) from the journal entries. This helps narrow down the results to specific types of transactions. |
| Offset | Int | If provided, only journals with a higher 'JournalNumber' will be returned. This filter helps paginate large result sets by skipping to a specific point in the journal entries. |