CData Python Connector for Xero

Build 25.0.9454

Accounts

Allows for the querying, insertion, updating, and deletion of accounts for a Xero organization. Accounts represent the various financial categories used to track and record the organization's financial transactions, such as assets, liabilities, and equity.

Table Specific Information

The Accounts table allows you to SELECT and INSERT accounts for a Xero organization.

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. The following fields are required for inserts: Code, Name, and Type.

INSERT INTO Accounts (Name, Code, Type) VALUES ('John Doe', '2000', 'BANK')

Columns

Name Type ReadOnly Description
AccountId [KEY] String True

A unique identifier assigned by Xero to the account.

Code String False

User-defined alphanumeric code for the account, such as 200 or SALES.

Name String False

The name of the account as defined in the chart of accounts.

Type String False

The account type. Valid values include BANK, CURRENT, CURRLIAB, DEPRECIATN, DIRECTCOSTS, EQUITY, EXPENSE, FIXED, LIABILITY, NONCURRENT, OTHERINCOME, OVERHEADS, PREPAYMENT, REVENUE, SALES, TERMLIAB, PAYGLIABILITY, SUPERANNUATIONEXPENSE, SUPERANNUATIONLIABILITY, and WAGESEXPENSE.

Description String False

A text description of the account's purpose. Not returned for bank accounts.

TaxType String False

The applicable tax type for the account (for example, INPUT or NONE).

EnablePaymentsToAccount Boolean False

Indicates whether payments can be directly applied to this account.

ShowInExpenseClaims Boolean False

Indicates whether this account is available for use in employee expense claims.

Class String True

The high-level classification of the account, such as ASSET, LIABILITY, EQUITY, EXPENSE, or REVENUE.

Status String False

The current status of the account (for example, ACTIVE or ARCHIVED).

SystemAccount String True

Returned only if the account is a system-defined account, such as DEBTORS or CREDITORS.

BankAccountNumber String False

The bank account number associated with this account. Applicable only to BANK account types.

CurrencyCode String False

The ISO 4217 currency code associated with this bank account (for example, USD, NZD). BANK account types only.

ReportingCode String True

The reporting code used for compliance reporting. Available for NZ-based organizations only.

ReportingCodeName String True

The name of the reporting code. Available for NZ-based organizations only.

UpdatedDateUTC Datetime True

The UTC timestamp of the last update made to the account.

HasAttachments Boolean True

Indicates whether the account record includes any attachments (true or false).

BankAccountType String False

The type of bank account. Valid values: BANK, CREDITCARD, PAYPAL.

TenantId String False

The tenant ID to use for the query, useful for accessing a specific organization in multi-tenant environments.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454