Cmdlets for Xero

Build 25.0.9434

Assets

Stores and manages asset records within Xero. It enables querying, inserting, and updating asset data, such as purchase price, asset type, depreciation settings, and more.

Table-Specific Information

Creating Assets

An asset can be created with only an AssetName and an AssetNumber. This will create a draft asset with blank settings for purchase date and price, serial number and all other values.

INSERT INTO Assets (AssetName, AssetNumber) VALUES ('Corporate van', 'FA-0042')

Updating Assets

Like asset types, an asset's value can be measured with either a depreciation rate or an estimated lifetime. Once these values have been set, you can only change between the two by setting the other to null:
UPDATE Assets
SET BookDepreciationSetting_DepreciationRate = 0.12,
    BookDepreciationSetting_EffectiveLifeYears = null
WHERE AssetId = '46c7f1f4-7cdb-47d3-8772-2796d0b83e87'

Registering Assets

To move an asset from the draft to the registered state, you must assign these properties on it:

  1. AssetTypeId
  2. PurchaseDate
  3. PurchasePrice
  4. BookDepreciationSetting_DepreciationStartDate
  5. BookDepreciationSetting_AveragingMethod
  6. Either a BookDepreciationSetting_DepreciationRate or a BookDepreciationSetting_EffectiveLifeYears

Then you can update the AssetStatus field to the value "Registered".

Disposing Assets

Disposing of assets is not supported through the API.

Columns

Name Type ReadOnly Description
AssetId [KEY] String True

The unique identifier generated by Xero for the asset.

AssetName String False

The name given to the asset in the system.

AssetNumber String False

A unique code or reference number assigned to the asset.

AssetStatus String False

The current status of the asset. Valid values are 'DRAFT', 'REGISTERED', or 'DISPOSED'.

Description String False

A field for any free-form comments or additional information regarding the asset.

PurchaseDate Date False

The date when the asset was acquired.

PurchasePrice Decimal False

The cost of the asset at the time of purchase.

DisposalDate Date False

The date when the asset was disposed of.

DisposalPrice Decimal False

The price at which the asset was disposed of.

WarrantyExpiryDate Date False

The date when the asset's warranty expires.

SerialNumber String False

The asset's serial number, which can be used for tracking or identification.

AssetTypeId String False

The identifier for the category or type of the asset.

BookDepreciationSetting_DepreciationMethod String False

The method of depreciation applied to the asset. Options include: 'NoDepreciation', 'StraightLine', 'DiminishingValue100', 'DiminishingValue150', 'DiminishingValue200', or 'FullDepreciation'.

BookDepreciationSetting_AveragingMethod String False

The method for calculating depreciation periods. Options include: 'ActualDays' or 'FullMonth'.

BookDepreciationSetting_DepreciationRate Double False

The annual depreciation rate as a percentage.

BookDepreciationSetting_EffectiveLifeYears Int False

The number of years over which the asset will be depreciated.

BookDepreciationSetting_DepreciationCalculationMethod String False

The method used to calculate depreciation. Options include: 'Rate', 'Life', or 'None'.

BookDepreciationDetail_CurrentCapitalGain Decimal False

The capital gain realized when the asset is disposed of, calculated as the disposal price minus the purchase price.

BookDepreciationDetail_CurrentGainLoss Decimal False

The difference between the purchase price and the current book value, which represents the gain or loss.

BookDepreciationDetail_DepreciationStartDate Date False

The date when depreciation on the asset begins.

BookDepreciationDetail_CostLimit Decimal False

The maximum value of the asset to be depreciated, if it is less than the actual purchase price.

BookDepreciationDetail_ResidualValue Decimal False

The estimated value of the asset after it has been fully depreciated.

BookDepreciationDetail_PriorAccumDepreciationAmount Decimal False

The total depreciation accumulated on the asset before the current fiscal year.

BookDepreciationDetail_CurrentAccumDepreciationAmount Decimal False

The depreciation amount accumulated during the current fiscal year.

CanRollBack Boolean True

Indicates whether the depreciation on the asset can be reversed.

AccountingBookValue Decimal True

The current accounting value of the asset, after accounting for depreciation.

TenantId String False

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

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