ODBC Driver for Xero

Build 24.0.9060

TaxRates

Usage information for the operation TaxRates.rsd.

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 driver 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

The tax component index combined with the TaxType.

TaxType String True

The tax type for the tax rate. There are default tax rates, additionally new tax rates can be setup for a Xero organisation. All new tax rates added have a TaxType of the format TAX001, TAX002 etc.

Name String False

The name for the tax rate.

TaxComponent_Name String False

The name of Tax Component

TaxComponent_Rate Double False

The tax Rate (up to 4dp).

TaxComponent_IsCompound Boolean False

Boolean to describe if Tax rate is compounded.

TaxComponentAggregate String False

Used to define TaxComponent rows using XML values. Should be provided on INSERT only.

Status String False

The Status of the Tax Rate e.g. ACTIVE, DELETED

ReportTaxType String False

The report tax type. Required for AU, NZ, and UK organisations (US and Global do not support this element).

CanApplyToAssets Boolean True

Boolean to describe if tax rate can be used for asset accounts.

CanApplyToEquity Boolean True

Boolean to describe if tax rate can be used for equity accounts.

CanApplyToExpenses Boolean True

Boolean to describe if tax rate can be used for expense accounts.

CanApplyToLiabilities Boolean True

Boolean to describe if tax rate can be used for liability accounts.

CanApplyToRevenue Boolean True

Boolean to describe if tax rate can be used for revenue accounts.

DisplayTaxRate Double True

Tax Rate (decimal to 4dp) e.g 12.5000.

EffectiveRate Double True

Effective Tax Rate (decimal to 4dp) e.g 12.5000.

TenantId String False

The ID of the tenant to query instead of the connection tenant

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060