{"openapi":"3.1.0","info":{"title":"GET /api/v1/fixed-assets/{asset_id}/depreciation-schedule","version":"1.0.0","description":"Get depreciation schedule"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/fixed-assets/{asset_id}/depreciation-schedule":{"get":{"tags":["fixed-assets"],"summary":"Get depreciation schedule","description":"Get the full depreciation schedule for an asset.\n\nShows the expected depreciation for each period over the asset's useful life.","operationId":"get_depreciation_schedule_api_v1_fixed_assets__asset_id__depreciation_schedule_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepreciationScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DepreciationMethod":{"type":"string","enum":["straight_line","declining_balance","double_declining","units_of_production"],"title":"DepreciationMethod","description":"Depreciation calculation methods."},"DepreciationScheduleEntry":{"properties":{"period":{"type":"integer","title":"Period","description":"Period number (1-based)"},"period_date":{"type":"string","format":"date","title":"Period Date","description":"First day of the period"},"beginning_book_value":{"type":"integer","title":"Beginning Book Value","description":"Book value at start of period, in cents"},"depreciation_amount":{"type":"integer","title":"Depreciation Amount","description":"Depreciation for this period, in cents"},"accumulated_depreciation":{"type":"integer","title":"Accumulated Depreciation","description":"Cumulative depreciation, in cents"},"ending_book_value":{"type":"integer","title":"Ending Book Value","description":"Book value at end of period, in cents"}},"type":"object","required":["period","period_date","beginning_book_value","depreciation_amount","accumulated_depreciation","ending_book_value"],"title":"DepreciationScheduleEntry","description":"A single entry in a depreciation schedule."},"DepreciationScheduleResponse":{"properties":{"asset_id":{"type":"string","title":"Asset Id","description":"Asset ID"},"asset_name":{"type":"string","title":"Asset Name","description":"Asset name"},"original_cost":{"type":"integer","title":"Original Cost","description":"Original purchase cost in cents"},"salvage_value":{"type":"integer","title":"Salvage Value","description":"Estimated salvage value in cents"},"useful_life_months":{"type":"integer","title":"Useful Life Months","description":"Useful life in months"},"depreciation_method":{"$ref":"#/components/schemas/DepreciationMethod","description":"Depreciation method used"},"schedule":{"items":{"$ref":"#/components/schemas/DepreciationScheduleEntry"},"type":"array","title":"Schedule","description":"Period-by-period depreciation schedule"}},"type":"object","required":["asset_id","asset_name","original_cost","salvage_value","useful_life_months","depreciation_method","schedule"],"title":"DepreciationScheduleResponse","description":"Full depreciation schedule for an asset."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}