{"openapi":"3.1.0","info":{"title":"GET /api/v1/businesses/{business_id}/cfo-portal/cash-forecast/versions/{version_id}","version":"1.0.0","description":"Get a saved cash forecast version"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/businesses/{business_id}/cfo-portal/cash-forecast/versions/{version_id}":{"get":{"tags":["cfo-portal"],"summary":"Get a saved cash forecast version","description":"Get full detail for a saved version, including config + snapshot.","operationId":"cfo_portal_get_version_api_v1_businesses__business_id__cfo_portal_cash_forecast_versions__version_id__get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","title":"Business Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version 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/CashForecastVersionDetail"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CashForecastOneTimeItemBase":{"properties":{"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"amount_cents":{"type":"integer","title":"Amount Cents","description":"Positive = cash in, negative = cash out. Integer cents."},"applies_on":{"type":"string","format":"date","title":"Applies On","description":"Date the cash event lands. The week index is derived from this date relative to the forecast's first Sunday."},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["label","amount_cents","applies_on"],"title":"CashForecastOneTimeItemBase","description":"Shared fields for one-time payment items."},"CashForecastVersionConfig":{"properties":{"budget_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Budget Id"},"excluded_budget_ledger_ids":{"items":{"type":"string"},"type":"array","title":"Excluded Budget Ledger Ids"},"weeks":{"type":"integer","title":"Weeks","default":13},"one_time_items_snapshot":{"items":{"$ref":"#/components/schemas/CashForecastOneTimeItemBase"},"type":"array","title":"One Time Items Snapshot","description":"Snapshot of the one-time items as they existed when the version was saved. Replays against live data don't re-load from the live ``cash_forecast_one_time_items`` table."}},"type":"object","title":"CashForecastVersionConfig","description":"Captured configuration when a version is saved.\n\nThe runtime can replay these inputs against live data to recompute\nthe forecast, or use the embedded ``snapshot_output`` for a stable\nhistorical view if requested."},"CashForecastVersionDetail":{"properties":{"id":{"type":"string","title":"Id"},"business_id":{"type":"string","title":"Business Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id"},"snapshot_as_of":{"type":"string","format":"date-time","title":"Snapshot As Of"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"config":{"$ref":"#/components/schemas/CashForecastVersionConfig"},"snapshot_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Snapshot Output","description":"Full ``CashForecast`` JSON captured at save time. Provides a stable historical view that doesn't shift as live data changes."}},"type":"object","required":["id","business_id","name","snapshot_as_of","created_at","updated_at"],"title":"CashForecastVersionDetail","description":"Full detail for a saved forecast version, including snapshot."},"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":[]}]}