JDBC Driver for Xero

Build 24.0.9060

Tasks

Query, insert, update and delete tasks for a Xero project.

Table-Specific Information

Creating Tasks

A Task must be created with a ProjectId, Name, RateCurrency, RateValue, and ChargeType. The ProjectId and RateCurrency must come from the project (ProjectId and CurrencyCode respectively). ChargeType determines how the RateValue is applied to the cost of the project:

  • TIME charges the project the amount in RateValue every hour.
  • FIXED charges the project the amount in RateValue once.
  • NON_CHARGEABLE does not charge the project. RateValue must be set to 0.

The EstimateMinutes may also be provided to set the time estimate for the task:

INSERT INTO Tasks (ProjectId, Name, RateCurrency, RateValue, ChargeType, EstimateMinutes) VALUES ('1de78bad-5a81-4cb8-ab53-5a1a3bc73b29', 'Pave Sidewalks', 'USD', 25000, 'FIXED', 1000)

Updating Tasks

Once a Task has been created, its RateCurrency, RateValue, ChargeType or EstimateMinutes may be updated:

UPDATE Tasks SET RateValue = 250, ChargeType = 'TIME', EstimateMinutes = 2000 WHERE Id = '1de78bad-5a81-4cb8-ab53-5a1a3bc73b29/d15810a1-9324-4765-a357-80d160a0b87c'

Deleting Tasks

Tasks may also be deleted by specifying their Id:

DELETE FROM Tasks WHERE Id = '1de78bad-5a81-4cb8-ab53-5a1a3bc73b29/d15810a1-9324-4765-a357-80d160a0b87c'

Columns

Name Type ReadOnly Description
Id [KEY] String False

A unique combination of the project and task identifiers

TaskId String True

The unique Xero identifier of the task.

ProjectId String False

The ID of the project

Name String False

The name of the task

ChargeType String False

One of TIME, FIXED or NON_CHARGEABLE

RateValue Decimal False

The per-hour rate billed for the task

RateCurrency String False

The currency of the RateValue

EstimateMinutes Int False

The estimated number of minutes to complete the task

TotalMinutes Int True

The total number of minutes logged against the task

TotalAmountValue Decimal True

The total value of the task, TotalMinutes multiplied by RateValue

TotalAmountCurrency String True

The currency of the TotalAmountValue

MinutesToBeInvoiced Int True

The minutes on this task that have not been invoiced

MinutesInvoiced Int True

The minutes on this task that have been invoiced

NonChargeableMinutes Int True

The minutes on this task that cannot be charged

AmountToBeInvoicedValue Decimal True

The total value of the task that has not been invoiced, MinutesToBeInvoiced multiplied by RateValue

AmountToBeInvoicedCurrency String True

The currency of the AmountToBeInvoicedValue

AmountInvoicedValue Decimal True

The total value of the task that has been invoiced, MinutesInvoiced multiplied by RateValue

AmountInvoicedCurrency String True

The currency of the AmountInvoicedValue

Status String True

One of ACTIVE, INVOICED or LOCKED

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