ManualJournals
Used to query, insert, and update manual journals. Manual journals are used to record financial transactions that don't follow standard processes.
Table Specific Information
The ManualJournals table allows you to SELECT, INSERT, and UPDATE manual journals journal lines for a Xero organization. The Id column is generated by the connector; it combines the index of the line item with the unique, Xero-generated ManualJournalId.
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 Xero API does not list a high volume threshold for the ManualJournals table. The Xero API lists the following optimized filters for this table:
- Optimized columns (when used in WHERE clauses):
- Narration
- Optimized ORDER BY columns:
- ManualJournalId
- UpdatedDateUTC
- Date
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.
INSERT
To insert a single row, set the required fields. A new table object is created as a single entry. To insert a new manual journal record, the Narration field is required in addition to at least two line items. A journal record must contain at least one credit and one debit, so that the record as a whole is balanced.
- You can insert a new object with multiple line items using an XML aggregate.
The elements supported here are the same as the JournalLine columns without the "JournalLine_" prefix, except when assigning tracking categories. Please refer to the
Xero documentation of the ManualJournals API for more details.
INSERT INTO ManualJournals (Narration, JournalLineAggregate) VALUES ( 'Accrued expenses', '<JournalLine> <Description>Coded incorrectly Office Equipment should be Computer Equipment</Description> <TaxType>NONE</TaxType> <LineAmount>-2569</LineAmount> <AccountCode>720</AccountCode> </JournalLine> <JournalLine> ... </JournalLine>' )
Note: This method must be used for inserting multiple parent ManualJournals in a single query. - You can also insert a new line item on an existing object by specifying the Xero-generated value of the existing record. For example, to add a line item to an existing invoice:
INSERT INTO ManualJournals (ManualJournalId, JournalLine_LineAmount, JournalLine_AccountCode) VALUES ('XXXXX-XXXXX-XXXXX-XXXXX', 55.00, '200')
Note: Inserting into existing records will count as two operations against the Xero API. One is required to retrieve the existing record, and another to update the record with new data.
UPDATE
You can update any field that is not read-only.
Note: UPDATE operations will count as two operations against the Xero API. One is required to retrieve the existing record, and another to update the record with new data.
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
A unique identifier for the journal line, combining its position in the history log with the Xero-generated identifier of the manual journal. This ensures that each journal entry can be traced and tracked accurately. |
| ManualJournalId | String | False |
The unique identifier of the manual journal. This links each journal line item to a specific manual journal, allowing for easy reference and organization. |
| Narration | String | False |
A description of the journal being posted. This field provides additional context or explanation about the journal entry, helping users understand the purpose of the journal. |
| JournalLine_LineAmount | Decimal | False |
The total for the journal line item. This value is positive for debits and negative for credits, reflecting the financial impact of the line item on the account. |
| JournalLine_AccountCode | String | False |
The account code that identifies the account associated with the journal line item. This field links the journal line to a specific account in the organization's chart of accounts. |
| JournalLine_Description | String | False |
The description for the manual journal line item. This provides more details about the transaction and is used to explain the nature of the entry being recorded. |
| JournalLine_TaxType | String | False |
The tax type applied to the journal line item. This field allows overriding the default tax code for the selected account, enabling specific tax treatments for individual journal lines. |
| JournalLine_TrackingCategory1_CategoryId | String | False |
The ID of the first tracking category associated with the journal line item. Xero allows two optional tracking categories to be defined for more granular reporting. |
| JournalLine_TrackingCategory1_CategoryName | String | False |
The name of the first tracking category. This helps users understand how the journal line item is categorized for detailed financial reporting. |
| JournalLine_TrackingCategory1_OptionId | String | False |
The ID of the selected option within the first tracking category. This further refines the categorization of the journal line item. |
| JournalLine_TrackingCategory1_OptionName | String | False |
The name of the selected option within the first tracking category. This provides more clarity on how the journal line item is classified within the category. |
| JournalLine_TrackingCategory1_Option_Stat | String | False |
The status of the selected option in the first tracking category. This indicates whether the option is active or inactive, affecting how the journal item is reported. |
| JournalLine_TrackingCategory2_CategoryId | String | False |
The ID of the second tracking category for the journal line item. This enables further categorization, providing additional classification in financial reporting. |
| JournalLine_TrackingCategory2_CategoryName | String | False |
The name of the second tracking category. This field helps classify the journal line item in a second category, further breaking down the financial data. |
| JournalLine_TrackingCategory2_OptionId | String | False |
The ID of the selected option within the second tracking category. This further refines the classification of the journal line item. |
| JournalLine_TrackingCategory2_OptionName | String | False |
The name of the selected option within the second tracking category. This provides more context about how the journal line item is categorized. |
| JournalLine_TrackingCategory2_Option_Stat | String | False |
The status of the selected option in the second tracking category. This indicates whether the option is active or inactive, impacting the item's inclusion in reports. |
| JournalLineAggregate | String | False |
Used to define multiple journal line items in XML format. This field should only be provided during an 'INSERT' operation to create new line items for the journal. |
| Date | Date | False |
The date the journal was posted. This field indicates when the journal entry was officially recorded in the system and helps track when financial transactions occurred. |
| Status | String | False |
The status code of the manual journal. The valid values are 'VALID', 'POSTED', 'DELETED', and 'VOIDED', representing the journal's current state in the system. |
| URL | String | False |
A URL to a source document associated with the journal. This could link to external references, supporting documentation, or scanned copies of receipts and invoices. |
| ShowOnCashBasisReports | Boolean | False |
Indicates whether this journal should be included in cash-basis reports. By default, this field is set to 'true', meaning the journal will be included in reports based on cash accounting. |
| LineAmountTypes | String | False |
The line amount type, which specifies whether line amounts include tax. Valid values are 'Exclusive' (tax is excluded), 'Inclusive' (tax is included), and 'NoTax' (no tax is applied). This ensures accurate tax reporting. |
| UpdatedDateUTC | Datetime | True |
The timestamp of when the manual journal was last updated. This helps track when changes were made to the journal, ensuring up-to-date information is available. |
| HasAttachments | Boolean | True |
Indicates whether the journal entry has any attachments, such as receipts or supporting documents. This field helps identify journals with additional documentation. |
| TenantId | String | False |
The unique identifier of the tenant. This ensures the query retrieves data specific to a particular tenant in multi-tenant environments, isolating the data for a specific organization. |