{"files":{"SKILL.md":"---\nname: xero-assets-api\ndescription: \"Xero Assets API skill. Use when working with Xero Assets for Assets, AssetTypes, Settings. Covers 6 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Xero Assets API\nAPI version: 12.0.0\n\n## Auth\nOAuth2\n\n## Base URL\nhttps://api.xero.com/assets.xro/1.0\n\n## Setup\n1. Configure auth: OAuth2\n2. GET /Assets -- searches fixed asset\n3. POST /Assets -- create first Asset\n\n## Endpoints\n6 endpoints across 3 groups. See references/api-spec.lap for full details.\n\n### Assets\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /Assets | searches fixed asset |\n| POST | /Assets | adds a fixed asset |\n| GET | /Assets/{id} | Retrieves fixed asset by id |\n\n### AssetTypes\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /AssetTypes | searches fixed asset types |\n| POST | /AssetTypes | adds a fixed asset type |\n\n### Settings\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /Settings | searches fixed asset settings |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all Assets?\" -> GET /Assets\n- \"Create a Asset?\" -> POST /Assets\n- \"Get Asset details?\" -> GET /Assets/{id}\n- \"List all AssetTypes?\" -> GET /AssetTypes\n- \"Create a AssetType?\" -> POST /AssetTypes\n- \"List all Settings?\" -> GET /Settings\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Xero Assets API\n@base https://api.xero.com/assets.xro/1.0\n@version 11.1.0\n@auth OAuth2\n@endpoints 6\n@toc Assets(3), AssetTypes(2), Settings(1)\n\n@group Assets\n@endpoint GET /Assets\n@desc searches fixed asset\n@required {status: str # Required when retrieving a collection of assets. See Asset Status Codes}\n@optional {page: int # Results are paged. This specifies which page of the results to return. The default page is 1., pageSize: int # The number of records returned per page. By default the number of records returned is 10., orderBy: str(AssetType/AssetName/AssetNumber/PurchaseDate/PurchasePrice/DisposalDate/DisposalPrice) # Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice., sortDirection: str(asc/desc) # ASC or DESC, filterBy: str # A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields.}\n@returns(200) {pagination: any, items: [map]} # search results matching criteria\n@errors {400: bad input parameter}\n\n@endpoint POST /Assets\n@desc adds a fixed asset\n@required {assetName: str # The name of the asset}\n@optional {Idempotency-Key: str # This allows you to safely retry requests without the risk of duplicate processing. 128 character max., assetId: str(uuid) # The Xero-generated Id for the asset, assetTypeId: str(uuid) # The Xero-generated Id for the asset type, assetNumber: str # Must be unique., purchaseDate: str(date) # The date the asset was purchased YYYY-MM-DD, purchasePrice: num(double) # The purchase price of the asset, disposalDate: str(date) # The date the asset was disposed, disposalPrice: num(double) # The price the asset was disposed at, assetStatus: str(Draft/Registered/Disposed) # See Asset Status Codes., warrantyExpiryDate: str # The date the asset’s warranty expires (if needed) YYYY-MM-DD, serialNumber: str # The asset's serial number, bookDepreciationSetting: any, bookDepreciationDetail: any, canRollback: bool # Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back., accountingBookValue: num(double) # The accounting value of the asset, isDeleteEnabledForDate: bool # Boolean to indicate whether delete is enabled}\n@returns(200) {assetId: str(uuid), assetName: str, assetTypeId: str(uuid), assetNumber: str, purchaseDate: str(date), purchasePrice: num(double), disposalDate: str(date), disposalPrice: num(double), assetStatus: str, warrantyExpiryDate: str, serialNumber: str, bookDepreciationSetting: any, bookDepreciationDetail: any, canRollback: bool, accountingBookValue: num(double), isDeleteEnabledForDate: bool} # return single object - create new asset\n@errors {400: invalid input, object invalid}\n@example_request {\"assetName\":\"Computer74863\",\"assetNumber\":\"123477544\",\"purchaseDate\":\"2020-01-01\",\"purchasePrice\":100,\"disposalPrice\":23.23,\"assetStatus\":\"Draft\",\"bookDepreciationSetting\":{\"depreciationMethod\":\"StraightLine\",\"averagingMethod\":\"ActualDays\",\"depreciationRate\":0.5,\"depreciationCalculationMethod\":\"None\"},\"bookDepreciationDetail\":{\"currentCapitalGain\":5.32,\"currentGainLoss\":3.88,\"depreciationStartDate\":\"2020-01-02\",\"costLimit\":100,\"currentAccumDepreciationAmount\":2.25},\"AccountingBookValue\":99.5}\n\n@endpoint GET /Assets/{id}\n@desc Retrieves fixed asset by id\n@required {id: str(uuid) # fixed asset id for single object}\n@returns(200) {assetId: str(uuid), assetName: str, assetTypeId: str(uuid), assetNumber: str, purchaseDate: str(date), purchasePrice: num(double), disposalDate: str(date), disposalPrice: num(double), assetStatus: str, warrantyExpiryDate: str, serialNumber: str, bookDepreciationSetting: any, bookDepreciationDetail: any, canRollback: bool, accountingBookValue: num(double), isDeleteEnabledForDate: bool} # search results matching criteria\n@errors {400: bad input parameter}\n\n@endgroup\n\n@group AssetTypes\n@endpoint GET /AssetTypes\n@desc searches fixed asset types\n@returns(200) search results matching criteria\n@errors {400: bad input parameter}\n\n@endpoint POST /AssetTypes\n@desc adds a fixed asset type\n@required {assetTypeName: str # The name of the asset type, bookDepreciationSetting: any}\n@optional {Idempotency-Key: str # This allows you to safely retry requests without the risk of duplicate processing. 128 character max., assetTypeId: str(uuid) # Xero generated unique identifier for asset types, fixedAssetAccountId: str(uuid) # The asset account for fixed assets of this type, depreciationExpenseAccountId: str(uuid) # The expense account for the depreciation of fixed assets of this type, accumulatedDepreciationAccountId: str(uuid) # The account for accumulated depreciation of fixed assets of this type, locks: int # All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed.}\n@returns(200) {assetTypeId: str(uuid), assetTypeName: str, fixedAssetAccountId: str(uuid), depreciationExpenseAccountId: str(uuid), accumulatedDepreciationAccountId: str(uuid), bookDepreciationSetting: any, locks: int} # results single object -  created fixed type\n@errors {400: invalid input, object invalid, 409: a type already exists}\n@example_request {\"assetTypeName\":\"Machinery11004\",\"fixedAssetAccountId\":\"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82\",\"depreciationExpenseAccountId\":\"d1602f69-f900-4616-8d34-90af393fa368\",\"accumulatedDepreciationAccountId\":\"9195cadd-8645-41e6-9f67-7bcd421defe8\",\"bookDepreciationSetting\":{\"depreciationMethod\":\"DiminishingValue100\",\"averagingMethod\":\"ActualDays\",\"depreciationRate\":0.05,\"depreciationCalculationMethod\":\"None\"}}\n\n@endgroup\n\n@group Settings\n@endpoint GET /Settings\n@desc searches fixed asset settings\n@returns(200) {assetNumberPrefix: str, assetNumberSequence: str, assetStartDate: str(date), lastDepreciationDate: str(date), defaultGainOnDisposalAccountId: str(uuid), defaultLossOnDisposalAccountId: str(uuid), defaultCapitalGainOnDisposalAccountId: str(uuid), optInForTax: bool} # search results matching criteria\n@errors {400: bad input parameter}\n\n@endgroup\n\n@end\n"}}