CData Python Connector for Xero

Build 25.0.9454

TaxRates

Manages tax rates in Xero. It allows you to query, insert, and update tax rates, which are necessary for calculating tax liabilities on sales and purchases.

Table Specific Information

The TaxRates table allows you to SELECT, INSERT, and UPDATE tax components for tax rates in 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 TaxType.

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 create a new tax rate, the Name field must be set in addition to at least one tax component; the TaxComponent_Name, TaxComponent_Rate, and TaxComponent_IsCompound fields are required to insert a new line item.

In addition to inserting a single row, this table offers two additional ways to insert into a table.

  1. You can insert a new object with multiple line items using XML aggregates. The elements supported here are the same as the TaxComponent columns without the "TaxComponent_" prefix.
    INSERT INTO TaxRates (Name, TaxComponentAggregate) VALUES (
      'My Tax Rate',
      '<TaxComponent>
    	<Name>customTax1</Name>
    	<Rate>1.0000</Rate>
    	<IsCompound>false</IsCompound>
       </TaxComponent>
       <TaxComponent>
    	<Name>customTax2</Name>
    	<Rate>2.0000</Rate>
    	<IsCompound>false</IsCompound>
       </TaxComponent>'
    )
  2. You can also insert a new tax component on an existing object by specifiying the Xero-generated value for the existing record. For example, adding a tax component to an existing tax rate:
    INSERT INTO TaxRates (TaxType, TaxComponent_Name, TaxComponent_Rate, TaxComponent_IsCompound) VALUES ('TAX001', 'customTax2', '2.0000', 'False')

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.

Note: You cannot update predefined tax rates through the Xero API.

DELETE

The Xero API has limited support for deleting any object. In order to delete objects, you must update their Status to an appropriate value.

Applicable values for this field may be state-dependent. For example, invoices can only have their status set to DELETED when the invoice status is currently DRAFT or SUBMITTED.

Columns

Name Type ReadOnly Description
Id [KEY] String True

A unique identifier for the tax component, which is a combination of the tax component index and the TaxType.

TaxType String True

The type of tax rate applied. Default tax rates are provided by Xero, but new tax rates can be created. TaxTypes for new rates are assigned in the format TAX001, TAX002

Name String False

The name assigned to the tax rate, typically describing the nature of the tax (for example, VAT or GST).

TaxComponent_Name String False

The name of the specific tax component within the tax rate.

TaxComponent_Rate Double False

The rate of the tax component expressed as a percentage. This is accurate to 4 decimal places.

TaxComponent_IsCompound Boolean False

A boolean value that indicates whether the tax rate is compounded. Compound tax rates mean the tax is applied on top of previous tax rates.

TaxComponentAggregate String False

This field is used to define multiple TaxComponent rows using XML values. This is provided only during an INSERT operation.

Status String False

The current status of the tax rate. Possible values include ACTIVE and DELETED.

ReportTaxType String False

The report tax type. This element is required for Australian (AU), New Zealand (NZ), and UK organisations. It is not applicable to US and global organisations.

CanApplyToAssets Boolean True

A boolean indicating whether the tax rate can be applied to asset accounts.

CanApplyToEquity Boolean True

A boolean indicating whether the tax rate can be applied to equity accounts.

CanApplyToExpenses Boolean True

A boolean indicating whether the tax rate can be applied to expense accounts.

CanApplyToLiabilities Boolean True

A boolean indicating whether the tax rate can be applied to liability accounts.

CanApplyToRevenue Boolean True

A boolean indicating whether the tax rate can be applied to revenue accounts.

DisplayTaxRate Double True

The tax rate displayed as a decimal, rounded to 4 decimal places (for example, 12.5000).

EffectiveRate Double True

The effective tax rate, also expressed as a decimal and accurate to 4 decimal places (for example, 12.5000).

TenantId String False

The ID of the tenant for querying, which overrides the connection tenant for this query.

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