Asset
adds a fixed asset
Changed onAdds an asset to the system
post/Assets
Request
- Base URLhttps://api.xero.com/assets.xro/1.0
- URLhttps://api.xero.com/assets.xro/1.0/Assets
- 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
{
"assetId": "3b5b3a38-5649-495f-87a1-14a4e5918634",
"assetName": "Awesome Truck 3",
"assetTypeId": "3b5b3a38-5649-495f-87a1-14a4e5918634",
"assetNumber": "FA-0013",
"purchaseDate": "2015-07-01T00:00:00",
"disposalDate": "2020-07-01T00:00:00",
"assetStatus": "Draft",
"warrantyExpiryDate": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"serialNumber": "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"
},
"bookDepreciationDetail": {
"currentCapitalGain": 5.25,
"currentGainLoss": 10.5,
"depreciationStartDate": "2015-07-01T00:00:00",
"costLimit": 9000,
"residualValue": 10000,
"priorAccumDepreciationAmount": 0.45,
"currentAccumDepreciationAmount": 5
},
"canRollback": true,
"isDeleteEnabledForDate": true
}Response
return single object - create new asset
Example response
{
"assetId": "3b5b3a38-5649-495f-87a1-14a4e5918634",
"assetName": "Awesome Truck 3",
"assetTypeId": "3b5b3a38-5649-495f-87a1-14a4e5918634",
"assetNumber": "FA-0013",
"purchaseDate": "2015-07-01T00:00:00",
"disposalDate": "2020-07-01T00:00:00",
"assetStatus": "Draft",
"warrantyExpiryDate": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"serialNumber": "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"
},
"bookDepreciationDetail": {
"currentCapitalGain": 5.25,
"currentGainLoss": 10.5,
"depreciationStartDate": "2015-07-01T00:00:00",
"costLimit": 9000,
"residualValue": 10000,
"priorAccumDepreciationAmount": 0.45,
"currentAccumDepreciationAmount": 5
},
"canRollback": true,
"isDeleteEnabledForDate": true
}Changes
- info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- info
added the new optional
headerrequest parameterIdempotency-Key
- info