{"openapi":"3.1.0","info":{"title":"POST /api/v1/ledgers/suggest-cash-flow","version":"1.0.0","description":"Suggest cash flow classifications"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/ledgers/suggest-cash-flow":{"post":{"tags":["ledgers"],"summary":"Suggest cash flow classifications","description":"Get deterministic suggestions for cash flow statement classifications based on ledger types and sub-types.","operationId":"suggest_cash_flow_api_v1_ledgers_suggest_cash_flow_post","parameters":[{"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":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestCashFlowResponse"}}}},"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"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CashFlowClassEnum":{"type":"string","enum":["cash","ar","inventory","prepaid","other_current_asset","ppe","intangible","other_lt_asset","intercompany_asset","internal_transfer","ap","cc_payable","accrued","other_current_liability","lt_debt","intercompany_liability","equity_contribution","equity_distribution","retained_earnings","revenue","cogs","opex","non_cash_expense","interest_expense","tax_expense"],"title":"CashFlowClassEnum","description":"Indirect-method cash flow classification for ledgers.\n\nEach chart-of-account row carries one of these in addition to its\nbroader ``type``. The indirect cash flow statement is built by\ngrouping period-over-period balance deltas by this column.\nMirrors ``app.models.ledgers.CashFlowClassEnum`` for API surface."},"CashFlowSectionEnum":{"type":"string","enum":["operating","investing","financing","excluded"],"title":"CashFlowSectionEnum","description":"Cash flow statement section classification for ledgers."},"CashFlowSuggestionItem":{"properties":{"ledger_id":{"type":"string","title":"Ledger Id"},"name":{"type":"string","title":"Name"},"suggested_cfs_class":{"$ref":"#/components/schemas/CashFlowClassEnum"},"suggested_cash_flow_section":{"$ref":"#/components/schemas/CashFlowSectionEnum"},"current_cfs_class":{"anyOf":[{"$ref":"#/components/schemas/CashFlowClassEnum"},{"type":"null"}]},"current_cash_flow_section":{"anyOf":[{"$ref":"#/components/schemas/CashFlowSectionEnum"},{"type":"null"}]}},"type":"object","required":["ledger_id","name","suggested_cfs_class","suggested_cash_flow_section"],"title":"CashFlowSuggestionItem","description":"A single cash flow classification suggestion."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuggestCashFlowResponse":{"properties":{"suggestions":{"items":{"$ref":"#/components/schemas/CashFlowSuggestionItem"},"type":"array","title":"Suggestions"}},"type":"object","title":"SuggestCashFlowResponse"},"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":[]}]}