{"openapi":"3.1.0","info":{"title":"GET /api/v1/fixed-assets/depreciation-preview","version":"1.0.0","description":"Preview depreciation"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/fixed-assets/depreciation-preview":{"get":{"tags":["fixed-assets"],"summary":"Preview depreciation","description":"Preview the next depreciation run.\n\nShows which assets will be depreciated and the amounts, without actually\ncreating the entries.","operationId":"preview_depreciation_api_v1_fixed_assets_depreciation_preview_get","parameters":[{"name":"period_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Period date (first of month)","title":"Period Date"},"description":"Period date (first of month)"},{"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/DepreciationPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DepreciationPreviewEntry":{"properties":{"asset_id":{"type":"string","title":"Asset Id","description":"Asset ID"},"asset_name":{"type":"string","title":"Asset Name","description":"Asset name"},"depreciation_amount":{"type":"integer","title":"Depreciation Amount","description":"Projected depreciation in cents"},"new_accumulated":{"type":"integer","title":"New Accumulated","description":"Projected accumulated depreciation in cents"},"new_book_value":{"type":"integer","title":"New Book Value","description":"Projected book value after depreciation in cents"}},"type":"object","required":["asset_id","asset_name","depreciation_amount","new_accumulated","new_book_value"],"title":"DepreciationPreviewEntry","description":"Preview of depreciation for one asset."},"DepreciationPreviewResponse":{"properties":{"period_date":{"type":"string","format":"date","title":"Period Date","description":"Period to preview"},"assets_count":{"type":"integer","title":"Assets Count","description":"Number of assets included"},"total_depreciation":{"type":"integer","title":"Total Depreciation","description":"Total projected depreciation in cents"},"entries":{"items":{"$ref":"#/components/schemas/DepreciationPreviewEntry"},"type":"array","title":"Entries","description":"Per-asset depreciation preview"}},"type":"object","required":["period_date","assets_count","total_depreciation","entries"],"title":"DepreciationPreviewResponse","description":"Preview of next depreciation run."},"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":[]}]}