{"openapi":"3.1.0","info":{"title":"GET /api/v1/businesses/{business_id}/cfo-portal/cash-forecast","version":"1.0.0","description":"Get CFO 13-week cash forecast"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/businesses/{business_id}/cfo-portal/cash-forecast":{"get":{"tags":["cfo-portal"],"summary":"Get CFO 13-week cash forecast","description":"Get the cash forecast section with optional budget selection.","operationId":"cfo_portal_get_cash_forecast_api_v1_businesses__business_id__cfo_portal_cash_forecast_get","parameters":[{"name":"business_id","in":"path","required":true,"schema":{"type":"string","title":"Business Id"}},{"name":"budget_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Budget Id"}},{"name":"apply_overrides","in":"query","required":false,"schema":{"type":"boolean","description":"When true, the working override scope is folded into the computed cell values. Used by the Demand Planner tab. The live Cash Flow Forecast tab leaves this off so unsaved what-if values don't bleed across views.","default":false,"title":"Apply Overrides"},"description":"When true, the working override scope is folded into the computed cell values. Used by the Demand Planner tab. The live Cash Flow Forecast tab leaves this off so unsaved what-if values don't bleed across views."},{"name":"include_projected_replenishment","in":"query","required":false,"schema":{"type":"boolean","description":"When true, projected (not-yet-placed) replenishment POs from the SKU demand-forecast engine are added to a separate Projected Inventory row so operators see the cash impact of reorders they'll need to make. Off by default to keep the live Forecast tab byte-identical.","default":false,"title":"Include Projected Replenishment"},"description":"When true, projected (not-yet-placed) replenishment POs from the SKU demand-forecast engine are added to a separate Projected Inventory row so operators see the cash impact of reorders they'll need to make. Off by default to keep the live Forecast tab byte-identical."},{"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_CfoPortalSectionResponse_"}}}},"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":{"CfoPortalSectionResponse":{"properties":{"business_id":{"type":"string","title":"Business Id"},"section":{"type":"string","title":"Section"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"sources":{"items":{"$ref":"#/components/schemas/CfoPortalSource"},"type":"array","title":"Sources"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["business_id","section","generated_at"],"title":"CfoPortalSectionResponse","description":"Typed envelope for a CFO portal section payload."},"CfoPortalSource":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"status":{"type":"string","title":"Status","description":"available, empty, partial, or unavailable","default":"available"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["key","label"],"title":"CfoPortalSource","description":"Metadata for a CFO portal section's backing source."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_CfoPortalSectionResponse_":{"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/CfoPortalSectionResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[CfoPortalSectionResponse]"},"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":[]}]}