Assets
Query, insert and update assets for a Xero organization.
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:
- AssetTypeId
- PurchaseDate
- PurchasePrice
- BookDepreciationSetting_DepreciationStartDate
- BookDepreciationSetting_AveragingMethod
- 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 Xero-generated ID of the asset |
| AssetName | String | False |
The name of the asset |
| AssetNumber | String | False |
A unique code for the asset |
| AssetStatus | String | False |
Either DRAFT, REGISTERED or DISPOSED |
| Description | String | False |
Free-form comments on the asset |
| PurchaseDate | Date | False |
When the asset was purchased |
| PurchasePrice | Decimal | False |
How much asset cost when it was purchased |
| DisposalDate | Date | False |
When the asset was purchased |
| DisposalPrice | Decimal | False |
What price the asset was disposed at |
| WarrantyExpiryDate | Date | False |
When the asset's warranty expires |
| SerialNumber | String | False |
The asset's serial number |
| AssetTypeId | String | False |
The Id of the type of this asset |
| BookDepreciationSetting_DepreciationMethod | String | False |
Either NoDepreciation, StraightLine, DiminishingValue100, DiminishingValue150, DiminishingValue200 or FullDepreciation |
| BookDepreciationSetting_AveragingMethod | String | False |
Either ActualDays or FullMonth |
| BookDepreciationSetting_DepreciationRate | Double | False |
The rate of depreciation in percent |
| BookDepreciationSetting_EffectiveLifeYears | Int | False |
The effective life of the asset in years |
| BookDepreciationSetting_DepreciationCalculationMethod | String | False |
Either Rate, Life or None |
| BookDepreciationDetail_CurrentCapitalGain | Decimal | False |
Once the asset is disposed, this will be the sell price minus the purchase price |
| BookDepreciationDetail_CurrentGainLoss | Decimal | False |
Once the asset is disposed, this will be the minimum of the sell and purchase price, minus the current book value |
| BookDepreciationDetail_DepreciationStartDate | Date | False |
When the depreciation takes effect |
| BookDepreciationDetail_CostLimit | Decimal | False |
The value of the asset to be depreciated, if this is less than the cost |
| BookDepreciationDetail_ResidualValue | Decimal | False |
The value of the asset once it's been fully depreciated |
| BookDepreciationDetail_PriorAccumDepreciationAmount | Decimal | False |
All depreciation prior to the current fiscal year |
| BookDepreciationDetail_CurrentAccumDepreciationAmount | Decimal | False |
All depreciation occurring in the current financial year |
| CanRollBack | Boolean | True |
Whether the asset's depreciation can be rolled back |
| AccountingBookValue | Decimal | True |
The accounting value of the asset |
| TenantId | String | False |
The ID of the tenant to query instead of the connection tenant |