{"openapi":"3.1.0","info":{"title":"GET /api/v1/personal/forecast","version":"1.0.0","description":"Long-range wealth & FIRE trajectory forecast"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/personal/forecast":{"get":{"tags":["personal"],"summary":"Long-range wealth & FIRE trajectory forecast","description":"Projects nominal and inflation-adjusted net worth and Financial Independence year from live ledger balances and savings pace.","operationId":"get_wealth_forecast","parameters":[{"name":"years","in":"query","required":false,"schema":{"type":"integer","maximum":40,"minimum":1,"description":"Forecast horizon in years.","default":10,"title":"Years"},"description":"Forecast horizon in years."},{"name":"annual_return_pct","in":"query","required":false,"schema":{"type":"number","maximum":25.0,"minimum":0.0,"description":"Expected nominal annual investment return (%).","default":7.0,"title":"Annual Return Pct"},"description":"Expected nominal annual investment return (%)."},{"name":"inflation_pct","in":"query","required":false,"schema":{"type":"number","maximum":15.0,"minimum":0.0,"description":"Expected annual inflation rate (%).","default":2.5,"title":"Inflation Pct"},"description":"Expected annual inflation rate (%)."},{"name":"extra_monthly_savings_cents","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Additional monthly savings in cents for what-if modeling.","default":0,"title":"Extra Monthly Savings Cents"},"description":"Additional monthly savings in cents for what-if modeling."},{"name":"fi_multiple","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":10,"description":"Annual spending multiple for FI target (25 = 4% rule).","default":25,"title":"Fi Multiple"},"description":"Annual spending multiple for FI target (25 = 4% rule)."},{"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/SuccessEnvelope_WealthForecastResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"error":"validation_error","message":"Validation failed: due_date: Input should be a valid date","errors":{"due_date":"Input should be a valid date"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"error":"not_found","message":"Resource not found","code":"NOT_FOUND_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"get_wealth_forecast_api_v1_personal_forecast_get"}}},"components":{"schemas":{"SuccessEnvelope_WealthForecastResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/WealthForecastResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[WealthForecastResponse]"},"WealthForecastResponse":{"properties":{"as_of_date":{"type":"string","format":"date","title":"As Of Date"},"years":{"type":"integer","title":"Years"},"annual_return_pct":{"type":"number","title":"Annual Return Pct"},"inflation_pct":{"type":"number","title":"Inflation Pct"},"fi_multiple":{"type":"integer","title":"Fi Multiple"},"current_net_worth_cents":{"type":"integer","title":"Current Net Worth Cents"},"current_assets_cents":{"type":"integer","title":"Current Assets Cents"},"current_liabilities_cents":{"type":"integer","title":"Current Liabilities Cents"},"avg_monthly_income_cents":{"type":"integer","title":"Avg Monthly Income Cents"},"avg_monthly_spending_cents":{"type":"integer","title":"Avg Monthly Spending Cents"},"baseline_monthly_savings_cents":{"type":"integer","title":"Baseline Monthly Savings Cents"},"extra_monthly_savings_cents":{"type":"integer","title":"Extra Monthly Savings Cents"},"effective_monthly_savings_cents":{"type":"integer","title":"Effective Monthly Savings Cents"},"fi_target_cents":{"type":"integer","title":"Fi Target Cents"},"fi_progress_pct":{"type":"number","title":"Fi Progress Pct"},"baseline_fi_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Baseline Fi Year"},"boosted_fi_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Boosted Fi Year"},"years_saved_to_fi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Years Saved To Fi"},"projected_end_baseline_cents":{"type":"integer","title":"Projected End Baseline Cents"},"projected_end_boosted_cents":{"type":"integer","title":"Projected End Boosted Cents"},"projected_end_boosted_real_cents":{"type":"integer","title":"Projected End Boosted Real Cents"},"points":{"items":{"$ref":"#/components/schemas/WealthForecastYearPoint"},"type":"array","title":"Points"}},"type":"object","required":["as_of_date","years","annual_return_pct","inflation_pct","fi_multiple","current_net_worth_cents","current_assets_cents","current_liabilities_cents","avg_monthly_income_cents","avg_monthly_spending_cents","baseline_monthly_savings_cents","extra_monthly_savings_cents","effective_monthly_savings_cents","fi_target_cents","fi_progress_pct","projected_end_baseline_cents","projected_end_boosted_cents","projected_end_boosted_real_cents","points"],"title":"WealthForecastResponse","description":"Ledger-grounded multi-year Net Worth and Financial Independence projection."},"WealthForecastYearPoint":{"properties":{"year":{"type":"integer","title":"Year"},"year_offset":{"type":"integer","title":"Year Offset"},"baseline_net_worth_cents":{"type":"integer","title":"Baseline Net Worth Cents"},"boosted_net_worth_cents":{"type":"integer","title":"Boosted Net Worth Cents"},"boosted_real_net_worth_cents":{"type":"integer","title":"Boosted Real Net Worth Cents"},"cumulative_contributions_cents":{"type":"integer","title":"Cumulative Contributions Cents"},"projected_investment_growth_cents":{"type":"integer","title":"Projected Investment Growth Cents"}},"type":"object","required":["year","year_offset","baseline_net_worth_cents","boosted_net_worth_cents","boosted_real_net_worth_cents","cumulative_contributions_cents","projected_investment_growth_cents"],"title":"WealthForecastYearPoint","description":"One projected year on the baseline vs. boosted net worth curve."},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}