Asset
adds a fixed asset type
Changed onAdds an fixed asset type to the system
post/AssetTypes
Request
- Base URLhttps://api.xero.com/assets.xro/1.0
- URLhttps://api.xero.com/assets.xro/1.0/AssetTypes
- AuthOAuth 2Authorization code: https://login.xero.com/identity/connect/authorizeToken URL: https://identity.xero.com/connect/token scopes: assets
Headers
Idempotency-Keystring
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
Request body
Example request
{
"assetTypeId": "5da209c5-5e19-4a43-b925-71b776c49ced",
"assetTypeName": "Computer Equipment",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 0.05,
"effectiveLifeYears": 5,
"depreciationCalculationMethod": "None",
"depreciableObjectId": "68f17094-af97-4f1b-b36b-013b45b6ad3c",
"depreciableObjectType": "Asset",
"bookEffectiveDateOfChangeId": "68f17094-af97-4f1b-b36b-013b45b6ad3c"
},
"locks": 33
}Response
results single object - created fixed type
Example response
{
"assetTypeId": "5da209c5-5e19-4a43-b925-71b776c49ced",
"assetTypeName": "Computer Equipment",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 0.05,
"effectiveLifeYears": 5,
"depreciationCalculationMethod": "None",
"depreciableObjectId": "68f17094-af97-4f1b-b36b-013b45b6ad3c",
"depreciableObjectType": "Asset",
"bookEffectiveDateOfChangeId": "68f17094-af97-4f1b-b36b-013b45b6ad3c"
},
"locks": 33
}Changes
- breaking
request body became required
- breaking
- info
added the new optional
headerrequest parameterIdempotency-Key
- info