{"openapi":"3.1.0","info":{"title":"Porter API","description":"AI-native accounting workflow platform","version":"0.1.0"},"paths":{"/api/auth/email-route":{"post":{"tags":["auth"],"summary":"Get Email Auth Route","description":"Choose the hosted Kinde route for an email-first auth submit.","operationId":"get_email_auth_route_api_auth_email_route_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRouteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRouteResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/auth/user":{"get":{"tags":["auth"],"summary":"Get User","description":"Get or create Porter user from Kinde identity.\n\nPOR-1100 follow-up: when an internal staff member sends\n`X-Impersonate-User-Id`, return the impersonated user's projection. Without\nthis, the frontend's useAuth() keeps showing staff identity after the\nimpersonation banner appears, and every consumer (sidebar gating,\nTransactions/Schedules tab gating, Settings tab visibility, etc.) stays\non staff-view until the user manually reloads.\n\nValidation mirrors verify_company_access._verify_impersonation:\n  - Header is honored only for internal Porter staff callers.\n  - Self-impersonation is rejected.\n  - Internal-to-internal impersonation is rejected.\n  - Target must exist as a Porter user row.\n\nThe TTL cache is bypassed on the impersonation branch so the response\nnever bleeds across identities.","operationId":"get_user_api_auth_user_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1100 follow-up: internal staff only — return the impersonated user's identity so the frontend's useAuth() reflects the customer's view (isInternal/email).","title":"X-Impersonate-User-Id"},"description":"POR-1100 follow-up: internal staff only — return the impersonated user's identity so the frontend's useAuth() reflects the customer's view (isInternal/email)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/auth/profile":{"patch":{"tags":["auth"],"summary":"Update Profile","description":"Update the authenticated user's Porter profile.","operationId":"update_profile_api_auth_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/redeem-code":{"post":{"tags":["auth"],"summary":"Redeem Code","description":"Redeem an access code for the authenticated user.\n\nReason: POR-1590 — a `pending` user is authenticated but not yet approved,\nso this gate is reachable by anyone signed in (no company access / approval\nrequirement). Redeeming flips them to `approved` and reserves the code.","operationId":"redeem_code_api_auth_redeem_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/redemption-codes":{"post":{"tags":["auth"],"summary":"Mint Redemption Code","description":"Mint a redemption code (Porter staff only).\n\nReason: POR-1590 — staff hand out access/pricing codes. Guard on internal\nstaff email; non-staff get a 403. Returns the row including the `code`\nstring so staff can copy and share it.","operationId":"mint_redemption_code_api_auth_redemption_codes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintRedemptionCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mint Redemption Code Api Auth Redemption Codes Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/preferences":{"get":{"tags":["auth"],"summary":"Get Preferences","description":"Get user preferences.","operationId":"get_preferences_api_auth_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["auth"],"summary":"Update Preferences","description":"Update user preferences.","operationId":"update_preferences_api_auth_preferences_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/start":{"post":{"tags":["auth-bff"],"summary":"Auth Start","description":"Begin a server-orchestrated OAuth flow.\n\nTwo branches share this endpoint:\n\n- **BFF login** (no `mcpState`): the backend mints fresh state + PKCE,\n  stores them in `oauth_store`, and returns a Kinde URL that will\n  redirect back to `/api/auth/callback` for session-cookie setup.\n- **MCP DCR launch** (`mcpState` present): `/mcp/authorize` already\n  seeded a pending_auth row with PKCE + `/mcp/callback` as\n  redirect_uri. We reuse it as-is and just build the Kinde URL with\n  the values stored there — the same MCP state survives the round\n  trip so `/mcp/callback` can complete Claude's OAuth flow.\n\nWithout this unification, MCP launches and frontend logins ran on\nseparate endpoints (`/api/auth/mcp-oauth/start`) with their own\nPydantic schema and validation. Single endpoint → single contract.\n\n**Silent-SSO across tabs (intentional Kinde behavior):** Kinde\nmaintains its own session cookie (`enduser_session_id`) on\n`auth.buildwithporter.com` — independent of Porter's\n`porter_session` cookie on the backend. When the user starts a\nfresh login flow on Porter (any tab, any browser window) and that\nKinde cookie is still valid, Kinde's authorize endpoint sees the\nactive session and silent-SSO's the user straight to\n`/api/auth/callback` WITHOUT showing any auth UI. This applies to\nBOTH the email-passwordless connection (no OTP page) and Google/\nMicrosoft SSO (no consent prompt). So typing `someone@example.com`\nor clicking Continue with Google in tab B while tab A is already\nlogged in produces what feels like an instant login.\n\nThe only way to force re-auth is through Porter's logout flow,\nwhich calls Kinde's `/logout?redirect=...` to clear the Kinde\nsession cookie at the same time it clears the Porter session\ncookie. Closing the tab alone does NOT clear the Kinde cookie.\n\nThis is Kinde's default tenant behavior — not implemented by\nPorter. Disabling it would require changes in the Kinde dashboard\n(Settings > Sessions). We keep it on because the same-browser\nrepeat-login UX is the whole point of SSO.","operationId":"auth_start_api_auth_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthStartResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/auth/callback":{"get":{"tags":["auth-bff"],"summary":"Auth Callback","description":"Handle Kinde's redirect: exchange the code, create a session, set cookies.\n\nReturns a redirect to the frontend rather than JSON because the\nbrowser arrives here via a top-level navigation from Kinde.","operationId":"auth_callback_api_auth_callback_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/auth/me":{"get":{"tags":["auth-bff"],"summary":"Auth Me","description":"Return the active user. The session cookie is the only auth input.","operationId":"auth_me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth-bff"],"summary":"Auth Logout","description":"Revoke the session and clear cookies. Returns the Kinde logout URL.","operationId":"auth_logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLogoutResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/activity/{company_id}":{"get":{"tags":["activity"],"summary":"List Activity","description":"List company activity commands newest first.","operationId":"list_activity_api_activity__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"action_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Source"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"include_total","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Total"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityFeedResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/activity/{company_id}/ai":{"get":{"tags":["activity"],"summary":"List Ai Activity","description":"List company-wide AI conversation sessions newest first.","operationId":"list_ai_activity_api_activity__company_id__ai_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiActivityFeedResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/activity/{company_id}/{command_id}":{"get":{"tags":["activity"],"summary":"Get Activity","description":"Get one activity command with child effects and field changes.","operationId":"get_activity_api_activity__company_id___command_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"command_id","in":"path","required":true,"schema":{"type":"string","title":"Command Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityEvent"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-health-audits/{audit_id}":{"get":{"tags":["financial-health-audits"],"summary":"Get Claimed Financial Audit","description":"Return one claimed artifact only to the identity that claimed it.","operationId":"get_claimed_financial_audit_api_financial_health_audits__audit_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimedFinancialAuditReport"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/companies/{company_id}/brief":{"get":{"tags":["admin","admin"],"summary":"Preview the generated company brief (Porter-internal only)","description":"Return the freshly generated markdown brief for the given company.\n\nReason: Pure pass-through to the brief service. Always regenerates\n(no cache layer yet — see `app/services/company_brief.py` for the\nrationale). Markdown is returned as `text/plain` (PlainTextResponse)\nrather than JSON so it's directly inspectable via curl, browser, or\npasting into a markdown viewer.","operationId":"get_company_brief_preview_api_admin_companies__company_id__brief_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/ai-usage/spend":{"get":{"tags":["admin","admin"],"summary":"Summarize OpenAI spend captured in ai_usage","description":"Return a DB-backed OpenAI spend report for internal operators.","operationId":"get_ai_usage_spend_api_admin_ai_usage_spend_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiUsageSpendSummary"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/ai/prompts":{"get":{"tags":["admin","admin"],"summary":"List internal AI prompt inventory","description":"Return the checked-in prompt catalog for internal operators.","operationId":"get_admin_ai_prompt_inventory_api_admin_ai_prompts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPromptInventoryResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/ai/prompts/{prompt_id}/manifest":{"get":{"tags":["admin","admin"],"summary":"Get an editable internal prompt manifest","description":"Return one editable prompt as component rows for staff.","operationId":"get_admin_ai_prompt_manifest_api_admin_ai_prompts__prompt_id__manifest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptManifest"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/ai/prompts/{prompt_id}/components/{component_key}":{"put":{"tags":["admin","admin"],"summary":"Update an editable internal prompt component","description":"Create one prompt component version from the admin console.","operationId":"update_admin_ai_prompt_component_api_admin_ai_prompts__prompt_id__components__component_key__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"component_key","in":"path","required":true,"schema":{"type":"string","title":"Component Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptOverrideUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptManifest"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/ai/feedback":{"get":{"tags":["admin","admin"],"summary":"List internal AI feedback inventory","description":"Return AI/MCP feedback rows across companies for staff triage.","operationId":"get_admin_ai_feedback_inventory_api_admin_ai_feedback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFeedbackInventoryResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/ai/skills":{"get":{"tags":["admin","admin"],"summary":"List internal skill inventory","description":"Return one skill inventory for staff.","operationId":"get_admin_ai_skill_inventory_api_admin_ai_skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSkillInventoryResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/ai/skills/{skill_id}":{"patch":{"tags":["admin","admin"],"summary":"Update an internal skill prompt","description":"Update one text-backed skill from the internal admin console.","operationId":"update_admin_ai_skill_inventory_item_api_admin_ai_skills__skill_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSkillUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSkill"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/outreach/threads":{"get":{"tags":["admin","admin"],"summary":"List outreach threads across companies","description":"Return operator outreach conversations and failed unlinked freeform emails.","operationId":"get_admin_outreach_threads_api_admin_outreach_threads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOutreachThreadListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/outreach/threads/{thread_id}":{"get":{"tags":["admin","admin"],"summary":"Get one outreach thread with its message chain","description":"Return one outreach chain in chronological order.","operationId":"get_admin_outreach_thread_detail_api_admin_outreach_threads__thread_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOutreachThreadDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/accounts/blocked":{"get":{"tags":["admin","admin"],"summary":"List accounts blocked by unfinished setup across companies","description":"Return every staffed account the setup gate currently locks out.","operationId":"get_admin_blocked_accounts_api_admin_accounts_blocked_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlockedAccountListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/usage/summary":{"get":{"tags":["admin","admin"],"summary":"Active users and companies per Porter surface across all companies","description":"Return surface usage for the trailing `days` UTC days.","operationId":"get_admin_usage_summary_api_admin_usage_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"includeInternal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeinternal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUsageSummary"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/marketing/qualified-lead":{"post":{"tags":["admin","admin"],"summary":"Mark Qualified Lead","description":"Queue the Meta CAPI QualifiedLead event for an audit a staff member qualified.","operationId":"mark_qualified_lead_api_admin_marketing_qualified_lead_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkLeadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkLeadResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/audit-funnel":{"get":{"tags":["admin","admin"],"summary":"Public financial health audit funnel and its leads","description":"Return funnel counts, the complete lead list and PostHog pre-email counts.","operationId":"get_admin_audit_funnel_api_admin_audit_funnel_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"includeInternal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeinternal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditFunnelResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/admin/permission-roles":{"get":{"tags":["admin","admin"],"summary":"List global permission roles and grant catalog","description":"Return the internal global permission-role grid data.","operationId":"get_admin_permission_roles_api_admin_permission_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPermissionRolesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin","admin"],"summary":"Create a global permission role","description":"Create one globally available non-system role.","operationId":"create_admin_permission_role_api_admin_permission_roles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPermissionRoleCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPermissionRole"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/permission-roles/{role_id}":{"patch":{"tags":["admin","admin"],"summary":"Update a global permission role","description":"Update one globally available non-system role.","operationId":"update_admin_permission_role_api_admin_permission_roles__role_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPermissionRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPermissionRole"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies":{"get":{"tags":["companies"],"summary":"List Companies","description":"List all companies the user has access to.","operationId":"list_companies_api_companies_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["companies"],"summary":"Create Company","description":"Create a new company and associate it with the current user.","operationId":"create_company_api_companies_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/search":{"get":{"tags":["companies"],"summary":"Search Companies","description":"Global-company-operator-only company search by name.\n\nReason: Global company discovery is now limited to the named operators.\nOther internal users must have explicit user_companies membership and use\nthe default company list.","operationId":"search_companies_api_companies_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100,"default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/by-ids":{"get":{"tags":["companies"],"summary":"Get Companies By Ids","description":"Global-company-operator-only batch lookup of companies by id.\n\nReason: Recent-company hydration can reveal non-membership companies, so it\nmust use the same narrow global-company gate as search.","operationId":"get_companies_by_ids_api_companies_by_ids_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated company UUIDs","default":"","title":"Ids"},"description":"Comma-separated company UUIDs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}":{"get":{"tags":["companies"],"summary":"Get Company","description":"Get a specific company by ID.","operationId":"get_company_api_companies__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/sync":{"post":{"tags":["companies"],"summary":"Sync Company Once","description":"Queue one manual full-company sync pass.","operationId":"sync_company_once_api_companies__company_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncJobStartResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/scheduled-jobs":{"patch":{"tags":["companies"],"summary":"Update Company Scheduled Jobs","description":"Update the recurring scheduled-job gate for one company.","operationId":"update_company_scheduled_jobs_api_companies__company_id__scheduled_jobs_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyScheduledJobsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyScheduledJobsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/group/members":{"get":{"tags":["companies"],"summary":"List Group Members","description":"List member companies of this group with live connection/book state.","operationId":"list_group_members_api_companies__company_id__group_members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMembersResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["companies"],"summary":"Add Group Members","description":"Add member companies to this group (POR-1595).","operationId":"add_group_members_api_companies__company_id__group_members_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMembersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMembersAddResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["companies"],"summary":"Remove Group Members","description":"Remove member companies from this group (POR-1595).","operationId":"remove_group_members_api_companies__company_id__group_members_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMembersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMembersRemoveResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/profile":{"patch":{"tags":["companies"],"summary":"Update Company Profile","description":"Update company profile enrichment fields.\n\nReason: Separate endpoint for profile fields to keep concerns isolated from\ncore company CRUD and QBO connection management.","operationId":"update_company_profile_api_companies__company_id__profile_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/leave":{"post":{"tags":["companies"],"summary":"Leave Company","description":"Leave a company (remove yourself from the company).\n\nReason: Allow leaving even as the only owner. The company remains with its\nrealm_id intact, so if someone else connects to QBO with the same realm_id,\nthey can join and become the new owner automatically.","operationId":"leave_company_api_companies__company_id__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__companies__SuccessMessageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/reset-qbo":{"delete":{"tags":["companies"],"summary":"Reset Qbo Sync Data","description":"Reset QBO-synced data so a full resync runs cleanly.\n\nReason: Defaults to transactions-only (safe). COA sync is idempotent\n(ON CONFLICT preserves Porter UUIDs), so it almost never needs resetting.\nPass include_coa=true only if accounts are genuinely corrupt — this will\nbreak FK references from non-QBO data on resync.","operationId":"reset_qbo_sync_data_api_companies__company_id__reset_qbo_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"include_coa","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Coa"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetCompanyResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/reset":{"delete":{"tags":["companies"],"summary":"Reset Company Data","description":"Reset all company data for a fresh start.\n\nReason: Allows users to delete all imported/synced data while keeping the company\nand integrations intact. Useful when starting over with a clean slate.\n\nDeletes: All transactional data (expenses, bank_transactions, subscriptions,\ninvoices, payments, bills, schedules, commissions, posting_batches, policy_flags,\ncost_pools, security_deposits, leases, dev_periods), supporting data (customers,\nvendors, payers, accounts, policies, rules, chat, reconciliations, sync_jobs).","operationId":"reset_company_data_api_companies__company_id__reset_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetCompanyResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/snapshots":{"post":{"tags":["companies"],"summary":"Create Snapshot","description":"Save a snapshot of all company data.\n\nReason: Captures the current state so it can be restored later (e.g., after a demo).","operationId":"create_snapshot_api_companies__company_id__snapshots_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SnapshotCreate"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"get":{"tags":["companies"],"summary":"List Snapshots","description":"List all snapshots for a company (metadata only).","operationId":"list_snapshots_api_companies__company_id__snapshots_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/snapshots/{snapshot_id}/restore":{"post":{"tags":["companies"],"summary":"Restore Snapshot","description":"Restore company data from a snapshot.\n\nReason: Wipes all current data and re-inserts from the snapshot.\nReuses the reset_in_progress guard to prevent sync conflicts.","operationId":"restore_snapshot_api_companies__company_id__snapshots__snapshot_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/snapshots/{snapshot_id}":{"delete":{"tags":["companies"],"summary":"Delete Snapshot","description":"Delete a snapshot.","operationId":"delete_snapshot_api_companies__company_id__snapshots__snapshot_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Snapshot Api Companies  Company Id  Snapshots  Snapshot Id  Delete"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/consolidations/{company_id}/readiness":{"get":{"tags":["consolidations"],"summary":"Consolidation Readiness","description":"Return blockers before compiling a consolidated report.","operationId":"consolidation_readiness_api_consolidations__company_id__readiness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidationReadiness"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/consolidations/{company_id}/elimination-candidates":{"get":{"tags":["consolidations"],"summary":"Consolidation Elimination Candidates","description":"Return likely elimination candidates without creating adjustments.","operationId":"consolidation_elimination_candidates_api_consolidations__company_id__elimination_candidates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum exact P&L pair candidates to return.","default":250,"title":"Limit"},"description":"Maximum exact P&L pair candidates to return."},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidationEliminationCandidateReport"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/consolidations/{company_id}/profit-and-loss":{"get":{"tags":["consolidations"],"summary":"Consolidated Profit And Loss","description":"Return a consolidated P&L only when readiness gates are green.","operationId":"consolidated_profit_and_loss_api_consolidations__company_id__profit_and_loss_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidationPnlReport"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/consolidations/{company_id}/profit-and-loss/breakdown":{"get":{"tags":["consolidations"],"summary":"Consolidated Profit And Loss Breakdown","description":"Return consolidated P&L rows split by direct child company.","operationId":"consolidated_profit_and_loss_breakdown_api_consolidations__company_id__profit_and_loss_breakdown_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidationPnlBreakdownReport"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/consolidations/{company_id}/balance-sheet":{"get":{"tags":["consolidations"],"summary":"Consolidated Balance Sheet","description":"Return a consolidated Balance Sheet only when readiness gates are green.","operationId":"consolidated_balance_sheet_api_consolidations__company_id__balance_sheet_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"as_of_date","in":"query","required":true,"schema":{"type":"string","description":"As-of date YYYY-MM-DD","title":"As Of Date"},"description":"As-of date YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidationBalanceSheetReport"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/consolidations/{company_id}/balance-sheet/breakdown":{"get":{"tags":["consolidations"],"summary":"Consolidated Balance Sheet Breakdown","description":"Return consolidated Balance Sheet rows split by direct child company.","operationId":"consolidated_balance_sheet_breakdown_api_consolidations__company_id__balance_sheet_breakdown_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"as_of_date","in":"query","required":true,"schema":{"type":"string","description":"As-of date YYYY-MM-DD","title":"As Of Date"},"description":"As-of date YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidationBalanceSheetBreakdownReport"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/branding":{"get":{"tags":["invoice-settings"],"summary":"Get Company Invoice Branding","description":"Return frontend-compatible invoice branding settings.","operationId":"get_company_invoice_branding_api_companies__company_id__branding_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBrandingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["invoice-settings"],"summary":"Update Company Invoice Branding","description":"Patch frontend-compatible invoice branding settings.","operationId":"update_company_invoice_branding_api_companies__company_id__branding_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBrandingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBrandingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/branding/logo":{"post":{"tags":["invoice-settings"],"summary":"Upload Company Invoice Logo","description":"Upload or replace the company invoice logo.","operationId":"upload_company_invoice_logo_api_companies__company_id__branding_logo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_company_invoice_logo_api_companies__company_id__branding_logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBrandingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/invoice-numbering":{"get":{"tags":["invoice-settings"],"summary":"Get Invoice Numbering","description":"Return company invoice numbering settings.","operationId":"get_invoice_numbering_api_companies__company_id__invoice_numbering_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceNumberingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["invoice-settings"],"summary":"Update Invoice Numbering","description":"Patch company invoice numbering settings.","operationId":"update_invoice_numbering_api_companies__company_id__invoice_numbering_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceNumberingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceNumberingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/invoice_numbering":{"get":{"tags":["invoice-settings"],"summary":"Get Invoice Numbering","description":"Return company invoice numbering settings.","operationId":"get_invoice_numbering_api_companies__company_id__invoice_numbering_get_b160e2f2","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceNumberingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["invoice-settings"],"summary":"Update Invoice Numbering","description":"Patch company invoice numbering settings.","operationId":"update_invoice_numbering_api_companies__company_id__invoice_numbering_patch_38b2fba7","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceNumberingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceNumberingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/items":{"get":{"tags":["invoice-settings"],"summary":"List Invoice Items","description":"List reusable invoice items for the company.","operationId":"list_invoice_items_api_companies__company_id__items_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLibraryItemResponse"},"title":"Response List Invoice Items Api Companies  Company Id  Items Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["invoice-settings"],"summary":"Create Invoice Item","description":"Create a reusable invoice item.","operationId":"create_invoice_item_api_companies__company_id__items_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLibraryItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLibraryItemResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/items/{item_id}":{"patch":{"tags":["invoice-settings"],"summary":"Update Invoice Item","description":"Patch a reusable invoice item.","operationId":"update_invoice_item_api_companies__company_id__items__item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLibraryItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLibraryItemResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/items/{item_id}/archive":{"post":{"tags":["invoice-settings"],"summary":"Archive Invoice Item","description":"Archive a reusable invoice item.","operationId":"archive_invoice_item_api_companies__company_id__items__item_id__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLibraryItemResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/items/{item_id}/unarchive":{"post":{"tags":["invoice-settings"],"summary":"Unarchive Invoice Item","description":"Unarchive a reusable invoice item.","operationId":"unarchive_invoice_item_api_companies__company_id__items__item_id__unarchive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLibraryItemResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/customers":{"get":{"tags":["invoice-settings"],"summary":"List Invoice Customers","description":"List customers in the invoice picker shape.","operationId":"list_invoice_customers_api_companies__company_id__customers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCustomerResponse"},"title":"Response List Invoice Customers Api Companies  Company Id  Customers Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["invoice-settings"],"summary":"Create Invoice Customer","description":"Create a customer and first billing contact for invoice creation.","operationId":"create_invoice_customer_api_companies__company_id__customers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCustomerCreateResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/customers/{customer_id}/billing-contacts":{"get":{"tags":["invoice-settings"],"summary":"List Billing Contacts","description":"List billing contacts for a customer.","operationId":"list_billing_contacts_api_companies__company_id__customers__customer_id__billing_contacts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingContactResponse"},"title":"Response List Billing Contacts Api Companies  Company Id  Customers  Customer Id  Billing Contacts Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["invoice-settings"],"summary":"Create Billing Contact","description":"Create a billing contact for a customer.","operationId":"create_billing_contact_api_companies__company_id__customers__customer_id__billing_contacts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContactCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContactResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/billing-contacts/{contact_id}":{"patch":{"tags":["invoice-settings"],"summary":"Update Billing Contact","description":"Patch a billing contact.","operationId":"update_billing_contact_api_companies__company_id__billing_contacts__contact_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContactUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingContactResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["invoice-settings"],"summary":"Delete Billing Contact","description":"Delete a billing contact.","operationId":"delete_billing_contact_api_companies__company_id__billing_contacts__contact_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/payment_processor_connections":{"get":{"tags":["payment-processor-connections"],"summary":"List Payment Processor Connections","description":"List active processor connections.","operationId":"list_payment_processor_connections_api_companies__company_id__payment_processor_connections_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentProcessorConnectionResponse"},"title":"Response List Payment Processor Connections Api Companies  Company Id  Payment Processor Connections Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/payment_processor_connections/manual":{"post":{"tags":["payment-processor-connections"],"summary":"Upsert Manual Payment Processor","description":"Create or update direct-payment instructions.","operationId":"upsert_manual_payment_processor_api_companies__company_id__payment_processor_connections_manual_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPaymentProcessorCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessorConnectionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/payment_processor_connections/helcim/link":{"post":{"tags":["payment-processor-connections"],"summary":"Link Helcim Payment Processor","description":"Expose an existing Helcim sync connection as an invoice processor option.","operationId":"link_helcim_payment_processor_api_companies__company_id__payment_processor_connections_helcim_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimProcessorLink"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessorConnectionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/payment_processor_connections/helcim/connect":{"post":{"tags":["payment-processor-connections"],"summary":"Connect Helcim Partner Account","description":"Start the partner-managed Helcim Connected Account Registration flow.\n\nReason: POR-1308 — Porter calls Helcim's `/v2/applications/prefill` with the\npartner token, generates a Porter-scoped `connectedAccountId` so the\ninbound approval webhook can resolve the company without a lookup table,\ninserts a `pending` `payment_processor_connections.kind='helcim'` row, and\nreturns the merchant signup URL. The frontend redirects the merchant to\nthat URL to finish signup at Helcim.","operationId":"connect_helcim_partner_account_api_companies__company_id__payment_processor_connections_helcim_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimPartnerConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimPartnerConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/payment_processor_connections/hubspot/clearing_account":{"post":{"tags":["payment-processor-connections"],"summary":"Set Hubspot Clearing Account","description":"Set the COA holding account HubSpot payment receipts clear into.\n\nReason: POR-1362 — HubSpot connects via OAuth, so (unlike Helcim) there is no\nprocessor connect flow that creates the payment_processor_connections row.\nLazily upsert the kind='hubspot' connection and point its clearing account at\nthe chosen COA holding account, which the HubSpot payment ingest reads to\nclear receipts. The account must carry a COA holding/merchant-receivable\nshape (not a plain bank account) — same validation as the Helcim form.","operationId":"set_hubspot_clearing_account_api_companies__company_id__payment_processor_connections_hubspot_clearing_account_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClearingAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessorConnectionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/users":{"get":{"tags":["company-users"],"summary":"List Company Users","description":"List all users in a company with their roles.\n\nReason: Any company member can view the team list. Role-based actions\n(edit/remove) are gated on the frontend by the current user's role,\nand enforced on the backend by the mutation endpoints.","operationId":"list_company_users_api_companies__company_id__users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyMemberResponse"},"title":"Response List Company Users Api Companies  Company Id  Users Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/roles":{"get":{"tags":["company-users"],"summary":"List Company Permission Roles","description":"List built-in and company-specific roles available to the team UI.","operationId":"list_company_permission_roles_api_companies__company_id__roles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRoleResponse"},"title":"Response List Company Permission Roles Api Companies  Company Id  Roles Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/invites":{"get":{"tags":["company-users"],"summary":"List Company Invites","description":"List pending company invites for anyone who can view the Team page.","operationId":"list_company_invites_api_companies__company_id__invites_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyInviteResponse"},"title":"Response List Company Invites Api Companies  Company Id  Invites Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["company-users"],"summary":"Create Company Invite","description":"Create a new email-based invite for a company.\n\nReason: Owners/admins need a lightweight way to grant a specific email\naccess to the company; existing Porter users are accepted immediately.","operationId":"create_company_invite_api_companies__company_id__invites_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyInviteResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/users/{user_id}/role":{"patch":{"tags":["company-users"],"summary":"Assign User Permission Role","description":"Change a user's role in the company.\n\nReason: Owners and admins can change roles (POR-849). Admins cannot grant\nor modify the owner role — only owners can touch owners. Last-owner\ndemotion is still blocked so the company can't be orphaned.","operationId":"assign_user_permission_role_api_companies__company_id__users__user_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","description":"Target user ID","title":"User Id"},"description":"Target user ID"},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__company_users__SuccessMessageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/users/{user_id}":{"delete":{"tags":["company-users"],"summary":"Remove Company User","description":"Remove a user from the company.\n\nReason: Full-access roles can remove team members. Non-owner full-access\nroles cannot remove owners; ownership stays owner-only. Cannot remove\nyourself (use /leave) and cannot remove the last owner.","operationId":"remove_company_user_api_companies__company_id__users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","description":"Target user ID","title":"User Id"},"description":"Target user ID"},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__company_users__SuccessMessageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/companies/{company_id}/invites/{invite_id}":{"delete":{"tags":["company-users"],"summary":"Revoke Company Invite","description":"Revoke a pending company invite.","operationId":"revoke_company_invite_api_companies__company_id__invites__invite_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","description":"Invite UUID","title":"Invite Id"},"description":"Invite UUID"},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__company_users__SuccessMessageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/connection-status/{company_id}":{"get":{"tags":["quickbooks"],"summary":"Get Quickbooks Connection Status","description":"Check if a company is connected to QuickBooks.","operationId":"get_quickbooks_connection_status_api_qbo_connection_status__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickBooksConnectionStatusResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/connect":{"get":{"tags":["quickbooks"],"summary":"Initiate Qbo Connection","description":"Get the OAuth authorization URL to connect QuickBooks.\nThis will create a new company from the connected QBO account.\nPass ?environment=sandbox to connect a sandbox company.","operationId":"initiate_qbo_connection_api_qbo_connect_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QBOConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/connect/{company_id}":{"get":{"tags":["quickbooks"],"summary":"Reconnect Qbo To Company","description":"Get the OAuth authorization URL to reconnect an existing company to QuickBooks.\nUsed when refreshing connection or re-authorizing.\nPass ?environment=sandbox to connect a sandbox company.","operationId":"reconnect_qbo_to_company_api_qbo_connect__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QBOConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/callback":{"get":{"tags":["quickbooks"],"summary":"Qbo Oauth Callback","description":"OAuth callback from QuickBooks.\nExchanges code for tokens and creates/links company.\nThe signed state carries the server-owned environment through validation.\nTransaction sync runs in background after redirect.\n\nState format (environment auto-detected):\n- New company: user_id:random_token (2 parts)\n- Existing company: user_id:company_id:random_token (3 parts)","operationId":"qbo_oauth_callback_api_qbo_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"realmId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Realmid"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/disconnect/{company_id}":{"post":{"tags":["quickbooks"],"summary":"Disconnect Qbo","description":"Disconnect QuickBooks from a company.\n\nReason: Default disconnect preserves qbo_realm_id to prevent accidental\nreconnection to the wrong QBO company. The release_realm flag is an\ninternal admin override gated by Porter staff email domain.","operationId":"disconnect_qbo_api_qbo_disconnect__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"release_realm","in":"query","required":false,"schema":{"type":"boolean","description":"Internal-only: when true, also NULL qbo_realm_id/qbo_environment/qbo_company_name so the Porter company can be rebound to a different QBO realm. Restricted to Porter staff (@buildwithporter.com).","default":false,"title":"Release Realm"},"description":"Internal-only: when true, also NULL qbo_realm_id/qbo_environment/qbo_company_name so the Porter company can be rebound to a different QBO realm. Restricted to Porter staff (@buildwithporter.com)."},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/accounts/{company_id}":{"get":{"tags":["quickbooks"],"summary":"Get Chart Of Accounts","description":"Get chart of accounts from QuickBooks.","operationId":"get_chart_of_accounts_api_qbo_accounts__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartOfAccountsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/accounts/{company_id}/sync":{"post":{"tags":["quickbooks"],"summary":"Sync Chart Of Accounts","description":"Sync chart of accounts from QuickBooks to local database.\nThis allows AI categorization to reference the company's actual COA.","operationId":"sync_chart_of_accounts_api_qbo_accounts__company_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__qbo__SyncResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/sync-accounts/{company_id}":{"post":{"tags":["quickbooks"],"summary":"Sync Chart Of Accounts Deprecated","description":"Deprecated: Use POST /accounts/{company_id}/sync instead.","operationId":"sync_chart_of_accounts_deprecated_api_qbo_sync_accounts__company_id__post","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__qbo__SyncResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/vendors/{company_id}":{"get":{"tags":["quickbooks"],"summary":"Get Vendors","description":"Get vendors from QuickBooks.","operationId":"get_vendors_api_qbo_vendors__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/purchases/{company_id}":{"get":{"tags":["quickbooks"],"summary":"Get Purchases","description":"Get purchases/expenses from QuickBooks.","operationId":"get_purchases_api_qbo_purchases__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/sync/{company_id}":{"post":{"tags":["quickbooks"],"summary":"Sync Transactions","description":"Sync transactions from QuickBooks to local database.\n\nArgs:\n    incremental: If True, only sync new/updated transactions since last sync.\n                Falls back to full sync if no previous sync exists.","operationId":"sync_transactions_api_qbo_sync__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"incremental","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Incremental"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__qbo__SyncResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/sync/{company_id}/status":{"get":{"tags":["quickbooks"],"summary":"Get Sync Status","description":"Get the latest sync status for a company.","operationId":"get_sync_status_api_qbo_sync__company_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SyncStatusResponse"},{"type":"null"}],"title":"Response Get Sync Status Api Qbo Sync  Company Id  Status Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/sync/{company_id}/all":{"post":{"tags":["quickbooks"],"summary":"Sync All","description":"Sync all QBO data (chart of accounts + transactions) to local database.\nUseful for initial setup or periodic full refresh.","operationId":"sync_all_api_qbo_sync__company_id__all_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"incremental","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Incremental"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SyncAllResponse"},{"$ref":"#/components/schemas/SyncJobStartResponse"}],"title":"Response Sync All Api Qbo Sync  Company Id  All Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/sync/{company_id}/resync-types":{"post":{"tags":["quickbooks"],"summary":"Resync Types","description":"Re-sync specific QBO transaction types that may have failed during initial sync.\n\nReason: POR-392 — Initial sync can silently fail for individual transaction types\n(e.g., CreditCardPayment, SalesReceipt). CDC incremental syncs only process changes,\nso missing types are never backfilled. This endpoint re-runs the initial fetch for\nthe specified types. Idempotent — safe to call multiple times.","operationId":"resync_types_api_qbo_sync__company_id__resync_types_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResyncTypesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResyncTypesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/qbo/reconcile/{company_id}":{"get":{"tags":["quickbooks"],"summary":"Reconcile With Qbo","description":"Reconcile Porter's posted records against QBO.\n\nReason: Verifies that everything Porter posted to QBO actually exists in QBO\nand amounts match. Detects missing entities and amount mismatches.","operationId":"reconcile_with_qbo_api_qbo_reconcile__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/hubspot/callback":{"get":{"tags":["hubspot"],"summary":"Hubspot Oauth Callback","operationId":"hubspot_oauth_callback_api_hubspot_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Hubspot Oauth Callback"}},"/api/hubspot/webhooks":{"post":{"tags":["hubspot"],"summary":"Hubspot Webhook","operationId":"hubspot_webhook_api_hubspot_webhooks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Hubspot Webhook"}},"/api/hubspot/webhook":{"post":{"tags":["hubspot"],"summary":"Hubspot Webhook","operationId":"hubspot_webhook_api_hubspot_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Hubspot Webhook"}},"/api/navigation/{company_id}/relevance":{"get":{"tags":["navigation"],"summary":"Get Navigation Relevance","description":"Return data-presence flags for sidebar pages and page tabs.","operationId":"get_navigation_relevance_api_navigation__company_id__relevance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavigationRelevanceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/navigation/{company_id}/visibility":{"get":{"tags":["navigation"],"summary":"Get Navigation Visibility","description":"Return admin-hidden page and tab ids.","operationId":"get_navigation_visibility_api_navigation__company_id__visibility_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyNavigationVisibilityResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["navigation"],"summary":"Update Navigation Visibility","description":"Replace admin-hidden page and tab ids.","operationId":"update_navigation_visibility_api_navigation__company_id__visibility_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyNavigationVisibilityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyNavigationVisibilityResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/models":{"get":{"tags":["planning"],"summary":"List Models","description":"Return bounded model/scenario shells from committed receipts only.","operationId":"list_models_api_planning__company_id__models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsShellResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/scenarios/{scenario_id}/forecasts/{forecast_key}":{"get":{"tags":["planning"],"summary":"Get Forecast","description":"Load one selected component without evaluating or persisting sources.","operationId":"get_forecast_api_planning__company_id__scenarios__scenario_id__forecasts__forecast_key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"forecast_key","in":"path","required":true,"schema":{"type":"string","title":"Forecast Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastViewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/scenarios/{scenario_id}/assumptions":{"get":{"tags":["planning"],"summary":"Get Assumptions","description":"Return assumptions once, grouped by their validated workspace home.","operationId":"get_assumptions_api_planning__company_id__scenarios__scenario_id__assumptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssumptionGroupsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["planning"],"summary":"Patch Assumption","description":"Edit one assumption through the canonical planning recompute command.","operationId":"patch_assumption_api_planning__company_id__scenarios__scenario_id__assumptions_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssumptionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioMutationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/scenarios/{scenario_id}/runs/{run_id}/cells/{line_key}/{period_index}":{"get":{"tags":["planning"],"summary":"Get Lineage","description":"Resolve provenance using the immutable run identity the user clicked.","operationId":"get_lineage_api_planning__company_id__scenarios__scenario_id__runs__run_id__cells__line_key___period_index__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"line_key","in":"path","required":true,"schema":{"type":"string","title":"Line Key"}},{"name":"period_index","in":"path","required":true,"schema":{"type":"integer","maximum":120,"minimum":1,"title":"Period Index"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellLineageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/scenarios/{scenario_id}/runs/{run_id}/cells/{line_key}/{period_index}/sources":{"get":{"tags":["planning"],"summary":"Get Lineage Sources","description":"Page the exact operational rows retained by one live forecast cell.","operationId":"get_lineage_sources_api_planning__company_id__scenarios__scenario_id__runs__run_id__cells__line_key___period_index__sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"line_key","in":"path","required":true,"schema":{"type":"string","title":"Line Key"}},{"name":"period_index","in":"path","required":true,"schema":{"type":"integer","maximum":120,"minimum":1,"title":"Period Index"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":1000000,"minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":25,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellLineageSourcePageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/models/{model_definition_id}/workspace":{"put":{"tags":["planning"],"summary":"Put Workspace","description":"Validate and compare-and-swap presentation metadata.","operationId":"put_workspace_api_planning__company_id__models__model_definition_id__workspace_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"model_definition_id","in":"path","required":true,"schema":{"type":"string","title":"Model Definition Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSaveResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/scenarios/{scenario_id}/refresh":{"post":{"tags":["planning"],"summary":"Refresh Scenario","description":"Explicitly refresh live sources through the canonical evaluator.","operationId":"refresh_scenario_api_planning__company_id__scenarios__scenario_id__refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshScenarioRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioMutationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/models/{model_definition_id}/scenarios":{"post":{"tags":["planning"],"summary":"Create Scenario","description":"Create or duplicate a scenario through the canonical planning command.","operationId":"create_scenario_api_planning__company_id__models__model_definition_id__scenarios_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"model_definition_id","in":"path","required":true,"schema":{"type":"string","title":"Model Definition Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioMutationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/planning/{company_id}/scenarios/{scenario_id}":{"patch":{"tags":["planning"],"summary":"Patch Scenario","description":"Rename, archive, or restore one scenario without recomputing it.","operationId":"patch_scenario_api_planning__company_id__scenarios__scenario_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenarioMutationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}":{"get":{"tags":["accounts"],"summary":"List Coa Accounts","description":"List chart-of-accounts GL accounts for a company.","operationId":"list_coa_accounts_api_accounts__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"account_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["accounts"],"summary":"Create Account","description":"Create a new account and push to QBO if connected.\n\nReason: Creates in Porter DB first, then attempts QBO push. If QBO fails,\nthe local account still exists but qbo_synced=false signals the gap.","operationId":"create_account_api_accounts__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountActionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/display-priorities/suggest":{"post":{"tags":["accounts"],"summary":"Suggest Account Display Priorities","description":"Return smart display-priority suggestions without writing them.\n\nReason: POR-1139 suggestions must be reviewable before Porter changes report\nordering metadata.","operationId":"suggest_account_display_priorities_api_accounts__company_id__display_priorities_suggest_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayPrioritySuggestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayPrioritySuggestResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/display-priorities/apply":{"post":{"tags":["accounts"],"summary":"Apply Account Display Priorities","description":"Apply reviewed display-priority assignments.\n\nReason: POR-1139 display priority is separate from account number metadata,\nso it gets its own explicit write path.","operationId":"apply_account_display_priorities_api_accounts__company_id__display_priorities_apply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayPriorityApplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayPriorityApplyResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/display-priorities/apply-suggestions":{"post":{"tags":["accounts"],"summary":"Apply Suggested Account Display Priorities","description":"Apply current smart display-priority suggestions.\n\nReason: The COA UI needs a one-click reviewed apply path for Porter's\nsuggested order without coupling it to account-number edits.","operationId":"apply_suggested_account_display_priorities_api_accounts__company_id__display_priorities_apply_suggestions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayPrioritySuggestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisplayPriorityApplyResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/{account_id}":{"get":{"tags":["accounts"],"summary":"Get Account","description":"Get a specific account.","operationId":"get_account_api_accounts__company_id___account_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["accounts"],"summary":"Update Account","description":"Update mutable account metadata and push label changes to QBO.","operationId":"update_account_api_accounts__company_id___account_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountActionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/{account_id}/sync-to-qbo":{"post":{"tags":["accounts"],"summary":"Sync Account To Qbo","description":"Push one Porter GL account to QuickBooks on explicit operator request.\n\nReason: POR-1927 — an account whose create-time push failed was previously\nunrecoverable: editing it did nothing, COA sync only pulls FROM QBO, and\nre-creating it was blocked as a duplicate. This is the deliberate retry.\n\nBen's call (2026-08-11): this stays an explicit per-account action rather\nthan an automatic flush on COA sync. Nothing reaches a customer's QuickBooks\nchart of accounts without a human asking for it, one account at a time.","operationId":"sync_account_to_qbo_api_accounts__company_id___account_id__sync_to_qbo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/semantic-roles/options":{"get":{"tags":["accounts"],"summary":"List Account Semantic Roles","description":"List the semantic roles Porter can attach to COA accounts.","operationId":"list_account_semantic_roles_api_accounts__company_id__semantic_roles_options_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSemanticRolesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/{account_id}/semantic-roles":{"patch":{"tags":["accounts"],"summary":"Update Account Semantic Roles","description":"Set workflow roles for one COA account.","operationId":"update_account_semantic_roles_api_accounts__company_id___account_id__semantic_roles_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSemanticRolesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountActionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/{account_id}/deactivate":{"patch":{"tags":["accounts"],"summary":"Deactivate Account","description":"Deactivate an account (soft delete) and push Active=false to QBO.","operationId":"deactivate_account_api_accounts__company_id___account_id__deactivate_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountActionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/{account_id}/reactivate":{"patch":{"tags":["accounts"],"summary":"Reactivate Account","description":"Reactivate a deactivated account and push Active=true to QBO.","operationId":"reactivate_account_api_accounts__company_id___account_id__reactivate_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountActionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/suggest-numbers":{"post":{"tags":["accounts"],"summary":"Suggest Numbers","description":"Generate suggested account numbers for the company's COA.\n\nReason: Uses the deterministic COA numbering engine with an AI fallback\nfor accounts that can't be classified by sub_type or name patterns.\nReturns suggestions (not mutations) — the frontend previews before applying.","operationId":"suggest_numbers_api_accounts__company_id__suggest_numbers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestNumbersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestNumbersResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/accounts/{company_id}/apply-numbers":{"post":{"tags":["accounts"],"summary":"Apply Numbers","description":"Apply account-number metadata edits through the shared service.\n\nReason: POR-1135/POR-1138 — manual drawer edits and bulk numbering apply\nuse the same validation, audit, and QBO-sync path.","operationId":"apply_numbers_api_accounts__company_id__apply_numbers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyNumbersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyNumbersResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/revenue-segments/{company_id}/account-mappings":{"get":{"tags":["revenue-segments"],"summary":"List Revenue Segment Account Mappings","description":"List all configured revenue segment to GL account mappings for a company.","operationId":"list_revenue_segment_account_mappings_api_revenue_segments__company_id__account_mappings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentMappingListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["revenue-segments"],"summary":"Create Revenue Segment Account Mapping","description":"Create a new revenue segment account mapping.","operationId":"create_revenue_segment_account_mapping_api_revenue_segments__company_id__account_mappings_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["revenue-segments"],"summary":"Upsert Revenue Segment Account Mapping","description":"Create or update a revenue segment account mapping.","operationId":"upsert_revenue_segment_account_mapping_api_revenue_segments__company_id__account_mappings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/revenue-segments/{company_id}/available":{"get":{"tags":["revenue-segments"],"summary":"List Unique Revenue Segments","description":"List revenue segment keys from subscriptions and configured segments.","operationId":"list_unique_revenue_segments_api_revenue_segments__company_id__available_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniqueRevenueSegmentsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/revenue-segments/{company_id}/account-mappings/{revenue_segment}":{"get":{"tags":["revenue-segments"],"summary":"Get Revenue Segment Account Mapping","description":"Get a specific revenue segment account mapping.","operationId":"get_revenue_segment_account_mapping_api_revenue_segments__company_id__account_mappings__revenue_segment__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"revenue_segment","in":"path","required":true,"schema":{"type":"string","title":"Revenue Segment"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["revenue-segments"],"summary":"Update Revenue Segment Account Mapping","description":"Update a revenue segment account mapping.","operationId":"update_revenue_segment_account_mapping_api_revenue_segments__company_id__account_mappings__revenue_segment__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"revenue_segment","in":"path","required":true,"schema":{"type":"string","title":"Revenue Segment"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["revenue-segments"],"summary":"Delete Revenue Segment Account Mapping","description":"Delete a revenue segment account mapping.","operationId":"delete_revenue_segment_account_mapping_api_revenue_segments__company_id__account_mappings__revenue_segment__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"revenue_segment","in":"path","required":true,"schema":{"type":"string","title":"Revenue Segment"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/revenue-segments/{company_id}/account-mappings/bulk":{"post":{"tags":["revenue-segments"],"summary":"Create Revenue Segment Account Mappings Bulk","description":"Create or update multiple revenue segment account mappings.","operationId":"create_revenue_segment_account_mappings_bulk_api_revenue_segments__company_id__account_mappings_bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentBulkMappingRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentMappingListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/revenue-segments/{company_id}/aliases":{"put":{"tags":["revenue-segments"],"summary":"Set Revenue Segment Alias","description":"Route one revenue segment label through another segment's account mapping.","operationId":"set_revenue_segment_alias_api_revenue_segments__company_id__aliases_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAliasCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/revenue-segments/{company_id}/aliases/{revenue_segment}":{"delete":{"tags":["revenue-segments"],"summary":"Clear Revenue Segment Alias Route","description":"Remove alias routing from a revenue segment.","operationId":"clear_revenue_segment_alias_route_api_revenue_segments__company_id__aliases__revenue_segment__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"revenue_segment","in":"path","required":true,"schema":{"type":"string","title":"Revenue Segment"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueSegmentAliasClearResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}":{"get":{"tags":["policies"],"summary":"Get Company Policies","description":"Get accounting policies for a company.","operationId":"get_company_policies_api_policies__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["policies"],"summary":"Update Company Policies","description":"Update accounting policies for a company. Requires owner or admin role.","operationId":"update_company_policies_api_policies__company_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/change-history":{"get":{"tags":["policies"],"summary":"Get Policy Change History","description":"Get policy change audit trail.\n\nReason: POR-83 — shows when policies changed, who changed them, and what\nthe previous values were. Reads field diffs from entity_change_log now that\nthere is no secondary field-diff table.","operationId":"get_policy_change_history_api_policies__company_id__change_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyChangeHistoryResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/close-prompts":{"get":{"tags":["policies"],"summary":"Get Monthly Close Prompts","description":"Get monthly close checklist of policy-related items needing attention.\n\nReason: POR-66 — aggregates unresolved flags, pending schedules, and\nsuggested accruals into a single checklist for month-end close.","operationId":"get_monthly_close_prompts_api_policies__company_id__close_prompts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthlyClosePromptsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/asset-classes":{"get":{"tags":["policies"],"summary":"List Asset Classes","description":"List all fixed asset classes for a company.","operationId":"list_asset_classes_api_policies__company_id__asset_classes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetClassResponse"},"title":"Response List Asset Classes Api Policies  Company Id  Asset Classes Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["policies"],"summary":"Create Asset Class","description":"Create a new fixed asset class.","operationId":"create_asset_class_api_policies__company_id__asset_classes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetClassCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetClassResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/asset-classes/{class_id}":{"patch":{"tags":["policies"],"summary":"Update Asset Class","description":"Update a fixed asset class.","operationId":"update_asset_class_api_policies__company_id__asset_classes__class_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","title":"Class Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetClassUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetClassResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["policies"],"summary":"Delete Asset Class","description":"Delete a fixed asset class.","operationId":"delete_asset_class_api_policies__company_id__asset_classes__class_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","title":"Class Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/intangible-classes":{"get":{"tags":["policies"],"summary":"List Intangible Classes","description":"List all intangible asset classes for a company.","operationId":"list_intangible_classes_api_policies__company_id__intangible_classes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntangibleClassResponse"},"title":"Response List Intangible Classes Api Policies  Company Id  Intangible Classes Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["policies"],"summary":"Create Intangible Class","description":"Create a new intangible asset class.","operationId":"create_intangible_class_api_policies__company_id__intangible_classes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntangibleClassCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntangibleClassResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/intangible-classes/{class_id}":{"patch":{"tags":["policies"],"summary":"Update Intangible Class","description":"Update an intangible asset class.","operationId":"update_intangible_class_api_policies__company_id__intangible_classes__class_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","title":"Class Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntangibleClassUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntangibleClassResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["policies"],"summary":"Delete Intangible Class","description":"Delete an intangible asset class.","operationId":"delete_intangible_class_api_policies__company_id__intangible_classes__class_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","title":"Class Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/flags":{"get":{"tags":["policies"],"summary":"List Pending Flags","description":"List flags for a company.\n\nReason: Default returns pending flags. Pass status='all' for all flags.","operationId":"list_pending_flags_api_policies__company_id__flags_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/flags/transaction/{transaction_id}":{"get":{"tags":["policies"],"summary":"Get Flags For Transaction","description":"Get all flags for a specific transaction.\n\nReason: Used in the transaction detail drawer to show policy flags.","operationId":"get_flags_for_transaction_api_policies__company_id__flags_transaction__transaction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransactionFlagResponse"},"title":"Response Get Flags For Transaction Api Policies  Company Id  Flags Transaction  Transaction Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/flags/evaluate":{"post":{"tags":["policies"],"summary":"Evaluate Transactions","description":"Trigger policy flag evaluation on transactions.\n\nReason: Evaluates transactions against company policies and creates flags\nfor those exceeding the active fixed-asset or prepaid policy thresholds.","operationId":"evaluate_transactions_api_policies__company_id__flags_evaluate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/flags/{flag_id}/resolve":{"patch":{"tags":["policies"],"summary":"Resolve Flag","description":"Resolve a flag — accept (create schedule) or dismiss.\n\nReason: When a user accepts a flag, a schedule is typically created from the\nsuggested_values. The schedule_id is then passed here to link the flag to it.","operationId":"resolve_flag_api_policies__company_id__flags__flag_id__resolve_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flag_id","in":"path","required":true,"schema":{"type":"string","title":"Flag Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveFlagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionFlagResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/flags/{flag_id}/create-schedule":{"post":{"tags":["policies"],"summary":"Create Schedule From Flag","description":"Create a schedule from a flag and resolve the flag as accepted (POR-61).","operationId":"create_schedule_from_flag_api_policies__company_id__flags__flag_id__create_schedule_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flag_id","in":"path","required":true,"schema":{"type":"string","title":"Flag Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleFromFlagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleFromFlagResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/commission-deal-types":{"get":{"tags":["policies"],"summary":"List Commission Deal Types","description":"List all commission deal types for a company.","operationId":"list_commission_deal_types_api_policies__company_id__commission_deal_types_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommissionDealTypeResponse"},"title":"Response List Commission Deal Types Api Policies  Company Id  Commission Deal Types Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["policies"],"summary":"Create Commission Deal Type","description":"Create a new commission deal type.","operationId":"create_commission_deal_type_api_policies__company_id__commission_deal_types_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommissionDealTypeCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommissionDealTypeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/commission-deal-types/{deal_type_id}":{"patch":{"tags":["policies"],"summary":"Update Commission Deal Type","description":"Update a commission deal type.","operationId":"update_commission_deal_type_api_policies__company_id__commission_deal_types__deal_type_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_type_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Type Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommissionDealTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommissionDealTypeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["policies"],"summary":"Delete Commission Deal Type","description":"Delete a commission deal type.","operationId":"delete_commission_deal_type_api_policies__company_id__commission_deal_types__deal_type_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_type_id","in":"path","required":true,"schema":{"type":"string","title":"Deal Type Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/cap-software-accounts":{"get":{"tags":["policies"],"summary":"List Cap Software Accounts","description":"List all capitalized software eligible accounts for a company.","operationId":"list_cap_software_accounts_api_policies__company_id__cap_software_accounts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CapSoftwareAccountResponse"},"title":"Response List Cap Software Accounts Api Policies  Company Id  Cap Software Accounts Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["policies"],"summary":"Create Cap Software Account","description":"Create a new cap software eligible account.\n\nReason: POR-75 — marks an expense account as eligible for capitalized\nsoftware treatment. The default_productivity_pct can be overridden\nper-transaction when flagged.","operationId":"create_cap_software_account_api_policies__company_id__cap_software_accounts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapSoftwareAccountCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapSoftwareAccountResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/policies/{company_id}/cap-software-accounts/{account_id}":{"patch":{"tags":["policies"],"summary":"Update Cap Software Account","description":"Update a cap software eligible account.","operationId":"update_cap_software_account_api_policies__company_id__cap_software_accounts__account_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapSoftwareAccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapSoftwareAccountResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["policies"],"summary":"Delete Cap Software Account","description":"Delete a cap software eligible account.","operationId":"delete_cap_software_account_api_policies__company_id__cap_software_accounts__account_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}":{"get":{"tags":["rules"],"summary":"List Rules","description":"List learned classification rules for a company.","operationId":"list_rules_api_rules__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["rules"],"summary":"Create Rule Endpoint","description":"Create a future-facing rule without modifying historical transactions.","operationId":"create_rule_endpoint_api_rules__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRuleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/bulk/toggle":{"post":{"tags":["rules"],"summary":"Bulk Toggle Rules","description":"Bulk enable or disable classification rules.","operationId":"bulk_toggle_rules_api_rules__company_id__bulk_toggle_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/validate-definition":{"post":{"tags":["rules"],"summary":"Validate Rule Definition Endpoint","description":"Preview every historical mismatch before creating or revising a rule.","operationId":"validate_rule_definition_endpoint_api_rules__company_id__validate_definition_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleDefinitionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/{rule_id}/history-preview":{"post":{"tags":["rules"],"summary":"Preview Rule History Endpoint","description":"Return a complete, persisted review population; this writes no categories.","operationId":"preview_rule_history_endpoint_api_rules__company_id___rule_id__history_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/history-previews/{snapshot_id}/apply":{"post":{"tags":["rules"],"summary":"Apply Rule History Endpoint","description":"Apply only rows explicitly selected in one persisted rule-history review.","operationId":"apply_rule_history_endpoint_api_rules__company_id__history_previews__snapshot_id__apply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyRuleHistoryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/{rule_id}":{"patch":{"tags":["rules"],"summary":"Revise Rule Endpoint","description":"Approve a replacement definition and its complete exception set.","operationId":"revise_rule_endpoint_api_rules__company_id___rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseRuleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["rules"],"summary":"Delete Rule Endpoint","description":"Delete a classification rule.","operationId":"delete_rule_endpoint_api_rules__company_id___rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeleteRuleRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/bulk/delete":{"post":{"tags":["rules"],"summary":"Bulk Delete Rules","description":"Bulk delete classification rules.","operationId":"bulk_delete_rules_api_rules__company_id__bulk_delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/{rule_id}/restore":{"post":{"tags":["rules"],"summary":"Restore Rule Endpoint","description":"Restore a deleted rule after complete-history review.","operationId":"restore_rule_endpoint_api_rules__company_id___rule_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreRuleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rules/{company_id}/{rule_id}/toggle":{"post":{"tags":["rules"],"summary":"Toggle Rule Endpoint","description":"Enable or disable a classification rule.","operationId":"toggle_rule_endpoint_api_rules__company_id___rule_id__toggle_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Is Active"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/render-token/{token}":{"get":{"tags":["artifacts"],"summary":"Get Artifact Render Payload","description":"Return the token-gated payload for backend-owned artifact screenshots.","operationId":"get_artifact_render_payload_api_artifacts_render_token__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactRenderPayload"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/render-token/{token}/programs/{program_key}/run":{"post":{"tags":["artifacts"],"summary":"Run Artifact Render Program","description":"Run one saved live-data program for a token-gated render.","operationId":"run_artifact_render_program_api_artifacts_render_token__token__programs__program_key__run_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"program_key","in":"path","required":true,"schema":{"type":"string","title":"Program Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/render-token/programs/{program_key}/run":{"post":{"tags":["artifacts"],"summary":"Run Artifact Render Program With Body Token","description":"Run one saved live-data program without placing the render token in the URL.","operationId":"run_artifact_render_program_with_body_token_api_artifacts_render_token_programs__program_key__run_post","parameters":[{"name":"program_key","in":"path","required":true,"schema":{"type":"string","title":"Program Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactRenderProgramRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/render-token/programs/run":{"post":{"tags":["artifacts"],"summary":"Run Artifact Render Program Batch With Body Token","description":"Run saved live-data programs through one token-gated render request.","operationId":"run_artifact_render_program_batch_with_body_token_api_artifacts_render_token_programs_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactRenderProgramBatchRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramBatchRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}":{"get":{"tags":["artifacts"],"summary":"List Artifacts","description":"Return generated artifacts visible to the current company member.","operationId":"list_artifacts_api_artifacts__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/default":{"patch":{"tags":["artifacts"],"summary":"Set Artifact Default","description":"Set or clear the company default Artifact Canvas landing artifact.","operationId":"set_artifact_default_api_artifacts__company_id__default_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactDefaultSelectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactDefaultSelection"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/default/materialize":{"post":{"tags":["artifacts"],"summary":"Materialize Default Artifact","description":"Create a company-owned copy of the shared Operating Review on first edit.","operationId":"materialize_default_artifact_api_artifacts__company_id__default_materialize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/default/programs/{program_key}/run":{"post":{"tags":["artifacts"],"summary":"Run Default Artifact Program","description":"Run one live-data program for the shared Operating Review artifact.","operationId":"run_default_artifact_program_api_artifacts__company_id__default_programs__program_key__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"program_key","in":"path","required":true,"schema":{"type":"string","title":"Program Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/default/programs/run":{"post":{"tags":["artifacts"],"summary":"Run Default Artifact Program Batch","description":"Run multiple live-data programs for the shared Operating Review artifact.","operationId":"run_default_artifact_program_batch_api_artifacts__company_id__default_programs_run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramBatchRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramBatchRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/default/programs/{program_key}/drilldown":{"post":{"tags":["artifacts"],"summary":"Drilldown Default Artifact Program","description":"Return drivers for a clicked shared Operating Review data point.","operationId":"drilldown_default_artifact_program_api_artifacts__company_id__default_programs__program_key__drilldown_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"program_key","in":"path","required":true,"schema":{"type":"string","title":"Program Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramDrilldownRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramDrilldownResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/versions":{"get":{"tags":["artifacts"],"summary":"List Artifact Versions","description":"Return saved versions for one generated artifact.","operationId":"list_artifact_versions_api_artifacts__company_id___artifact_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactVersionListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}":{"get":{"tags":["artifacts"],"summary":"Get Artifact","description":"Return one generated artifact.","operationId":"get_artifact_api_artifacts__company_id___artifact_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}],"description":"Optional published source token or artifact-scoped version number. Omit to read the current artifact.","title":"Version"},"description":"Optional published source token or artifact-scoped version number. Omit to read the current artifact."},{"name":"acceptedTemporalVersions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Acceptedtemporalversions"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["artifacts"],"summary":"Delete Artifact","description":"Soft-delete one generated artifact by archiving it.","operationId":"delete_artifact_api_artifacts__company_id___artifact_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactDeleteResult"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/state":{"get":{"tags":["artifacts"],"summary":"Get Artifact State","description":"Return the artifact's saved generated artifact control state.","operationId":"get_artifact_state_api_artifacts__company_id___artifact_id__state_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactState"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["artifacts"],"summary":"Save Artifact State","description":"Persist the artifact's latest generated artifact control state.","operationId":"save_artifact_state_api_artifacts__company_id___artifact_id__state_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactStateSave"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactState"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/activity":{"post":{"tags":["artifacts"],"summary":"Summarize Artifact Activity","description":"Return recent command/entity activity scoped to the artifact's current records.","operationId":"summarize_artifact_activity_api_artifacts__company_id___artifact_id__activity_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactActivityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactActivitySummary"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/activity/readme":{"post":{"tags":["artifacts"],"summary":"Get Artifact Activity Readme","description":"Return the stored Read Me for the artifact's published source version.","operationId":"get_artifact_activity_readme_api_artifacts__company_id___artifact_id__activity_readme_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactReadmeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactReadme"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/screenshots":{"post":{"tags":["artifacts"],"summary":"Capture Artifact Screenshot","description":"Store the latest rendered screenshot for one generated artifact source.","operationId":"capture_artifact_screenshot_api_artifacts__company_id___artifact_id__screenshots_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactScreenshotCapture"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactScreenshotMetadata"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/source":{"get":{"tags":["artifacts"],"summary":"Get Artifact Source","description":"Return one generated artifact's current config/index for AI inspection.","operationId":"get_artifact_source_api_artifacts__company_id___artifact_id__source_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}],"description":"Optional published source token or artifact-scoped version number. Omit to read the current artifact config.","title":"Version"},"description":"Optional published source token or artifact-scoped version number. Omit to read the current artifact config."},{"name":"acceptedTemporalVersions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Acceptedtemporalversions"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactConfig"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/ai-context":{"get":{"tags":["artifacts"],"summary":"Get Artifact Ai Context","description":"Return prompt-ready context for Artifact sidebar AI turns.","operationId":"get_artifact_ai_context_api_artifacts__company_id___artifact_id__ai_context_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}],"description":"Optional published source token or artifact-scoped version number. Omit to preload the current artifact sidebar AI context.","title":"Version"},"description":"Optional published source token or artifact-scoped version number. Omit to preload the current artifact sidebar AI context."},{"name":"acceptedTemporalVersions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Acceptedtemporalversions"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactSidebarAiContext"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/author":{"post":{"tags":["artifacts"],"summary":"Author Artifact","description":"Create or revise one artifact from a controlled JSON submission.","operationId":"author_artifact_api_artifacts__company_id__author_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactAuthorSubmission"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedArtifactDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/sources/{source_token}/programs/{program_key}/run":{"post":{"tags":["artifacts"],"summary":"Run Artifact Program","description":"Run a saved live-data program for one generated artifact source.","operationId":"run_artifact_program_api_artifacts__company_id___artifact_id__sources__source_token__programs__program_key__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"source_token","in":"path","required":true,"schema":{"type":"string","title":"Source Token"}},{"name":"program_key","in":"path","required":true,"schema":{"type":"string","title":"Program Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/sources/{source_token}/programs/run":{"post":{"tags":["artifacts"],"summary":"Run Artifact Program Batch","description":"Run saved live-data programs for one generated artifact source.","operationId":"run_artifact_program_batch_api_artifacts__company_id___artifact_id__sources__source_token__programs_run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"source_token","in":"path","required":true,"schema":{"type":"string","title":"Source Token"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramBatchRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramBatchRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/sources/{source_token}/programs/{program_key}/drilldown":{"post":{"tags":["artifacts"],"summary":"Drilldown Artifact Program","description":"Return transaction-level drivers for a clicked artifact data point.","operationId":"drilldown_artifact_program_api_artifacts__company_id___artifact_id__sources__source_token__programs__program_key__drilldown_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"source_token","in":"path","required":true,"schema":{"type":"string","title":"Source Token"}},{"name":"program_key","in":"path","required":true,"schema":{"type":"string","title":"Program Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramDrilldownRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactProgramDrilldownResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/artifacts/{company_id}/{artifact_id}/sources/{source_token}/actions/{action_key}/run":{"post":{"tags":["artifacts"],"summary":"Run Artifact Action","description":"Run a saved ontology action for one generated artifact source.","operationId":"run_artifact_action_api_artifacts__company_id___artifact_id__sources__source_token__actions__action_key__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"source_token","in":"path","required":true,"schema":{"type":"string","title":"Source Token"}},{"name":"action_key","in":"path","required":true,"schema":{"type":"string","title":"Action Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactActionRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactActionRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/automations/{company_id}/schedule-preview":{"post":{"tags":["automations"],"summary":"Post Automation Schedule Preview","description":"Preview theoretical calendar timing without changing a definition.","operationId":"post_automation_schedule_preview_api_automations__company_id__schedule_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Automation Schedule Preview Api Automations  Company Id  Schedule Preview Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/automations/{company_id}":{"get":{"tags":["automations"],"summary":"Get Automations","description":"Return persisted user automations for the company.","operationId":"get_automations_api_automations__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["automations"],"summary":"Post Automation Definition","description":"Create a persisted automation definition.","operationId":"post_automation_definition_api_automations__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDefinitionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/automations/{company_id}/{automation_id}":{"get":{"tags":["automations"],"summary":"Get Automation Definition","description":"Return one persisted automation definition.","operationId":"get_automation_definition_api_automations__company_id___automation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDefinitionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["automations"],"summary":"Patch Automation Definition","description":"Patch one persisted automation definition.","operationId":"patch_automation_definition_api_automations__company_id___automation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDefinitionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/automations/{company_id}/{automation_id}/enabled":{"post":{"tags":["automations"],"summary":"Post Automation Enabled","description":"Enable or disable one automation.","operationId":"post_automation_enabled_api_automations__company_id___automation_id__enabled_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEnabledRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDefinitionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/automations/{company_id}/{automation_id}/runs":{"get":{"tags":["automations"],"summary":"Get Automation Runs","description":"Return recent run receipts for one automation.","operationId":"get_automation_runs_api_automations__company_id___automation_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":25,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationRunResponse"},"title":"Response Get Automation Runs Api Automations  Company Id   Automation Id  Runs Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["automations"],"summary":"Post Automation Run","description":"Create or reuse an automation run receipt.","operationId":"post_automation_run_api_automations__company_id___automation_id__runs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/automations/{company_id}/{automation_id}/trigger":{"post":{"tags":["automations"],"summary":"Post Automation Trigger","description":"Queue a manual automation run for immediate processing.","operationId":"post_automation_trigger_api_automations__company_id___automation_id__trigger_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/automations/{company_id}/{automation_id}/runs/{automation_run_id}/rerun":{"post":{"tags":["automations"],"summary":"Post Automation Run Rerun","description":"Replay one past run with the inputs it was originally given.","operationId":"post_automation_run_rerun_api_automations__company_id___automation_id__runs__automation_run_id__rerun_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"automation_run_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Run Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunRerunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/investor-folders/{company_id}":{"get":{"tags":["investor-folders"],"summary":"List Folders","description":"List folders visible to the caller, newest first.","operationId":"list_folders_api_investor_folders__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["investor-folders"],"summary":"Create Folder","operationId":"create_folder_api_investor_folders__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Create Folder"}},"/api/investor-folders/{company_id}/{folder_id}":{"get":{"tags":["investor-folders"],"summary":"Get Folder","operationId":"get_folder_api_investor_folders__company_id___folder_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Folder"},"patch":{"tags":["investor-folders"],"summary":"Update Folder","operationId":"update_folder_api_investor_folders__company_id___folder_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Update Folder"},"delete":{"tags":["investor-folders"],"summary":"Delete Folder","operationId":"delete_folder_api_investor_folders__company_id___folder_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Delete Folder"}},"/api/investor-folders/{company_id}/{folder_id}/publish":{"post":{"tags":["investor-folders"],"summary":"Publish Folder","operationId":"publish_folder_api_investor_folders__company_id___folder_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Publish Folder"}},"/api/investor-folders/{company_id}/{folder_id}/unpublish":{"post":{"tags":["investor-folders"],"summary":"Unpublish Folder","operationId":"unpublish_folder_api_investor_folders__company_id___folder_id__unpublish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Unpublish Folder"}},"/api/investor-folders/{company_id}/{folder_id}/archive":{"post":{"tags":["investor-folders"],"summary":"Archive Folder","operationId":"archive_folder_api_investor_folders__company_id___folder_id__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFolderResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Archive Folder"}},"/api/investor-folders/{company_id}/{folder_id}/export":{"get":{"tags":["investor-folders"],"summary":"Export Folder","description":"Stream every uploaded document in the folder as a single zip download.\n\nReason: POR-1131 — folder export is the natural verb for the investor\nportal (board distribution lives at the folder level, not file-by-file).\nGated by verify_company_access so the same caller who can per-doc\nDownload can also bulk-download; the visibility filter inside\ninvestor_folder_repo.get_visible already trims drafts/archived from\ninvestor previews.","operationId":"export_folder_api_investor_folders__company_id___folder_id__export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/investor-folders/{company_id}/{folder_id}/documents":{"get":{"tags":["investor-folders"],"summary":"List Folder Documents","operationId":"list_folder_documents_api_investor_folders__company_id___folder_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorDocumentListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"List Folder Documents"},"post":{"tags":["investor-folders"],"summary":"Create Folder Document","operationId":"create_folder_document_api_investor_folders__company_id___folder_id__documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorDocumentUploadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorDocumentResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Create Folder Document"}},"/api/investor-folders/{company_id}/documents/{document_id}":{"get":{"tags":["investor-folders"],"summary":"Get Document","description":"Fetch a single document by id. Returns 404 for documents inside\na folder the caller can't see (visibility filter).","operationId":"get_document_api_investor_folders__company_id__documents__document_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorDocumentResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["investor-folders"],"summary":"Delete Document","operationId":"delete_document_api_investor_folders__company_id__documents__document_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Delete Document"}},"/api/investor-folders/{company_id}/documents/{document_id}/download":{"get":{"tags":["investor-folders"],"summary":"Download Document","operationId":"download_document_api_investor_folders__company_id__documents__document_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorDocumentDownloadResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Download Document"}},"/api/investor-folders/{company_id}/{folder_id}/documents/upload":{"post":{"tags":["investor-folders"],"summary":"Upload Folder Document","operationId":"upload_folder_document_api_investor_folders__company_id___folder_id__documents_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_folder_document_api_investor_folders__company_id___folder_id__documents_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorDocumentResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Upload Folder Document"}},"/api/investor-snapshots/{company_id}/capture":{"post":{"tags":["investor-snapshots"],"summary":"Capture Snapshot","description":"Render a statement on the server and freeze it into an investor folder.","operationId":"capture_snapshot_api_investor_snapshots__company_id__capture_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorSnapshotCapture"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorSnapshotView"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/investor-snapshots/{company_id}/{snapshot_id}/download.pdf":{"get":{"tags":["investor-snapshots"],"summary":"Download Snapshot Pdf","description":"Download one investor snapshot as a server-rendered Letter PDF.","operationId":"download_snapshot_pdf_api_investor_snapshots__company_id___snapshot_id__download_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/investor-snapshots/{company_id}/{snapshot_id}":{"get":{"tags":["investor-snapshots"],"summary":"Get Snapshot","operationId":"get_snapshot_api_investor_snapshots__company_id___snapshot_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorSnapshotView"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Snapshot"}},"/api/investors/{company_id}":{"get":{"tags":["investors"],"summary":"List Investors","operationId":"list_investors_api_investors__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"List Investors"}},"/api/investors/{company_id}/{investor_id}":{"delete":{"tags":["investors"],"summary":"Revoke Investor","operationId":"revoke_investor_api_investors__company_id___investor_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"investor_id","in":"path","required":true,"schema":{"type":"string","title":"Investor Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Revoke Investor"}},"/api/back-office/{company_id}":{"get":{"tags":["back-office"],"summary":"List Back Office","description":"Founder sees all; investors see only members they sponsored.","operationId":"list_back_office_api_back_office__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackOfficeMemberListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["back-office"],"summary":"Invite Back Office Member","description":"Investor invites an analyst. Only investors may call this.","operationId":"invite_back_office_member_api_back_office__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackOfficeMemberInviteInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackOfficeMemberResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/back-office/{company_id}/{member_id}":{"delete":{"tags":["back-office"],"summary":"Revoke Back Office Member","description":"Founder may revoke anyone; investor may revoke only their own\nsponsored members. Both rules enforced inside the repo.","operationId":"revoke_back_office_member_api_back_office__company_id___member_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","title":"Member Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/profit-and-loss":{"get":{"tags":["financial-reports"],"summary":"Get Profit And Loss","description":"Generate Profit & Loss statement for the given period.","operationId":"get_profit_and_loss_api_financial_reports__company_id__profit_and_loss_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfitAndLossResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/balance-sheet":{"get":{"tags":["financial-reports"],"summary":"Get Balance Sheet","description":"Generate Balance Sheet as of the given date.","operationId":"get_balance_sheet_api_financial_reports__company_id__balance_sheet_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"as_of_date","in":"query","required":true,"schema":{"type":"string","description":"As-of date YYYY-MM-DD","title":"As Of Date"},"description":"As-of date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/general-ledger":{"get":{"tags":["financial-reports"],"summary":"Get General Ledger","description":"Get per-account GL transaction detail with running balances.","operationId":"get_general_ledger_api_financial_reports__company_id__general_ledger_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"account_ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated account IDs","title":"Account Ids"},"description":"Comma-separated account IDs"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source type","title":"Source Type"},"description":"Filter by source type"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"description":"Page size","default":500,"title":"Page Size"},"description":"Page size"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralLedgerResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/general-ledger/export":{"get":{"tags":["financial-reports"],"summary":"Export General Ledger","description":"Download GL detail as xlsx.","operationId":"export_general_ledger_api_financial_reports__company_id__general_ledger_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"account_ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated account IDs","title":"Account Ids"},"description":"Comma-separated account IDs"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source type","title":"Source Type"},"description":"Filter by source type"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/profit-and-loss/compare":{"get":{"tags":["financial-reports"],"summary":"Compare Profit And Loss","description":"Generate comparative P&L for N periods.","operationId":"compare_profit_and_loss_api_financial_reports__company_id__profit_and_loss_compare_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"periods","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pipe-delimited periods: start,end|start,end","title":"Periods"},"description":"Pipe-delimited periods: start,end|start,end"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current period start YYYY-MM-DD","title":"Start Date"},"description":"Current period start YYYY-MM-DD"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current period end YYYY-MM-DD","title":"End Date"},"description":"Current period end YYYY-MM-DD"},{"name":"compare_start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comparison period start YYYY-MM-DD","title":"Compare Start Date"},"description":"Comparison period start YYYY-MM-DD"},{"name":"compare_end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comparison period end YYYY-MM-DD","title":"Compare End Date"},"description":"Comparison period end YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparativePnlResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/balance-sheet/compare":{"get":{"tags":["financial-reports"],"summary":"Compare Balance Sheet","description":"Generate comparative Balance Sheet for N dates.","operationId":"compare_balance_sheet_api_financial_reports__company_id__balance_sheet_compare_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"dates","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-delimited as-of dates","title":"Dates"},"description":"Comma-delimited as-of dates"},{"name":"as_of_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current as-of date YYYY-MM-DD","title":"As Of Date"},"description":"Current as-of date YYYY-MM-DD"},{"name":"compare_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comparison as-of date YYYY-MM-DD","title":"Compare Date"},"description":"Comparison as-of date YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparativeBsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/profit-and-loss/export":{"get":{"tags":["financial-reports"],"summary":"Export Profit And Loss","description":"Download P&L as xlsx.","operationId":"export_profit_and_loss_api_financial_reports__company_id__profit_and_loss_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/profit-and-loss/compare/export":{"get":{"tags":["financial-reports"],"summary":"Export Comparative Profit And Loss","description":"Download a multi-period (by-month / by-quarter / compare) P&L as xlsx.\n\nReason (POR-1305 followup): Matches what `/profit-and-loss/compare` returns\non screen — the export must respect the founder's chosen view. Filename\nencodes the period count so investor folders stay sortable.","operationId":"export_comparative_profit_and_loss_api_financial_reports__company_id__profit_and_loss_compare_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"periods","in":"query","required":false,"schema":{"type":"string","description":"Pipe-delimited periods: start,end|start,end","default":"","title":"Periods"},"description":"Pipe-delimited periods: start,end|start,end"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/balance-sheet/export":{"get":{"tags":["financial-reports"],"summary":"Export Balance Sheet","description":"Download Balance Sheet as xlsx.","operationId":"export_balance_sheet_api_financial_reports__company_id__balance_sheet_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"as_of_date","in":"query","required":true,"schema":{"type":"string","description":"As-of date YYYY-MM-DD","title":"As Of Date"},"description":"As-of date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/balance-sheet/compare/export":{"get":{"tags":["financial-reports"],"summary":"Export Comparative Balance Sheet","description":"Download a multi-date Balance Sheet as xlsx.\n\nReason: POR-1772 — matches the `/balance-sheet/compare` data visible on\nscreen instead of exporting a single as-of date.","operationId":"export_comparative_balance_sheet_api_financial_reports__company_id__balance_sheet_compare_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"dates","in":"query","required":false,"schema":{"type":"string","description":"Comma-delimited as-of dates","default":"","title":"Dates"},"description":"Comma-delimited as-of dates"},{"name":"include_total","in":"query","required":false,"schema":{"type":"boolean","description":"Deprecated compatibility flag; ignored because Balance Sheet exports do not include a Total column","default":false,"title":"Include Total"},"description":"Deprecated compatibility flag; ignored because Balance Sheet exports do not include a Total column"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/monthly-package/export":{"get":{"tags":["financial-reports"],"summary":"Export Monthly Package","description":"Download Monthly Package (P&L + BS) as a multi-sheet xlsx.","operationId":"export_monthly_package_api_financial_reports__company_id__monthly_package_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"period_year","in":"query","required":true,"schema":{"type":"integer","description":"Year (e.g. 2026)","title":"Period Year"},"description":"Year (e.g. 2026)"},{"name":"period_month","in":"query","required":true,"schema":{"type":"integer","maximum":12,"minimum":1,"description":"Month (1-12)","title":"Period Month"},"description":"Month (1-12)"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/cash-flow":{"get":{"tags":["financial-reports"],"summary":"Get Cash Flow","description":"Generate Cash Flow Statement using the indirect method.","operationId":"get_cash_flow_api_financial_reports__company_id__cash_flow_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashFlowResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/cash-flow/compare":{"get":{"tags":["financial-reports"],"summary":"Compare Cash Flow","description":"Generate comparative Cash Flow for N periods.","operationId":"compare_cash_flow_api_financial_reports__company_id__cash_flow_compare_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"periods","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pipe-delimited periods: start,end|start,end","title":"Periods"},"description":"Pipe-delimited periods: start,end|start,end"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current period start","title":"Start Date"},"description":"Current period start"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current period end","title":"End Date"},"description":"Current period end"},{"name":"compare_start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comparison period start","title":"Compare Start Date"},"description":"Comparison period start"},{"name":"compare_end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comparison period end","title":"Compare End Date"},"description":"Comparison period end"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compare Cash Flow Api Financial Reports  Company Id  Cash Flow Compare Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/cash-flow/compare/export":{"get":{"tags":["financial-reports"],"summary":"Export Comparative Cash Flow","description":"Download a multi-period indirect Cash Flow as xlsx.\n\nReason: POR-1772 — matches the `/cash-flow/compare` data visible on screen\ninstead of exporting a single aggregate cash-flow period.","operationId":"export_comparative_cash_flow_api_financial_reports__company_id__cash_flow_compare_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"periods","in":"query","required":false,"schema":{"type":"string","description":"Pipe-delimited periods: start,end|start,end","default":"","title":"Periods"},"description":"Pipe-delimited periods: start,end|start,end"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/cash-flow/export":{"get":{"tags":["financial-reports"],"summary":"Export Cash Flow","description":"Download Cash Flow Statement as xlsx.","operationId":"export_cash_flow_api_financial_reports__company_id__cash_flow_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/cash-movements":{"get":{"tags":["financial-reports"],"summary":"Get Cash Movements","description":"Generate direct-method Cash Flow (Cash Movements) for the given period.\n\nReason: POR-731 — Shows actual cash in and cash out by category,\nderived from posted ledger lines hitting Bank-type accounts.","operationId":"get_cash_movements_api_financial_reports__company_id__cash_movements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashMovementsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-reports/{company_id}/cash-movements/detail":{"get":{"tags":["financial-reports"],"summary":"Get Cash Movement Detail","description":"Return the exact report lines supporting one Cash Movements row.","operationId":"get_cash_movement_detail_api_financial_reports__company_id__cash_movements_detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"direction","in":"query","required":true,"schema":{"enum":["cash_in","cash_out"],"type":"string","title":"Direction"}},{"name":"category","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Category"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashMovementDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-snapshots/{company_id}/{period}":{"get":{"tags":["financial-snapshots"],"summary":"Get Period Snapshot Summary","description":"Whether a snapshot exists for the period + which artifacts/versions.","operationId":"get_period_snapshot_summary_api_financial_snapshots__company_id___period__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSnapshotSummary"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-snapshots/{company_id}/{period}/statement/{artifact_type}":{"get":{"tags":["financial-snapshots"],"summary":"Get Snapshot Statement","description":"The frozen statement, re-wrapped to match the live report's shape.","operationId":"get_snapshot_statement_api_financial_snapshots__company_id___period__statement__artifact_type__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"artifact_type","in":"path","required":true,"schema":{"type":"string","title":"Artifact Type"}},{"name":"basis","in":"query","required":false,"schema":{"type":"string","default":"accrual","title":"Basis"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotStatementResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-snapshots/{company_id}/{period}/statement/{artifact_type}/download.pdf":{"get":{"tags":["financial-snapshots"],"summary":"Download Snapshot Statement Pdf","description":"Download one frozen close-snapshot statement as a server-rendered Letter PDF.","operationId":"download_snapshot_statement_pdf_api_financial_snapshots__company_id___period__statement__artifact_type__download_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"artifact_type","in":"path","required":true,"schema":{"type":"string","title":"Artifact Type"}},{"name":"basis","in":"query","required":true,"schema":{"type":"string","title":"Basis"}},{"name":"version","in":"query","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/financial-snapshots/{company_id}/{period}/statement/{artifact_type}/diff":{"get":{"tags":["financial-snapshots"],"summary":"Get Snapshot Diff","description":"Snapshot-vs-live drift for one frozen statement.","operationId":"get_snapshot_diff_api_financial_snapshots__company_id___period__statement__artifact_type__diff_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"artifact_type","in":"path","required":true,"schema":{"type":"string","title":"Artifact Type"}},{"name":"basis","in":"query","required":false,"schema":{"type":"string","default":"accrual","title":"Basis"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Snapshot Diff Api Financial Snapshots  Company Id   Period  Statement  Artifact Type  Diff Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/conversations":{"get":{"tags":["chat"],"summary":"List Conversations","description":"List all conversations for the current user in this company.","operationId":"list_conversations_api_chat__company_id__conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["chat"],"summary":"Create Conversation","description":"Create a new conversation.","operationId":"create_conversation_api_chat__company_id__conversations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/conversations/{conversation_id}":{"delete":{"tags":["chat"],"summary":"Delete Conversation","description":"Delete a conversation and all its messages.","operationId":"delete_conversation_api_chat__company_id__conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["chat"],"summary":"Update Conversation","description":"Update a conversation's title, or who it is shared with.","operationId":"update_conversation_api_chat__company_id__conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/proposals/execute":{"post":{"tags":["chat"],"summary":"Execute Proposal","description":"Re-run an approved AI mutation against the same dispatch path the chat\nassistant would have used.\n\nReason: When the chat assistant returns a `needs_approval` envelope, the\nfrontend renders an Approve/Dismiss card and stores the action+params\nlocally. On Approve, it POSTs them here. Validation:\n- The role gate above ensures only non-investor company members reach this.\n- The action name must resolve to an ontology mutation ActionDef so a\n  caller cannot invoke a query, an internal tool, or an unknown name.\n- Dispatch happens through the same `dispatch_mcp_tool` path used by MCP\n  and by the chat assistant in \"act\" mode, so authorization and behavior\n  are identical to any other write.\nA short-lived idempotency cache consumes each approval card once so\nretries and double-clicks do not re-run non-idempotent mutations. When\nthe final proposal in a group settles, this endpoint also claims and\nstarts the receipt-keyed continuation before returning to the browser.","operationId":"execute_proposal_api_chat__company_id__proposals_execute_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteProposalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteProposalResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/proposals/preview":{"post":{"tags":["chat"],"summary":"Preview Proposal","description":"Run a declared, non-mutating rehearsal of a pending approval.\n\nReason (POR-2092): Some approvals cannot be judged from prose — an outbound\ncustomer email above all. The proposed action declares the rehearsals it\noffers (`ActionDef.approval_previews`); this runs one of them and leaves the\nproposal pending, so the user still has to click Approve afterwards.\n\nReason: The client sends a preview KEY, never a handler. The key is resolved\nagainst the action's own declaration here, server-side, so this endpoint\ncannot be talked into dispatching an arbitrary tool — it can only run what\nthat specific action published.","operationId":"preview_proposal_api_chat__company_id__proposals_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewProposalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Proposal Api Chat  Company Id  Proposals Preview Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/proposals/execute-batch":{"post":{"tags":["chat"],"summary":"Execute Proposal Batch","description":"Execute an approve-all proposal plan.\n\nReason: A grouped approval may contain independent mutations. The browser\nsends the model-authored execution order, the service runs same-order waves\nconcurrently, and this endpoint starts exactly one continuation after every\nproposal receipt has been persisted.","operationId":"execute_proposal_batch_api_chat__company_id__proposals_execute_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteProposalBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteProposalBatchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/stuck-feedback":{"post":{"tags":["chat"],"summary":"Report Stuck Chat","operationId":"report_stuck_chat_api_chat__company_id__stuck_feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StuckFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Report Stuck Chat Api Chat  Company Id  Stuck Feedback Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Report Stuck Chat"}},"/api/chat/{company_id}/assistant-preferences":{"get":{"tags":["chat"],"summary":"Get Assistant Preferences","description":"Return the current user's AI assistant preferences for this company.","operationId":"get_assistant_preferences_api_chat__company_id__assistant_preferences_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["chat"],"summary":"Update Assistant Preferences","description":"Update the current user's AI assistant preferences for this company.","operationId":"update_assistant_preferences_api_chat__company_id__assistant_preferences_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantPreferenceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/conversations/{conversation_id}/messages":{"get":{"tags":["chat"],"summary":"List Messages","description":"List messages in a conversation.","operationId":"list_messages_api_chat__company_id__conversations__conversation_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/conversations/{conversation_id}/proposal-events":{"post":{"tags":["chat"],"summary":"Append Proposal Event","description":"Append a durable proposal UI state event to the conversation history.","operationId":"append_proposal_event_api_chat__company_id__conversations__conversation_id__proposal_events_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalEventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/messages":{"get":{"tags":["chat"],"summary":"Get Recent Messages","description":"Get recent messages for the company (for the frontend query).","operationId":"get_recent_messages_api_chat__company_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["chat"],"summary":"Send Message","description":"Send a message and stream the shared chat service response.","operationId":"send_message_api_chat__company_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_message_api_chat__company_id__messages_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/chat/new":{"post":{"tags":["chat"],"summary":"Start New Chat","description":"Start a new chat conversation (clears current context).","operationId":"start_new_chat_api_chat__company_id__chat_new_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/runs":{"post":{"tags":["chat"],"summary":"Create Chat Run","description":"Admit a durable queued chat run (POR-1343).\n\nJSON mode returns {runId, conversationId}. Streaming mode follows the\nsame queued run in this response while preserving the GET stream for\nrefresh/reconnect. Multiple chats can wait in the durable queue and\nsurvive conversation switch, refresh, and tab close.","operationId":"create_chat_run_api_chat__company_id__runs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"stream","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Stream"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_chat_run_api_chat__company_id__runs_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/runs/{run_id}/stream":{"get":{"tags":["chat"],"summary":"Stream Chat Run","description":"SSE stream for a chat run (POR-1343).\n\nCatches up from the durable event history, then tails live events until the\nrun is terminal. Multiple API instances can serve the same run because the\nworker-owned event log, rather than one process's memory, is authoritative.","operationId":"stream_chat_run_api_chat__company_id__runs__run_id__stream_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/runs/{run_id}":{"get":{"tags":["chat"],"summary":"Get Chat Run","description":"Return durable lifecycle status for one user-owned chat run.","operationId":"get_chat_run_api_chat__company_id__runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/conversations/{conversation_id}/active_run":{"get":{"tags":["chat"],"summary":"Get Active Chat Run","description":"Return the in-flight chat run for a conversation, or 204 if none.\n\nUsed by the frontend on conversation open / page reload to reconnect to\na running stream that survived the prior page navigation.","operationId":"get_active_chat_run_api_chat__company_id__conversations__conversation_id__active_run_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/active_runs":{"get":{"tags":["chat"],"summary":"List Active Chat Runs","description":"Return all in-flight runs across this user's conversations.\n\nUsed by the sidebar to show a pulsing-dot indicator on conversation rows\nwhose chat is still streaming.","operationId":"list_active_chat_runs_api_chat__company_id__active_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/chat/{company_id}/runs/{run_id}/cancel":{"post":{"tags":["chat"],"summary":"Cancel Chat Run","description":"Cancel an in-flight chat run (POR-1343).\n\nCancels the detached asyncio task if it's still running in this worker\nand marks `chat_runs.status='cancelled'`. Idempotent — calling on a\nterminal run is a no-op (returns the current row). Cross-worker\ncancellation persists terminal status; the owning worker's\nnext lease heartbeat then cancels its asyncio task.","operationId":"cancel_chat_run_api_chat__company_id__runs__run_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/goals/{company_id}/{goal_run_id}":{"get":{"tags":["goals"],"summary":"Get Goal Run","description":"Read a goal run and its lightweight checklist rows.","operationId":"get_goal_run_api_goals__company_id___goal_run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"goal_run_id","in":"path","required":true,"schema":{"type":"string","title":"Goal Run Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/goals/{company_id}/{goal_run_id}/conversation-graph":{"get":{"tags":["goals"],"summary":"Get Goal Conversation Graph","description":"Read hidden runs and raw transcript rows behind one visible goal.","operationId":"get_goal_conversation_graph_api_goals__company_id___goal_run_id__conversation_graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"goal_run_id","in":"path","required":true,"schema":{"type":"string","title":"Goal Run Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/goals/{company_id}":{"get":{"tags":["goals"],"summary":"List Goal Runs","description":"List the current user's visible generic conversation goals.","operationId":"list_goal_runs_api_goals__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/goals/{company_id}/conversations/{conversation_id}":{"get":{"tags":["goals"],"summary":"Get Conversation Goal","description":"Read the active goal linked to a Porter conversation, if any.","operationId":"get_conversation_goal_api_goals__company_id__conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/goals/{company_id}/monthly-close/{period}/start":{"post":{"tags":["goals"],"summary":"Prepare Monthly Close Goal Run","description":"Prepare the stored Monthly Close prompt for the normal goal/chat runtime.","operationId":"prepare_monthly_close_goal_run_api_goals__company_id__monthly_close__period__start_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareMonthlyCloseGoalRunResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/goals/{company_id}/monthly-close/{period}/goal":{"get":{"tags":["goals"],"summary":"Get Monthly Close Goal Run","description":"Read the period-level Monthly Close conversation goal, if any.","operationId":"get_monthly_close_goal_run_api_goals__company_id__monthly_close__period__goal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/goals/{company_id}/monthly-close/{period}/items/{item_id}/conversation":{"post":{"tags":["goals"],"summary":"Ensure Monthly Close Item Conversation","description":"Create or reuse the conversation scoped to one Monthly Close item goal.","operationId":"ensure_monthly_close_item_conversation_api_goals__company_id__monthly_close__period__items__item_id__conversation_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnsureCloseItemGoalConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}":{"get":{"tags":["schedules"],"summary":"List Schedules","description":"List schedules for a company.\n\nQuery params:\n- schedule_type: Filter by type (fixed_asset, prepaid, intangible, etc.)\n- status: Filter by status (active, completed, voided). Default: active\n- limit: Max results (default 100)\n- offset: Pagination offset\n- source_transaction_id: Filter by originating transaction ID","operationId":"list_schedules_api_schedules__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"schedule_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"active","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"source_transaction_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Transaction Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleListResponse"},"title":"Response List Schedules Api Schedules  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["schedules"],"summary":"Create Schedule","description":"Create a new schedule with automatically generated lines.","operationId":"create_schedule_api_schedules__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduleResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/activity-grid":{"get":{"tags":["schedules"],"summary":"Get Activity Grid","description":"Get activity grid data for schedule-based types.\n\nReason: POR-18 — schedule Activity tabs need a grid of schedule rows × month columns\nshowing the recognition amount per schedule per period.\n\nQuery params:\n- schedule_type (required): e.g. 'prepaid', 'fixed_asset', 'commission'\n- start_month (optional): YYYY-MM — omit for all data\n- end_month (optional): YYYY-MM — omit for all data","operationId":"get_activity_grid_api_schedules__company_id__activity_grid_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"schedule_type","in":"query","required":true,"schema":{"type":"string","title":"Schedule Type"}},{"name":"start_month","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start Month"}},{"name":"end_month","in":"query","required":false,"schema":{"type":"string","default":"","title":"End Month"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityGridResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/export-xlsx":{"get":{"tags":["schedules"],"summary":"Export Schedules Xlsx","description":"Generate and return a multi-tab xlsx workbook for schedule export.","operationId":"export_schedules_xlsx_api_schedules__company_id__export_xlsx_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"types","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated schedule types","title":"Types"},"description":"Comma-separated schedule types"},{"name":"date_from","in":"query","required":true,"schema":{"type":"string","description":"Activity start date YYYY-MM-DD","title":"Date From"},"description":"Activity start date YYYY-MM-DD"},{"name":"date_to","in":"query","required":true,"schema":{"type":"string","description":"Activity end date YYYY-MM-DD","title":"Date To"},"description":"Activity end date YYYY-MM-DD"},{"name":"include_source","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Source"}},{"name":"include_activity","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Activity"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/{schedule_id}":{"get":{"tags":["schedules"],"summary":"Get Schedule","description":"Get a schedule with its lines.","operationId":"get_schedule_api_schedules__company_id___schedule_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["schedules"],"summary":"Update Schedule","description":"Update a schedule and recalc planned lines when calc fields change.","operationId":"update_schedule_api_schedules__company_id___schedule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduleResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["schedules"],"summary":"Delete Schedule","description":"Delete a schedule.\n\nThis will cascade delete all schedule lines.","operationId":"delete_schedule_api_schedules__company_id___schedule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/{schedule_id}/loan-payments":{"post":{"tags":["schedules"],"summary":"Record Loan Payment","description":"Record a confirmed actual payment against a loan schedule.","operationId":"record_loan_payment_api_schedules__company_id___schedule_id__loan_payments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanActualPaymentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordLoanPaymentResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/{schedule_id}/loan-principal-adjustments":{"post":{"tags":["schedules"],"summary":"Record Loan Principal Adjustment Endpoint","description":"Attach one exact posted journal-entry line to loan servicing.","operationId":"record_loan_principal_adjustment_endpoint_api_schedules__company_id___schedule_id__loan_principal_adjustments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanPrincipalAdjustmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordLoanPrincipalAdjustmentResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/loan-bank-payment-match/preview":{"post":{"tags":["schedules"],"summary":"Preview Loan Bank Payment Match Endpoint","description":"Preview the loan principal/interest split for a bank transaction.","operationId":"preview_loan_bank_payment_match_endpoint_api_schedules__company_id__loan_bank_payment_match_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanBankPaymentMatchPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanBankPaymentMatchPreviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/loan-bank-payment-match/apply":{"post":{"tags":["schedules"],"summary":"Apply Loan Bank Payment Match Endpoint","description":"Apply a previewed loan-bank payment match.","operationId":"apply_loan_bank_payment_match_endpoint_api_schedules__company_id__loan_bank_payment_match_apply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanBankPaymentMatchApplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanBankPaymentMatchPreviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/loan-bank-payment-match/unmatch":{"post":{"tags":["schedules"],"summary":"Unmatch Loan Bank Payment Endpoint","description":"Detach the latest bank-backed loan actual payment.","operationId":"unmatch_loan_bank_payment_endpoint_api_schedules__company_id__loan_bank_payment_match_unmatch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanBankPaymentUnmatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanBankPaymentUnmatchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/journal-entries/{year}/{month}":{"get":{"tags":["schedules"],"summary":"Get Journal Entries","description":"Get consolidated journal entry for a month from schedule lines.","operationId":"get_journal_entries_api_schedules__company_id__journal_entries__year___month__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidatedJournalEntry"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/journal-entries/{year}/{month}/detail":{"get":{"tags":["schedules"],"summary":"Get Journal Entry Detail","description":"Get detail of which schedules contributed to a journal entry line.\n\nQuery params:\n- account_name: The account to get detail for","operationId":"get_journal_entry_detail_api_schedules__company_id__journal_entries__year___month__detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"account_name","in":"query","required":true,"schema":{"type":"string","title":"Account Name"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JournalEntryDetail"},"title":"Response Get Journal Entry Detail Api Schedules  Company Id  Journal Entries  Year   Month  Detail Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/upload-invoice":{"post":{"tags":["schedules"],"summary":"Upload Invoice For Schedule","description":"Upload an invoice/subscription PDF and get a schedule proposal.\n\nReason: This endpoint parses the PDF using AI to extract vendor, amount,\nand service period, then creates a pre-filled schedule proposal for\nuser review before creation.\n\nSupported document types:\n- Software subscription invoices (Carta, Databricks, etc.)\n- Insurance policies (Business Owners, Liability, etc.)\n- Any prepaid expense invoice with service period\n\nReturns a ScheduleProposal that can be edited and submitted to\nPOST /{company_id} to create the actual schedule.","operationId":"upload_invoice_for_schedule_api_schedules__company_id__upload_invoice_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_invoice_for_schedule_api_schedules__company_id__upload_invoice_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleProposal"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/upload-bulk":{"post":{"tags":["schedules"],"summary":"Upload Bulk Schedules","description":"Upload an Excel file with multiple schedules in Porter's template format.","operationId":"upload_bulk_schedules_api_schedules__company_id__upload_bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_bulk_schedules_api_schedules__company_id__upload_bulk_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/create-bulk":{"post":{"tags":["schedules"],"summary":"Create Bulk Schedules","description":"Create multiple schedules from a bulk upload preview.","operationId":"create_bulk_schedules_api_schedules__company_id__create_bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkScheduleCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkScheduleCreateResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/upload-subscriptions":{"post":{"tags":["schedules"],"summary":"Upload Subscriptions","description":"Parse a subscription CSV/Excel file and return preview for review.\n\nReason: Subscriptions are just a bulk import workflow for creating\ndeferred_revenue or unbilled_revenue schedules. This endpoint parses\nthe file and returns schedule previews for user confirmation.\n\nExpected columns (flexible naming):\n- Subscription Name (required)\n- Company name (required)\n- Subscription Fee Amount (required)\n- Subscription Start Date (required)\n- Subscription End Date (required)\n- Product Type (optional revenue segment)\n- Payment Schedule (optional)\n- Payment Status (optional, determines deferred vs unbilled)","operationId":"upload_subscriptions_api_schedules__company_id__upload_subscriptions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_subscriptions_api_schedules__company_id__upload_subscriptions_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/schedules/{company_id}/generate-commissions":{"post":{"tags":["schedules"],"summary":"Generate Commissions","description":"Generate commission schedules from existing subscriptions.\n\nReason: Commission schedules are normally auto-generated after subscription imports\nvia reconcile_pending_matches(). This endpoint triggers the same logic on-demand\nfor subscriptions that existed before commissions were enabled.","operationId":"generate_commissions_api_schedules__company_id__generate_commissions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/link-token":{"post":{"tags":["plaid"],"summary":"Create Link Token","description":"Create a Plaid Link token.\n\nReason: POR-1128 — Delegates to the shared connect service so AI and MCP\nsurfaces inherit the same update-mode lookup and exception translation.","operationId":"create_link_token_api_plaid__company_id__link_token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"itemId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Itemid"}},{"name":"accountSelectionEnabled","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Accountselectionenabled"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkTokenResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/exchange-token":{"post":{"tags":["plaid"],"summary":"Exchange Public Token","description":"Exchange a public token from Plaid Link for a stored item.\n\nReason: POR-1128 — Token exchange, sync_start_date defaulting, account\nupsert, GL mapping resolution, and the initial transaction-sync seed live\nin the shared connect service so every surface that connects Plaid\ninherits the same behavior. POR-1072 — Account-level upsert handles\nsame-bank dedupe; this route no longer blocks at the institution level.","operationId":"exchange_public_token_api_plaid__company_id__exchange_token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeTokenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeTokenResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/accounts":{"get":{"tags":["plaid"],"summary":"List Bank Accounts","description":"List all connected bank accounts for the company.","operationId":"list_bank_accounts_api_plaid__company_id__accounts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidAccountsListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/balances/refresh":{"post":{"tags":["plaid"],"summary":"Refresh Account Balances","description":"Refresh cached Plaid account balances after an explicit user action.","operationId":"refresh_account_balances_api_plaid__company_id__balances_refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidBalanceRefreshResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/items/{item_id}/sync-start-date":{"patch":{"tags":["plaid"],"summary":"Update Sync Start Date","description":"Update the sync_start_date for a Plaid item.\n\nReason: POR-447 — Controls how far back Plaid imports transactions.\nChanging this date and re-syncing allows users to pull older transactions.","operationId":"update_sync_start_date_api_plaid__company_id__items__item_id__sync_start_date_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSyncStartDateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/items/{item_id}/reauth-complete":{"post":{"tags":["plaid"],"summary":"Complete Plaid Reauth","description":"Mark a Plaid item healthy after update-mode Link succeeds.\n\nReason: POR-1128 — Refresh + reauth orchestration lives in the shared\nconnect service so AI and MCP surfaces inherit the same behavior.","operationId":"complete_plaid_reauth_api_plaid__company_id__items__item_id__reauth_complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidReauthCompleteResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/accounts/{account_id}/sync":{"post":{"tags":["plaid"],"summary":"Sync Account Transactions","description":"Sync transactions for a specific bank account from Plaid.\n\nUses cursor-based pagination to fetch new, modified, and removed\ntransactions since the last sync. Stores transactions in our DB\nwith inbox_status='pending_ai_review' for subsequent AI processing.","operationId":"sync_account_transactions_api_plaid__company_id__accounts__account_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncTransactionsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/items/{item_id}":{"delete":{"tags":["plaid"],"summary":"Delete Plaid Item","description":"Disconnect a Plaid item (revokes access, deactivates accounts).\n\nReason: POR-1128 — Soft-disconnect orchestration (token revoke + account\ndeactivation + audit trail) lives in the shared connect service so every\nsurface inherits the same behavior. Transactions are NOT deleted.","operationId":"delete_plaid_item_api_plaid__company_id__items__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteItemResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/accounts/{bank_account_id}":{"delete":{"tags":["plaid"],"summary":"Disconnect Plaid Account","description":"Disconnect one account from a multi-account Plaid item.\n\nReason: POR-2690 — thin transport over the shared connect service, which owns\nsibling/last-account semantics so API and AI/MCP surfaces behave identically.\nTransactions are NOT deleted.","operationId":"disconnect_plaid_account_api_plaid__company_id__accounts__bank_account_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"string","title":"Bank Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectBankAccountResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/statements":{"get":{"tags":["plaid"],"summary":"List Statements","description":"List available bank statements across all active Plaid items.\n\nReason: Thin transport — flattening across items and token resolution live\nin the shared connect service.","operationId":"list_statements_api_plaid__company_id__statements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankStatementResponse"},"title":"Response List Statements Api Plaid  Company Id  Statements Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/statements/diagnostics":{"get":{"tags":["plaid"],"summary":"Diagnose Statements","description":"Diagnose statement availability across active Plaid items.\n\nReason: The flat statement list is intentionally just statement metadata.\nThis read-only endpoint explains why the list is empty or partial without\ntriggering Plaid's billable statement-refresh extraction path.","operationId":"diagnose_statements_api_plaid__company_id__statements_diagnostics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidStatementDiagnosticsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/{company_id}/statements/{item_id}/{statement_id}/download":{"get":{"tags":["plaid"],"summary":"Download Statement","description":"Download a single bank-statement PDF for a Plaid item.\n\nReason: Thin transport — token resolution + Plaid download live in the shared\nconnect service; the handler only validates the path and wraps the bytes in a\nPDF attachment response.","operationId":"download_statement_api_plaid__company_id__statements__item_id___statement_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"statement_id","in":"path","required":true,"schema":{"type":"string","title":"Statement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/plaid/webhook":{"post":{"tags":["plaid"],"summary":"Plaid Webhook","description":"Receive and process Plaid webhook events.\n\nReason: No auth required — Plaid calls this URL directly.\nVerification is done via the Plaid-Verification JWT header.\nReturns 200 immediately; sync runs as a background task.","operationId":"plaid_webhook_api_plaid_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-accounts/{company_id}":{"get":{"tags":["bank-accounts"],"summary":"List Bank Accounts","description":"List all connected bank accounts for the company.\n\nReason: Frontend uses this to populate the bank accounts dropdown\nin the Bank Transactions tab and Settings page.\nReturns an array directly (not wrapped in object) per frontend expectations.","operationId":"list_bank_accounts_api_bank_accounts__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankAccountCoverageResponse"},"title":"Response List Bank Accounts Api Bank Accounts  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-accounts/{company_id}/{bank_account_id}/qbo-mapping":{"patch":{"tags":["bank-accounts"],"summary":"Update Bank Account Gl Mapping","description":"Link a bank account to a Porter Chart of Accounts account.\n\nReason: Bank accounts from Plaid should point at accounts.id internally.\nQBO AccountRef ids are resolved later only when Porter writes to QBO.","operationId":"update_bank_account_gl_mapping_api_bank_accounts__company_id___bank_account_id__qbo_mapping_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"string","title":"Bank Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountGlMappingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountCoverageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-accounts/{company_id}/{bank_account_id}/gl-mapping":{"patch":{"tags":["bank-accounts"],"summary":"Update Bank Account Gl Mapping","description":"Link a bank account to a Porter Chart of Accounts account.\n\nReason: Bank accounts from Plaid should point at accounts.id internally.\nQBO AccountRef ids are resolved later only when Porter writes to QBO.","operationId":"update_bank_account_gl_mapping_api_bank_accounts__company_id___bank_account_id__gl_mapping_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"string","title":"Bank Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountGlMappingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountCoverageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-accounts/{company_id}/{account_id}/statement-close-day":{"patch":{"tags":["bank-accounts"],"summary":"Update Statement Close Day","description":"Set the statement close day for a bank or credit card account.\n\nReason: POR-316 — reconciliation must scope to the account's billing cycle, not the\ncalendar month. A value of 19 means the statement closes on the 19th of each month.\nnull resets to end-of-month (default behavior for bank accounts).","operationId":"update_statement_close_day_api_bank_accounts__company_id___account_id__statement_close_day_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementCloseDayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountCoverageResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}":{"get":{"tags":["bank-transactions"],"summary":"List Bank Transactions","description":"List bank transactions for a company with filtering and pagination.\n\nReason: Adapter only — checking/savings account scoping, flagged-id\nintersection, and flag-label hydration live in\n`list_bank_transactions_for_company` so AI/MCP/jobs surfaces share them.","operationId":"list_bank_transactions_api_bank_transactions__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BankTransactionStatus"},{"type":"null"}],"title":"Status"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BankTransactionType"},{"type":"null"}],"title":"Type"}},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"hasPolicyFlags","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Haspolicyflags"}},{"name":"missingCounterparty","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Missingcounterparty"}},{"name":"includeExcluded","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeexcluded"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"date","title":"Sortby"}},{"name":"sortDirection","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","default":"desc"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionsListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/ai-progress":{"get":{"tags":["bank-transactions"],"summary":"Get Ai Categorization Progress","description":"Lightweight endpoint for global AI categorization progress polling.\n\nReason: The full stats endpoint is too heavy for 3s polling from every page.\nService owns the snapshot so MCP/cron can read the same state.","operationId":"get_ai_categorization_progress_api_bank_transactions__company_id__ai_progress_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/category-suggestions":{"post":{"tags":["bank-transactions"],"summary":"Suggest Bank Transaction Categories Endpoint","description":"Return read-only category suggestions for existing bank/card rows.","operationId":"suggest_bank_transaction_categories_endpoint_api_bank_transactions__company_id__category_suggestions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionCategorySuggestionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionCategorySuggestionsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/stats":{"get":{"tags":["bank-transactions"],"summary":"Get Bank Transaction Stats","description":"Get statistics for bank transactions.\n\nReason: Adapter only — checking/savings scoping, flag-id intersection, and\nprogress hydration live in `summarize_bank_transactions` so list and stats\nbadges stay in lockstep regardless of caller.","operationId":"get_bank_transaction_stats_api_bank_transactions__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"bankAccountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"hasPolicyFlags","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Haspolicyflags"}},{"name":"missingCounterparty","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Missingcounterparty"}},{"name":"includeExcluded","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeexcluded"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionStats"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/pipeline-health":{"get":{"tags":["bank-transactions"],"summary":"Get Pipeline Health","description":"Return aggregate pipeline health metrics from row-backed trace JSON.","operationId":"get_pipeline_health_api_bank_transactions__company_id__pipeline_health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineHealthResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/pipeline-trace":{"get":{"tags":["bank-transactions"],"summary":"Get Pipeline Trace","description":"Return the latest per-stage trace stored on the transaction row.","operationId":"get_pipeline_trace_api_bank_transactions__company_id___transaction_id__pipeline_trace_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTraceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}":{"get":{"tags":["bank-transactions"],"summary":"Get Bank Transaction","description":"Get a single bank transaction by ID.\n\nReason: Detail-drawer parity with the list view requires the same flag-\nlabel hydration; the service owns that so every surface gets identical fields.","operationId":"get_bank_transaction_api_bank_transactions__company_id___transaction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/pipeline/normalize":{"post":{"tags":["bank-transactions"],"summary":"Pipeline Normalize","description":"Refresh party match keys on selected or defaulted transactions.","operationId":"pipeline_normalize_api_bank_transactions__company_id__pipeline_normalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/pipeline/detect-duplicates":{"post":{"tags":["bank-transactions"],"summary":"Pipeline Detect Duplicates","description":"Run posted-ledger match detection + cross-source dedup on selected or defaulted transactions.","operationId":"pipeline_detect_duplicates_api_bank_transactions__company_id__pipeline_detect_duplicates_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/pipeline/categorize":{"post":{"tags":["bank-transactions"],"summary":"Pipeline Categorize","description":"Run categorization pipeline (rules + AI) on selected or defaulted transactions.","operationId":"pipeline_categorize_api_bank_transactions__company_id__pipeline_categorize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/categorize":{"post":{"tags":["bank-transactions"],"summary":"Categorize Transaction","description":"Categorize a bank transaction via the shared command boundary.","operationId":"categorize_transaction_api_bank_transactions__company_id___transaction_id__categorize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/unpost":{"post":{"tags":["bank-transactions"],"summary":"Unpost Transaction","description":"Unpost one posted bank transaction (delete its QBO entity) — POR-1363.\n\nPer-row Unpost so a posted row can be corrected (e.g. wrong category) without\nreverting its whole posting batch. Blocked when the period is closed or the\ntransaction is not posted.","operationId":"unpost_transaction_api_bank_transactions__company_id___transaction_id__unpost_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/exclude":{"post":{"tags":["bank-transactions"],"summary":"Exclude Transaction","description":"Exclude a bank transaction from the books.\n\nReason: User marks a transaction as excluded (e.g., personal expense on business account).\nExcluded transactions are not synced to QBO.","operationId":"exclude_transaction_api_bank_transactions__company_id___transaction_id__exclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/app__api__bank_transactions__ExcludeRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/unlink-movement":{"post":{"tags":["bank-transactions"],"summary":"Unlink Internal Movement","description":"Unlink an internal movement pair.\n\nReason: POR-230 — clears internal movement flags on both sides and reverts\nthe excluded side to needs_review via the shared service.","operationId":"unlink_internal_movement_api_bank_transactions__company_id___transaction_id__unlink_movement_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlinkMovementResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/status":{"patch":{"tags":["bank-transactions"],"summary":"Update Transaction Status","description":"Manually change a bank transaction's status.\n\nReason: POR-244 — editable status pill in the detail drawer. Enforces\ntransition rules: system-only statuses blocked, preconditions checked,\nexcluded-boundary transitions go through the dedicated repo methods.","operationId":"update_transaction_status_api_bank_transactions__company_id___transaction_id__status_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/bulk-exclude":{"post":{"tags":["bank-transactions"],"summary":"Bulk Exclude Transactions","description":"Bulk exclude multiple transactions.\n\nReason: POR-27 — user selects multiple transactions and excludes them.\nUses per-row previous_status preservation via repository.","operationId":"bulk_exclude_transactions_api_bank_transactions__company_id__bulk_exclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__bank_transactions__BulkExcludeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__bank_transactions__BulkExcludeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/bulk-post":{"post":{"tags":["bank-transactions"],"summary":"Bulk Post Bank Transactions","description":"Bulk approve and post complete bank transactions.\n\nReason: QBO-connected companies still push to QuickBooks. Porter-only\ncompanies can finalize the transactions locally without a QBO write.\nWhen the company has a QBO realm but stale tokens,\n``resolve_posting_target`` raises ``QboReconnectRequiredError`` (409)\nso the frontend can drive reconnect before any ledger is touched —\nPorter and QBO must never diverge.","operationId":"bulk_post_bank_transactions_api_bank_transactions__company_id__bulk_post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__bank_transactions__BulkPostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/bulk-categorize":{"post":{"tags":["bank-transactions"],"summary":"Bulk Categorize Transactions","description":"Bulk-update bank transactions via the shared command boundary.","operationId":"bulk_categorize_transactions_api_bank_transactions__company_id__bulk_categorize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__bank_transactions__BulkCategorizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__bank_transactions__BulkCategorizeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/confirm-match":{"post":{"tags":["bank-transactions"],"summary":"Confirm Match","description":"Confirm a match candidate — user agrees with the proposed posted-ledger match.\n\nReason: POR-26 — confirms a proposed posted-ledger match for this transaction.","operationId":"confirm_match_api_bank_transactions__company_id___transaction_id__confirm_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/reject-match":{"post":{"tags":["bank-transactions"],"summary":"Reject Match","description":"Reject a match candidate — user disagrees with the proposed posted-ledger match.\n\nReason: POR-26 — match_candidate → needs_review, clear match fields.","operationId":"reject_match_api_bank_transactions__company_id___transaction_id__reject_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/bulk-confirm-match":{"post":{"tags":["bank-transactions"],"summary":"Bulk Confirm Match","description":"Bulk confirm match for multiple posted-ledger match candidates.\n\nReason: Confirmed matches are excluded (status='excluded', exclusion_reason='qbo_match')\nsince the GL entry already exists in the posted ledger evidence and must not\nbe re-posted.","operationId":"bulk_confirm_match_api_bank_transactions__company_id__bulk_confirm_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkConfirmMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkConfirmMatchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/import-batch/{batch_id}":{"delete":{"tags":["bank-transactions"],"summary":"Delete Import Batch","description":"Delete all transactions from an import batch.\n\nReason: POR-22 — allows users to undo a wrong file upload.\nBlocked if any transactions in the batch have status 'posted' or 'matched'.","operationId":"delete_import_batch_api_bank_transactions__company_id__import_batch__batch_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteBatchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/{transaction_id}/record-payment":{"post":{"tags":["bank-transactions"],"summary":"Record Direct Payment","description":"Record a direct customer payment against an open invoice.\n\nReason: POR-115 — bank deposits categorized as A/R represent wire/ACH payments\nfrom customers. Delegates to repo for multi-repo orchestration (payment creation,\ninvoice application, GL entries, status update).","operationId":"record_direct_payment_api_bank_transactions__company_id___transaction_id__record_payment_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordDirectPaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordDirectPaymentResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/sync":{"post":{"tags":["bank-transactions"],"summary":"Sync Bank Transactions","description":"Sync bank transactions from Plaid for all accounts or a specific account.\n\nReason: User triggers a manual Plaid source-adapter run. The queued worker\nhandles item cursor mechanics and then feeds the shared bank transaction\nwrite and post-import pipeline.","operationId":"sync_bank_transactions_api_bank_transactions__company_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Reset cursor and re-fetch all transactions","default":false,"title":"Force"},"description":"Reset cursor and re-fetch all transactions"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/app__api__bank_transactions__SyncResponse"},{"$ref":"#/components/schemas/SyncJobStartResponse"}],"title":"Response Sync Bank Transactions Api Bank Transactions  Company Id  Sync Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/preview":{"post":{"tags":["bank-transactions"],"summary":"Preview Bank Transactions Batch","description":"Stateless preview for the direct batch import path.\n\nReason: Direct path replacing prepare_import_dataset for bank transactions.\nNo dataset_id, no DB writes — parses the file and returns rows the frontend\nrenders, then submits back via /batch.\n\nPOR-942: accepts a `columnMapping` query param so the dialog's column-remap\nUI flows through the same canonical endpoint instead of falling back to\nthe legacy `/upload/preview-with-mapping` route.","operationId":"preview_bank_transactions_batch_api_bank_transactions__company_id__preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"bankAccountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"}},{"name":"columnMapping","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Columnmapping"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_bank_transactions_batch_api_bank_transactions__company_id__preview_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionImportPreview"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bank-transactions/{company_id}/batch":{"post":{"tags":["bank-transactions"],"summary":"Batch Create Bank Transactions","description":"Direct batch create of bank transactions from confirmed preview rows.\n\nReason: Replaces the import_prepared_dataset adapter path. Calls the canonical\nbatch writer (create_bank_transactions) which both UI and AI now share.","operationId":"batch_create_bank_transactions_api_bank_transactions__company_id__batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"async","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Async"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransactionBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Batch Create Bank Transactions Api Bank Transactions  Company Id  Batch Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/transaction-search/{company_id}":{"get":{"tags":["transaction-search"],"summary":"Search Transactions","description":"Search all transaction-like records through one normalized projection.","operationId":"search_transactions_api_transaction_search__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"transactionType","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Transactiontype"}},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"amountMin","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amountmin"}},{"name":"amountMax","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amountmax"}},{"name":"counterparty","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"}},{"name":"account","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionSearchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/object-relationships/{company_id}/{object_type}/{object_id}":{"get":{"tags":["object-relationships"],"summary":"Get Relationship Graph","description":"Return a nearby relationship graph for a concrete accounting object.","operationId":"get_relationship_graph_api_object_relationships__company_id___object_type___object_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type","in":"path","required":true,"schema":{"enum":["account","bank_account","bank_transaction","credit_card_transaction","customer","invoice","payment","bill","vendor_credit","bill_payment","journal_entry","ledger_event","vendor","workflow_record"],"type":"string","title":"Object Type"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string","title":"Object Id"}},{"name":"excludeNodeId","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Excludenodeid"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRelationshipGraph"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/{company_id}/subscription":{"get":{"tags":["billing","billing"],"summary":"Get Customer Subscription","description":"Return the current company's billing subscription status.","operationId":"get_customer_subscription_api_billing__company_id__subscription_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/{company_id}/checkout-session":{"post":{"tags":["billing","billing"],"summary":"Create Customer Checkout Session","description":"Create a Stripe Checkout Session from the current billing offer.","operationId":"create_customer_checkout_session_api_billing__company_id__checkout_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Create Customer Checkout Session Api Billing  Company Id  Checkout Session Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/{company_id}/redeem-code":{"post":{"tags":["billing","billing"],"summary":"Redeem Customer Billing Code","description":"Attach an access code's billing terms to the current company.","operationId":"redeem_customer_billing_code_api_billing__company_id__redeem_code_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemBillingAccessCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/{company_id}/confirm-session":{"post":{"tags":["billing","billing"],"summary":"Confirm Customer Checkout Session","description":"Confirm a completed Settings-launched Stripe Checkout session.","operationId":"confirm_customer_checkout_session_api_billing__company_id__confirm_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmOnboardingCheckoutSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/{company_id}/cancel":{"post":{"tags":["billing","billing"],"summary":"Cancel Customer Subscription","description":"Schedule Stripe subscription cancellation at period end.","operationId":"cancel_customer_subscription_api_billing__company_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBillingSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/{company_id}/portal-session":{"post":{"tags":["billing","billing"],"summary":"Create Customer Portal Session","description":"Create a Stripe Billing Portal session for the current company.","operationId":"create_customer_portal_session_api_billing__company_id__portal_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalSessionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/onboarding/{company_id}/checkout-session":{"post":{"tags":["billing","billing"],"summary":"Create Checkout Session","description":"Create a Stripe Checkout Session from the company's redemption-code terms.\n\nReason: POR-1590 — the redeemed code now carries the subscription terms, so\ncheckout no longer takes a `plan`. A $0 comp code grants access without a\nStripe charge; a priced code starts checkout against the code's exact price.","operationId":"create_checkout_session_api_billing_onboarding__company_id__checkout_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Create Checkout Session Api Billing Onboarding  Company Id  Checkout Session Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/onboarding/{company_id}/confirm-session":{"post":{"tags":["billing","billing"],"summary":"Confirm Checkout Session","description":"Confirm a successful Stripe Checkout return before unlocking onboarding.","operationId":"confirm_checkout_session_api_billing_onboarding__company_id__confirm_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmOnboardingCheckoutSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Confirm Checkout Session Api Billing Onboarding  Company Id  Confirm Session Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/billing/stripe/webhook":{"post":{"tags":["billing","billing"],"summary":"Stripe Webhook","description":"Receive and process Stripe webhook events.","operationId":"stripe_webhook_api_billing_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Stripe Webhook Api Billing Stripe Webhook Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}":{"get":{"tags":["credit-cards"],"summary":"List Credit Card Transactions","description":"List credit card transactions for the company.\n\nReason: Returns transactions from credit card accounts in InboxItem format.\nCredit card transactions come from bank_transactions where the account is a credit card.","operationId":"list_credit_card_transactions_api_credit_cards__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"cardAccountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardaccountid"}},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"missingCounterparty","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Missingcounterparty"}},{"name":"includeExcluded","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeexcluded"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"txnDate","title":"Sortby"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sortdirection"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":25,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardTransactionsListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/stats":{"get":{"tags":["credit-cards"],"summary":"Get Credit Card Stats","description":"Get statistics for credit card transactions.\n\nReason: Provides counts for filter tabs (All, Pending, Ready, etc.)\nAccepts optional date range to match the transactions list view filtering.","operationId":"get_credit_card_stats_api_credit_cards__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"bankAccountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"missingCounterparty","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Missingcounterparty"}},{"name":"includeExcluded","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeexcluded"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardStats"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/{item_id}":{"get":{"tags":["credit-cards"],"summary":"Get Credit Card Transaction","description":"Get a single credit card transaction detail.","operationId":"get_credit_card_transaction_api_credit_cards__company_id___item_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["credit-cards"],"summary":"Update Credit Card Transaction","description":"Update a credit card transaction.\n\nReason: Supports inline editing of transaction fields.\nAuto-transitions status: needs_review → ready when account is assigned.","operationId":"update_credit_card_transaction_api_credit_cards__company_id___item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTransactionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/{item_id}/exclude":{"post":{"tags":["credit-cards"],"summary":"Exclude Credit Card Transaction","description":"Exclude a credit card transaction from books.","operationId":"exclude_credit_card_transaction_api_credit_cards__company_id___item_id__exclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__credit_cards__ExcludeRequest","default":{"reason":""}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/{item_id}/unexclude":{"post":{"tags":["credit-cards"],"summary":"Unexclude Credit Card Transaction","description":"Restore an excluded credit card transaction.\n\nReason: Allows users to un-exclude transactions that were incorrectly excluded.\nRestores the transaction to its previous status before exclusion.\nFalls back to needs_review for legacy data without previous_status.","operationId":"unexclude_credit_card_transaction_api_credit_cards__company_id___item_id__unexclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/bulk-categorize":{"post":{"tags":["credit-cards"],"summary":"Bulk Categorize Credit Card Transactions","description":"Bulk-update multiple credit card transactions.","operationId":"bulk_categorize_credit_card_transactions_api_credit_cards__company_id__bulk_categorize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__credit_cards__BulkCategorizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__credit_cards__BulkCategorizeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/bulk-exclude":{"post":{"tags":["credit-cards"],"summary":"Bulk Exclude Credit Card Transactions","description":"Bulk exclude multiple credit card transactions.\n\nReason: Frontend previously called individual exclude endpoints in a loop.\nThis endpoint handles the batch in one request. Each transaction's previous_status\nis preserved individually so un-exclude restores the correct prior state.","operationId":"bulk_exclude_credit_card_transactions_api_credit_cards__company_id__bulk_exclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__credit_cards__BulkExcludeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__credit_cards__BulkExcludeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/bulk-post":{"post":{"tags":["credit-cards"],"summary":"Bulk Post Credit Card Transactions","description":"Bulk post ready credit card transactions.\n\nReason: QBO-connected companies still push Purchases to QuickBooks. Porter-only\ncompanies can still finalize the transactions locally. ``resolve_posting_target``\nraises ``QboReconnectRequiredError`` (409) when qbo_realm_id is present but\ntokens are missing/stale, so we never write one ledger without the other.","operationId":"bulk_post_credit_card_transactions_api_credit_cards__company_id__bulk_post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__credit_cards__BulkPostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/manual":{"post":{"tags":["credit-cards"],"summary":"Create Manual Credit Card Transaction","description":"Create a manual credit card transaction.\n\nReason: Users need to add transactions that weren't in a CSV import\n(e.g., transactions from a provider not yet supported, or one-off entries).\nManual transactions start in needs_review status since they need categorization.","operationId":"create_manual_credit_card_transaction_api_credit_cards__company_id__manual_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualTransactionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-cards/{company_id}/import-batch/{batch_id}":{"delete":{"tags":["credit-cards"],"summary":"Undo Import Batch","description":"Delete all transactions from an import batch.\n\nReason: Allows users to undo an entire import if they uploaded the wrong file\nor wrong account. Only allowed if no transactions from the batch have been\nposted to QBO (synced_at is set).","operationId":"undo_import_batch_api_credit_cards__company_id__import_batch__batch_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUndoResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-card-transactions/{company_id}/preview":{"post":{"tags":["credit-card-transactions"],"summary":"Preview Credit Card Transactions","description":"Parse + resolve a CC CSV/Excel.\n\n# Reason: Stateless. Accepts an optional columnMapping JSON query param so\n# the dialog's \"remap columns\" UI doesn't need a separate legacy endpoint.\n# Account identity must come from row account_name values or explicit row-level\n# overrides in the resolved rows submitted to /batch.","operationId":"preview_credit_card_transactions_api_credit_card_transactions__company_id__preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"columnMapping","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Columnmapping"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_credit_card_transactions_api_credit_card_transactions__company_id__preview_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardPreviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/credit-card-transactions/{company_id}/batch":{"post":{"tags":["credit-card-transactions"],"summary":"Batch Create Credit Card Transactions","description":"Atomic write of resolved rows.\n\n# Reason: Symmetric to /preview output. Caller submits ResolvedCreditCardRow\n# objects. If any row's FKs (bank_account_id / vendor_id / category_account_id)\n# are null AND the row's parsed sub-object has the corresponding text fields\n# (account_name / vendor_name / category), we run the resolver just-in-time\n# so callers (especially the dialog) don't lose feature parity when they\n# submit \"thin\" rows. AI tools / dialog v2 may pre-resolve via /preview\n# and skip the JIT step.","operationId":"batch_create_credit_card_transactions_api_credit_card_transactions__company_id__batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardWriteResult"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/payments":{"get":{"tags":["bills"],"summary":"List Bill Payments","description":"List AP payments for a company.\n\nReason: POR-1997 — the payable side of the transactions workspace was\nmissing its settlement half. Declared BEFORE the `/{company_id}` bill list\nroute so the literal `/payments` segment is not captured as a company id.","operationId":"list_bill_payments_api_bills__company_id__payments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"vendorName","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"}},{"name":"matchStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchstatus"}},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillPaymentListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}":{"get":{"tags":["bills"],"summary":"List Bills","description":"List bills for a company with optional filtering and pagination.","operationId":"list_bills_api_bills__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BillStatus"},{"type":"null"}],"title":"Status"}},{"name":"vendorId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"}},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sortBy","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BillSortField","default":"date"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","description":"Sort direction: asc or desc","default":"desc","title":"Sortdirection"},"description":"Sort direction: asc or desc"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["bills"],"summary":"Create Bill","description":"Create a new bill.\n\nThe bill will be created in pending status initially.\nAccount-coded line items are preserved on the Draft; approving the bill\nopens AP and creates native bill_initial_gl.","operationId":"create_bill_api_bills__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/stats":{"get":{"tags":["bills"],"summary":"Get Bill Stats","description":"Get bill statistics for a company.\n\nReturns counts by status and total amount due across all unpaid bills.","operationId":"get_bill_stats_api_bills__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillStatsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/ap-balance":{"get":{"tags":["bills"],"summary":"Get Ap Balance","description":"Get A/P aging balance as of a specific date.\n\nReason: POR-173 — Powers the A/P Detail Drawer. Returns total open A/P,\naging buckets (current, 1-30, 31-60, 61-90, 90+), and a list of all open\nbills as of the given date. A bill is open if bill_date <= as_of_date\nand remaining_balance > 0 after applying payments with payment_date <= as_of_date.","operationId":"get_ap_balance_api_bills__company_id__ap_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"as_of_date","in":"query","required":true,"schema":{"type":"string","description":"Date for A/P balance calculation (YYYY-MM-DD)","title":"As Of Date"},"description":"Date for A/P balance calculation (YYYY-MM-DD)"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APBalanceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/vendor-credits":{"post":{"tags":["bills"],"summary":"Create Vendor Credit","description":"Create one Porter-owned vendor credit.","operationId":"create_vendor_credit_api_bills__company_id__vendor_credits_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorCreditCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}":{"get":{"tags":["bills"],"summary":"Get Bill","description":"Get a single bill by ID.","operationId":"get_bill_api_bills__company_id___bill_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["bills"],"summary":"Update Bill","description":"Update an existing bill.\n\nOnly provided fields will be updated (partial update).\nBills in paid status cannot be modified.","operationId":"update_bill_api_bills__company_id___bill_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["bills"],"summary":"Delete Bill","description":"Delete a bill.\n\nOnly draft bills can be deleted. Bills with payments must be voided instead.","operationId":"delete_bill_api_bills__company_id___bill_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/documents":{"get":{"tags":["bills"],"summary":"List Bill Documents","description":"List source documents attached to a bill, with signed download URLs.\n\nReason: POR-1561 — QBO sync persists the PDFs/invoices attached to a\nQuickBooks Bill as Porter documents linked with target_type='bill'; this\nsurfaces them (openable) on the bill detail drawer. Same read for\nmanual/email PDF-intake evidence.","operationId":"list_bill_documents_api_bills__company_id___bill_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillDocumentResponse"},"title":"Response List Bill Documents Api Bills  Company Id   Bill Id  Documents Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/documents/{document_id}/download":{"get":{"tags":["bills"],"summary":"Download Bill Document","description":"Download a stored source document attached to one bill.","operationId":"download_bill_document_api_bills__company_id___bill_id__documents__document_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/gl-account":{"patch":{"tags":["bills"],"summary":"Update Bill Gl Account Route","description":"Recategorize one unposted single-account bill.","operationId":"update_bill_gl_account_route_api_bills__company_id___bill_id__gl_account_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillGlAccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/approve":{"post":{"tags":["bills"],"summary":"Approve Bill","description":"Approve a bill for payment.\n\nMoves the bill from pending_approval to approved status.\nRecords the approver and approval timestamp.","operationId":"approve_bill_api_bills__company_id___bill_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/bulk-post":{"post":{"tags":["bills"],"summary":"Bulk Post Bills","description":"Post selected draft bills into open AP through the AP approval command.","operationId":"bulk_post_bills_api_bills__company_id__bulk_post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostBillsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostBillsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/pay":{"post":{"tags":["bills"],"summary":"Record Payment","description":"Record a payment against a bill.\n\nPartial payments are supported. When the bill is fully paid,\nstatus changes to 'paid'.","operationId":"record_payment_api_bills__company_id___bill_id__pay_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/payments/{bill_payment_id}/match-bank-debit":{"post":{"tags":["bills"],"summary":"Match Payment To Bank Debit","description":"Match a recorded bill payment to exact synced bank-debit evidence.","operationId":"match_payment_to_bank_debit_api_bills__company_id___bill_id__payments__bill_payment_id__match_bank_debit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"bill_payment_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillPaymentDebitMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillPaymentDebitMatchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/payments/{bill_payment_id}/bank-debit-candidates":{"get":{"tags":["bills"],"summary":"Preview Payment Bank Debit Candidates","description":"Read current AP bank-debit candidates without matching them.","operationId":"preview_payment_bank_debit_candidates_api_bills__company_id___bill_id__payments__bill_payment_id__bank_debit_candidates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"bill_payment_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillPaymentDebitMatchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/payments/{bill_payment_id}/resolve-bank-debit-review/{decision}":{"post":{"tags":["bills"],"summary":"Resolve Bill Payment Bank Debit Review","description":"Confirm or dismiss a durable ambiguous AP bank-debit candidate.","operationId":"resolve_bill_payment_bank_debit_review_api_bills__company_id___bill_id__payments__bill_payment_id__resolve_bank_debit_review__decision__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"bill_payment_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Payment Id"}},{"name":"decision","in":"path","required":true,"schema":{"enum":["confirm","reject"],"type":"string","title":"Decision"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResolveBillPaymentBankCandidateReviewRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BillPaymentDebitMatchResponse"},{"type":"null"}],"title":"Response Resolve Bill Payment Bank Debit Review Api Bills  Company Id   Bill Id  Payments  Bill Payment Id  Resolve Bank Debit Review  Decision  Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/void":{"post":{"tags":["bills"],"summary":"Void Bill","description":"Void a bill.\n\nVoided bills are excluded from AP calculations and balance counts.\nThis is a business decision (stored flag), unlike paid/unpaid status which is computed.","operationId":"void_bill_api_bills__company_id___bill_id__void_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/unvoid":{"post":{"tags":["bills"],"summary":"Unvoid Bill","description":"Unvoid (restore) a previously voided bill.\n\nClears the void flag and restores the bill to its normal computed status\nbased on payment applications.","operationId":"unvoid_bill_api_bills__company_id___bill_id__unvoid_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/write-off":{"post":{"tags":["bills"],"summary":"Write Off Bill","description":"Write off the remaining open balance of a bill.","operationId":"write_off_bill_api_bills__company_id___bill_id__write_off_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillWriteOffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/vendor-credit-matches":{"get":{"tags":["bills"],"summary":"Get Vendor Credit Matches","description":"Return unapplied same-vendor credits that can reduce a bill.","operationId":"get_vendor_credit_matches_api_bills__company_id___bill_id__vendor_credit_matches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorCreditMatchSuggestion"},"title":"Response Get Vendor Credit Matches Api Bills  Company Id   Bill Id  Vendor Credit Matches Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/{bill_id}/apply-credit":{"post":{"tags":["bills"],"summary":"Apply Vendor Credit","description":"Apply an existing vendor credit to a bill.","operationId":"apply_vendor_credit_api_bills__company_id___bill_id__apply_credit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bill_id","in":"path","required":true,"schema":{"type":"string","title":"Bill Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillApplyVendorCreditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/upload":{"post":{"tags":["bills"],"summary":"Upload Bill","description":"Upload a bill PDF for extraction.\n\nUses OpenAI to extract vendor, dates, amounts, and line items from the PDF.\nReturns extracted data for user review and can optionally write/update a Draft\nPorter bill. No writes to QBO.","operationId":"upload_bill_api_bills__company_id__upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_bill_api_bills__company_id__upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/evaluate-schedule-flags":{"post":{"tags":["bills"],"summary":"Evaluate Schedule Flags","description":"Evaluate bills for potential schedule needs (prepaid, fixed asset, etc.).\n\nReason: POR-238 — Runs the BillScheduleDetector to identify bills that\nlikely represent prepaid expenses, fixed assets, or other items requiring\namortization/depreciation schedules. Creates flags in transaction_policy_flags\nthat surface in the \"Potential Schedule?\" column on the bills list.","operationId":"evaluate_schedule_flags_api_bills__company_id__evaluate_schedule_flags_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluateScheduleFlagsRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateScheduleFlagsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/bills/{company_id}/sync":{"post":{"tags":["bills"],"summary":"Sync Bills","description":"Sync bills from QuickBooks Online.\n\nThis will fetch all bills from QBO and update the local database.","operationId":"sync_bills_api_bills__company_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__bills__SyncResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}":{"get":{"tags":["invoices"],"summary":"List Invoices","description":"List invoices for a company with optional filtering and pagination.","operationId":"list_invoices_api_invoices__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/InvoiceStatus"},{"type":"null"}],"title":"Status"}},{"name":"matchStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchstatus"}},{"name":"postingStatus","in":"query","required":false,"schema":{"enum":["posted","pending","all"],"type":"string","default":"all","title":"Postingstatus"}},{"name":"customerId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"}},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sortBy","in":"query","required":false,"schema":{"$ref":"#/components/schemas/InvoiceSortField","default":"date"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","description":"Sort direction: asc or desc","default":"desc","title":"Sortdirection"},"description":"Sort direction: asc or desc"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["invoices"],"summary":"Create Invoice","description":"Create a new canonical invoice.","operationId":"create_invoice_api_invoices__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/stats":{"get":{"tags":["invoices"],"summary":"Get Invoice Stats","description":"Get invoice statistics for a company.","operationId":"get_invoice_stats_api_invoices__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateto"}},{"name":"asOfDate","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asofdate"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceStatsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/ar-balance":{"get":{"tags":["invoices"],"summary":"Get Ar Balance","description":"Get accounts receivable balance and aging report as of a specific date.","operationId":"get_ar_balance_api_invoices__company_id__ar_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"asOfDate","in":"query","required":true,"schema":{"type":"string","description":"Date to compute A/R balance as of (YYYY-MM-DD)","title":"Asofdate"},"description":"Date to compute A/R balance as of (YYYY-MM-DD)"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ARBalanceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}":{"get":{"tags":["invoices"],"summary":"Get Invoice","description":"Get a single invoice by ID.","operationId":"get_invoice_api_invoices__company_id___invoice_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["invoices"],"summary":"Update Invoice","description":"Update an existing invoice (partial update; entity_change_log captures row history).","operationId":"update_invoice_api_invoices__company_id___invoice_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["invoices"],"summary":"Delete Invoice","operationId":"delete_invoice_api_invoices__company_id___invoice_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Delete Invoice"}},"/api/invoices/{company_id}/{invoice_id}/authoring":{"get":{"tags":["invoices"],"summary":"Get Invoice Edit Prefill","description":"Return the full authoring payload to prefill the invoice edit page (POR-1603).","operationId":"get_invoice_edit_prefill_api_invoices__company_id___invoice_id__authoring_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceAuthoringResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/reauthor":{"post":{"tags":["invoices"],"summary":"Reauthor Invoice","description":"Apply supplied edits through the shared unposted invoice command.","operationId":"reauthor_invoice_api_invoices__company_id___invoice_id__reauthor_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceReauthor"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/post-to-qbo":{"post":{"tags":["invoices"],"summary":"Post Invoice To Qbo","description":"Post a Porter invoice to QuickBooks as a QBO Invoice.","operationId":"post_invoice_to_qbo_api_invoices__company_id___invoice_id__post_to_qbo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostInvoiceToQBOResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/unpost":{"post":{"tags":["invoices"],"summary":"Unpost Invoice","description":"Unpost an invoice so it can be edited through the canonical authoring flow.","operationId":"unpost_invoice_api_invoices__company_id___invoice_id__unpost_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/bulk-post-to-qbo":{"post":{"tags":["invoices"],"summary":"Bulk Post Invoices To Qbo","description":"Post selected Porter invoices through the shared invoice posting command.","operationId":"bulk_post_invoices_to_qbo_api_invoices__company_id__bulk_post_to_qbo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostInvoicesToQBORequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostInvoicesToQBOResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/sync":{"post":{"tags":["invoices"],"summary":"Sync Invoices","description":"Sync invoices from QuickBooks Online.\n\nThis will fetch all invoices from QBO and update the local database.","operationId":"sync_invoices_api_invoices__company_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__invoices__SyncResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/preview":{"post":{"tags":["invoices"],"summary":"Preview Invoices","description":"Stateless preview: parse a CSV/Excel file and return preview rows.","operationId":"preview_invoices_api_invoices__company_id__preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"columnMapping","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Columnmapping"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_invoices_api_invoices__company_id__preview_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceImportPreview"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/batch":{"post":{"tags":["invoices"],"summary":"Batch Create Invoices","description":"Direct batch create that routes through the canonical invoice import service.","operationId":"batch_create_invoices_api_invoices__company_id__batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"async","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Async"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceBatchRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvoiceBatchResult"},{"$ref":"#/components/schemas/SyncJobStartResponse"}],"title":"Response Batch Create Invoices Api Invoices  Company Id  Batch Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/match-suggestions":{"get":{"tags":["invoices"],"summary":"Get Match Suggestions","description":"Get customer and subscription matching suggestions for an invoice.","operationId":"get_match_suggestions_api_invoices__company_id___invoice_id__match_suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchSuggestionsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/link-customer":{"post":{"tags":["invoices"],"summary":"Link Invoice To Customer","description":"Link an invoice to a customer.","operationId":"link_invoice_to_customer_api_invoices__company_id___invoice_id__link_customer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__services__invoices__linking__LinkCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/link-subscription":{"post":{"tags":["invoices"],"summary":"Link Invoice To Subscription","description":"Link an invoice to a subscription and create subscription event.","operationId":"link_invoice_to_subscription_api_invoices__company_id___invoice_id__link_subscription_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkSubscriptionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/unlink":{"delete":{"tags":["invoices"],"summary":"Unlink Invoice From Subscription","description":"Unlink an invoice from its subscription.","operationId":"unlink_invoice_from_subscription_api_invoices__company_id___invoice_id__unlink_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/void":{"post":{"tags":["invoices"],"summary":"Void Invoice","description":"Void an invoice (state validation + GL reversal in the service).","operationId":"void_invoice_api_invoices__company_id___invoice_id__void_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VoidInvoiceRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/unvoid":{"post":{"tags":["invoices"],"summary":"Unvoid Invoice","description":"Unvoid (restore) a previously voided invoice.","operationId":"unvoid_invoice_api_invoices__company_id___invoice_id__unvoid_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/write-off":{"post":{"tags":["invoices"],"summary":"Write Off Invoice","description":"Write off an invoice as bad debt (POR-192) or reverse its revenue (POR-2322).","operationId":"write_off_invoice_api_invoices__company_id___invoice_id__write_off_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteOffInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/unwrite-off":{"post":{"tags":["invoices"],"summary":"Unwrite Off Invoice","description":"Reverse a write-off (restore invoice to A/R).","operationId":"unwrite_off_invoice_api_invoices__company_id___invoice_id__unwrite_off_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/adjust":{"post":{"tags":["invoices"],"summary":"Adjust Invoice","description":"Adjust an invoice amount (delta + GL entries + row-version audit).","operationId":"adjust_invoice_api_invoices__company_id___invoice_id__adjust_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceAdjustmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/issue":{"post":{"tags":["invoices"],"summary":"Issue Invoice","description":"Explicitly issue a canonical invoice by generating and sending its PDF.","operationId":"issue_invoice_api_invoices__company_id___invoice_id__issue_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueInvoiceResult"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/mark-issued":{"post":{"tags":["invoices"],"summary":"Mark Issued","description":"Mark a Created invoice Issued after delivery outside Porter.","operationId":"mark_issued_api_invoices__company_id___invoice_id__mark_issued_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/delivery":{"get":{"tags":["invoices"],"summary":"Get Invoice Delivery Overview","description":"Return latest generated document and latest send attempt for an invoice.","operationId":"get_invoice_delivery_overview_api_invoices__company_id___invoice_id__delivery_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDeliveryOverviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/delivery/external-sends":{"post":{"tags":["invoices"],"summary":"Record External Send","description":"Record that an invoice was sent to the customer outside Porter.","operationId":"record_external_send_api_invoices__company_id___invoice_id__delivery_external_sends_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordExternalSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSendEvidenceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/delivery/ap-portal-submissions":{"post":{"tags":["invoices"],"summary":"Record Ap Portal Submission","description":"Record that an invoice was manually submitted through an AP portal.","operationId":"record_ap_portal_submission_api_invoices__company_id___invoice_id__delivery_ap_portal_submissions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordApPortalSubmissionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceApPortalSubmissionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/delivery/send-evidence/{evidence_id}/retract":{"post":{"tags":["invoices"],"summary":"Retract Send Evidence","description":"Retract send evidence that did not prove the invoice was sent.","operationId":"retract_send_evidence_api_invoices__company_id___invoice_id__delivery_send_evidence__evidence_id__retract_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"evidence_id","in":"path","required":true,"schema":{"type":"string","title":"Evidence Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetractSendEvidenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSendEvidenceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoices/{company_id}/{invoice_id}/download":{"get":{"tags":["invoices"],"summary":"Download Latest Invoice Document","description":"Download the latest generated customer-facing invoice PDF.","operationId":"download_latest_invoice_document_api_invoices__company_id___invoice_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoice-pay/{token}":{"get":{"tags":["invoices"],"summary":"Redirect To Invoice Payment","description":"Mint a fresh Stripe Checkout Session and redirect the payer to it.","operationId":"redirect_to_invoice_payment_api_invoice_pay__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoice-settings/{company_id}":{"get":{"tags":["invoice-settings"],"summary":"Get Invoice Branding Settings","description":"Get invoice branding settings, defaulting to company name.","operationId":"get_invoice_branding_settings_api_invoice_settings__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceBrandingSettingsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["invoice-settings"],"summary":"Upsert Invoice Branding Settings","description":"Create or update invoice branding settings.","operationId":"upsert_invoice_branding_settings_api_invoice_settings__company_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceBrandingSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceBrandingSettingsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/invoice-settings/{company_id}/logo":{"post":{"tags":["invoice-settings"],"summary":"Upload Invoice Logo","description":"Upload or replace the logo used on invoice PDFs.","operationId":"upload_invoice_logo_api_invoice_settings__company_id__logo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_invoice_logo_api_invoice_settings__company_id__logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceBrandingSettingsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/customers/{company_id}":{"get":{"tags":["customers"],"summary":"List Customers","description":"List customers for a company.\n\nReason: Returns paginated list with optional search/filter for the Customers table.\nFrontend can use this for autocomplete in subscription forms.","operationId":"list_customers_api_customers__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or email","title":"Search"},"description":"Search by name or email"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Pagination limit","default":100,"title":"Limit"},"description":"Pagination limit"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["customers"],"summary":"Create Customer","description":"Create a new customer.\n\nReason: Manual customer creation for cases where a customer is not already in Porter.\nUsually customers are created automatically during subscription import.","operationId":"create_customer_api_customers__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/customers/{company_id}/stats":{"get":{"tags":["customers"],"summary":"Get Customer Stats","description":"Get customer statistics for dashboard.\n\nReason: Used in Revenue Overview to show customer breakdown.\nReturns fields matching frontend CustomerStats interface.","operationId":"get_customer_stats_api_customers__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerStatsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/customers/{company_id}/{customer_id}":{"get":{"tags":["customers"],"summary":"Get Customer","description":"Get a single customer by ID.\n\nReason: Used for customer detail view and when linking subscriptions/invoices.","operationId":"get_customer_api_customers__company_id___customer_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["customers"],"summary":"Update Customer","description":"Update a customer.\n\nReason: Used to update customer identity, external IDs, and the POR-1800\ncustomer-owned billing profile fields surfaced in Counterparties and MCP.","operationId":"update_customer_api_customers__company_id___customer_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["customers"],"summary":"Update Customer Counterparty","description":"Patch the Counterparties cleanup fields for a customer.\n\nReason: The Counterparties drawer edits customer billing identity and the\ndefault contact together; keep this UI route thin while the repository uses\nthe canonical customer and billing-contact writers.","operationId":"update_customer_counterparty_api_customers__company_id___customer_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCounterpartyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["customers"],"summary":"Delete Customer","description":"Delete a customer after the shared linked-record guard passes.","operationId":"delete_customer_api_customers__company_id___customer_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/customers/{company_id}/{customer_id}/relationship-summary":{"get":{"tags":["customers"],"summary":"Get Customer Relationship Summary Endpoint","description":"Get a relationship overview for one customer.\n\nReason: The Counterparties → Customers detail drawer surfaces \"how is our\nrelationship with this customer going\" — total invoiced/collected/outstanding,\nA/R aging, and recent invoice + payment activity. Read-only; the service\ncomposes the canonical invoice/payment read models so the numbers match the\nInvoices/Payments lists.","operationId":"get_customer_relationship_summary_endpoint_api_customers__company_id___customer_id__relationship_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRelationshipSummary"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/customers/{company_id}/merge":{"post":{"tags":["customers"],"summary":"Merge Customers","description":"Merge multiple customers into one.\n\nReason: Customer merge is the revenue-side equivalent of vendor merge: it\nconsolidates duplicates while preserving linked invoices, payments,\nsubscriptions, bank transactions, and deterministic match keys.","operationId":"merge_customers_api_customers__company_id__merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMerge"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMergeResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/customers/{company_id}/find-or-create":{"post":{"tags":["customers"],"summary":"Find Or Create Customer","description":"Find existing customer or create new one.\n\nReason: Used during subscription import to avoid duplicates.\nMatches on name first, then external IDs.","operationId":"find_or_create_customer_api_customers__company_id__find_or_create_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/customers/{company_id}/{customer_id}/link-qbo":{"post":{"tags":["customers"],"summary":"Link Customer To Qbo","description":"Link customer to QBO customer.\n\nReason: Used when matching Porter customers to QBO customers for invoice syncing.","operationId":"link_customer_to_qbo_api_customers__company_id___customer_id__link_qbo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"qbo_customer_id","in":"query","required":true,"schema":{"type":"string","description":"QBO Customer ID to link","title":"Qbo Customer Id"},"description":"QBO Customer ID to link"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}":{"get":{"tags":["vendors"],"summary":"List Vendors","description":"List vendors for a company.\n\nReason: Main list endpoint with search and filter capabilities.","operationId":"list_vendors_api_vendors__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by vendor name","title":"Search"},"description":"Search by vendor name"},{"name":"vendorType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by vendor type","title":"Vendortype"},"description":"Filter by vendor type"},{"name":"taxYear","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2200,"minimum":2000},{"type":"null"}],"description":"Tax year for vendor readiness totals","title":"Taxyear"},"description":"Tax year for vendor readiness totals"},{"name":"taxStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(candidate|needs_review|no_current_need)$"},{"type":"null"}],"description":"Filter by tax-readiness status","title":"Taxstatus"},"description":"Filter by tax-readiness status"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["vendors"],"summary":"Create Vendor","description":"Create a new vendor.\n\nReason: Manual vendor creation for expense tracking.","operationId":"create_vendor_api_vendors__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}/tax-readiness/refresh":{"post":{"tags":["vendors"],"summary":"Refresh Vendor Tax Readiness Endpoint","description":"Refresh the derived vendor tax-readiness snapshot for one year.","operationId":"refresh_vendor_tax_readiness_endpoint_api_vendors__company_id__tax_readiness_refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"taxYear","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2200,"minimum":2000},{"type":"null"}],"title":"Taxyear"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorTaxRefreshResult"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}/stats":{"get":{"tags":["vendors"],"summary":"Get Vendor Stats","description":"Get vendor statistics for dashboard.\n\nReason: Summary stats for vendor management overview.","operationId":"get_vendor_stats_api_vendors__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Vendor Stats Api Vendors  Company Id  Stats Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}/{vendor_id}":{"get":{"tags":["vendors"],"summary":"Get Vendor","description":"Get a single vendor by ID.\n\nReason: Detail view for vendor management.","operationId":"get_vendor_api_vendors__company_id___vendor_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","title":"Vendor Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["vendors"],"summary":"Update Vendor","description":"Update a vendor.\n\nReason: Edit vendor details, add aliases, set default account.","operationId":"update_vendor_api_vendors__company_id___vendor_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","title":"Vendor Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["vendors"],"summary":"Delete Vendor","description":"Delete a vendor.\n\nReason: Remove unused vendor records. Note: transactions with this\nvendor_id will have their vendor_id set to NULL.","operationId":"delete_vendor_api_vendors__company_id___vendor_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","title":"Vendor Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Vendor Api Vendors  Company Id   Vendor Id  Delete"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}/{vendor_id}/relationship-summary":{"get":{"tags":["vendors"],"summary":"Get Vendor Relationship Summary Endpoint","description":"Get a relationship overview for one vendor.\n\nReason: The Counterparties → Vendors detail drawer surfaces the A/P side of\nthe relationship — total billed/paid/owed, A/P aging, and recent bills. The\nvendor's card/bank spend + transaction count already ride the vendor list\nrecord, so this endpoint owns only the bill-subledger figures. Read-only; the\nservice composes the canonical per-vendor bill read so numbers match the\nBills/AP Aging surfaces.","operationId":"get_vendor_relationship_summary_endpoint_api_vendors__company_id___vendor_id__relationship_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","title":"Vendor Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorRelationshipSummary"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}/{vendor_id}/alias":{"post":{"tags":["vendors"],"summary":"Add Vendor Alias","description":"Add an alias to a vendor.\n\nReason: Map alternate names to the same vendor (e.g., AMZN → Amazon).","operationId":"add_vendor_alias_api_vendors__company_id___vendor_id__alias_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","title":"Vendor Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"alias","in":"query","required":true,"schema":{"type":"string","description":"Alias to add","title":"Alias"},"description":"Alias to add"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}/merge":{"post":{"tags":["vendors"],"summary":"Merge Vendors","description":"Merge multiple vendors into one.\n\nReason: Consolidate duplicate vendors. All transactions from source vendors\nare moved to the target vendor, source vendor names become aliases, then\nsource vendors are deleted.","operationId":"merge_vendors_api_vendors__company_id__merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorMerge"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/vendors/{company_id}/find-or-create":{"post":{"tags":["vendors"],"summary":"Find Or Create Vendor","description":"Find existing vendor or create new one.\n\nReason: Used during transaction import to ensure vendor record exists.","operationId":"find_or_create_vendor_api_vendors__company_id__find_or_create_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"name","in":"query","required":true,"schema":{"type":"string","description":"Vendor name","title":"Name"},"description":"Vendor name"},{"name":"vendorType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Vendor type","title":"Vendortype"},"description":"Vendor type"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}":{"get":{"tags":["payments"],"summary":"List Payments","description":"List payments for a company.\n\nReason: Returns paginated list for Payments table with various filters.","operationId":"list_payments_api_payments__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by customer","title":"Customer Id"},"description":"Filter by customer"},{"name":"depositStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by deposit status","title":"Depositstatus"},"description":"Filter by deposit status"},{"name":"postingStatus","in":"query","required":false,"schema":{"enum":["posted","pending","all"],"type":"string","description":"Filter by posting status (posted/pending/all)","default":"all","title":"Postingstatus"},"description":"Filter by posting status (posted/pending/all)"},{"name":"matchStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by invoice match status","title":"Matchstatus"},"description":"Filter by invoice match status"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by payment date start (YYYY-MM-DD)","title":"Datefrom"},"description":"Filter by payment date start (YYYY-MM-DD)"},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by payment date end (YYYY-MM-DD)","title":"Dateto"},"description":"Filter by payment date end (YYYY-MM-DD)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search payments by customer name","title":"Search"},"description":"Search payments by customer name"},{"name":"reviewStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by review status (needs_review | duplicate | clean)","title":"Reviewstatus"},"description":"Filter by review status (needs_review | duplicate | clean)"},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","description":"Sort column","default":"paymentDate","title":"Sortby"},"description":"Sort column"},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","description":"Sort direction: asc or desc","default":"desc","title":"Sortdirection"},"description":"Sort direction: asc or desc"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["payments"],"summary":"Create Payment","description":"Create a new payment.\n\nReason: Manual payment entry or sync from external source.\nPayment is created unapplied - use /apply endpoint to apply to invoices.","operationId":"create_payment_api_payments__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/stats":{"get":{"tags":["payments"],"summary":"Get Payment Stats","description":"Get payment statistics.\n\nReason: For Revenue dashboard - total payments, applied vs unapplied, breakdown by source.","operationId":"get_payment_stats_api_payments__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/source-intake-items":{"get":{"tags":["payments"],"summary":"List Source Payment Intake Items","description":"List source-payment intake rows excluded before canonical payment creation.","operationId":"list_source_payment_intake_items_api_payments__company_id__source_intake_items_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Filter source payment intake items by status","default":"excluded","title":"Status"},"description":"Filter source payment intake items by status"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source payment date start (YYYY-MM-DD)","title":"Datefrom"},"description":"Filter by source payment date start (YYYY-MM-DD)"},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source payment date end (YYYY-MM-DD)","title":"Dateto"},"description":"Filter by source payment date end (YYYY-MM-DD)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search source, customer, invoice, or reason","title":"Search"},"description":"Search source, customer, invoice, or reason"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcePaymentIntakeItemListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/undeposited":{"get":{"tags":["payments"],"summary":"List Undeposited Payments","description":"List undeposited payments.\n\nReason: For bank reconciliation - show payments not yet matched to bank transactions.","operationId":"list_undeposited_payments_api_payments__company_id__undeposited_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}":{"get":{"tags":["payments"],"summary":"Get Payment","description":"Get a single payment by ID.\n\nReason: Returns payment with all applications for detail view.","operationId":"get_payment_api_payments__company_id___payment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["payments"],"summary":"Update Payment","description":"Update a payment.\n\nReason: Edit payment details (date, amount, method, etc.)\nNote: Cannot change amount if payment has applications.\nReason: Payer info (payer_name, payer_email) stays on payment and moves with customer link.","operationId":"update_payment_api_payments__company_id___payment_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["payments"],"summary":"Delete Payment","description":"Delete a payment.\n\nReason: Remove payment. Also removes all applications (CASCADE).","operationId":"delete_payment_api_payments__company_id___payment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/resolve-duplicate/merge":{"post":{"tags":["payments"],"summary":"Merge Duplicate Payment","description":"Merge a flagged duplicate payment into its matched survivor.\n\nReason: POR-1412 — when the operator confirms two payment rows are the same\nreal-world payment (a manual entry + a HubSpot-synced duplicate), this\ncollapses them to one canonical record through the shared settlement merge\ncommand. The duplicate's invoice/deposit links move to the survivor; the\nduplicate row (which was blocked from posting) is removed. The path\npayment_id is the flagged duplicate being resolved.","operationId":"merge_duplicate_payment_api_payments__company_id___payment_id__resolve_duplicate_merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeDuplicatePaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/resolve-duplicate/keep-separate":{"post":{"tags":["payments"],"summary":"Keep Payment Separate","description":"Clear the duplicate-review flag on a payment (\"keep separate\").\n\nReason: POR-1412 — the operator decided the flagged row is NOT a duplicate\nof the matched payment. Clearing the persisted review state drops the Needs\nReview badge and unblocks posting. Writes no GL — book-neutral.","operationId":"keep_payment_separate_api_payments__company_id___payment_id__resolve_duplicate_keep_separate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/resolve-match/{decision}":{"post":{"tags":["payments"],"summary":"Resolve Payment Match Review","description":"Confirm or reject an inferred invoice match flagged for review.\n\nReason: POR-1882 — a unique cent-exact customer+amount (or exact invoice\nset) match is applied AND flagged `proposed_action='review_match'`, because\nno invoice identifier proved it. This is where the operator rules on the\nattribution from the payment detail drawer. Confirm keeps the applications\nand clears the flag (book-neutral). Reject unapplies the flagged invoices\nthrough the canonical settlement removal command, with its close-period\nguard, and then clears the flag.","operationId":"resolve_payment_match_review_api_payments__company_id___payment_id__resolve_match__decision__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"decision","in":"path","required":true,"schema":{"enum":["confirm","reject"],"type":"string","title":"Decision"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/qbo-reconciliation/resolve":{"post":{"tags":["payments"],"summary":"Resolve Qbo Payment Reconciliation","description":"Resolve a QBO difference after an explicit user or AI review decision.","operationId":"resolve_qbo_payment_reconciliation_api_payments__company_id___payment_id__qbo_reconciliation_resolve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveQboPaymentReconciliationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/settlement-account":{"patch":{"tags":["payments"],"summary":"Update Payment Settlement Account","description":"Change the account a customer payment settles into and re-book its GL.\n\nReason: POR-1363 — editable settlement account on Payments, mirroring\nbank/CC categorization. Posted payments are blocked (unpost first); closed\nperiods are blocked. Re-books DR <new account> / CR A/R through the\ncanonical payment GL path.","operationId":"update_payment_settlement_account_api_payments__company_id___payment_id__settlement_account_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentSettlementAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/unpost":{"post":{"tags":["payments"],"summary":"Unpost Payment","description":"Unpost one payment and its QBO fee Expense so it can be corrected.\n\nReason: POR-1363 — per-row Unpost. Returns the payment to pending so the\nsettlement account or processing fee can be changed and the payment re-posted. Blocked when\nthe period is closed, when the payment is not posted, or when it was posted\nas part of a consolidated Payment journal entry (revert that batch instead).","operationId":"unpost_payment_api_payments__company_id___payment_id__unpost_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/unpost-processing-fee":{"post":{"tags":["payments"],"summary":"Unpost Payment Processing Fee","description":"Unpost only the payment's QBO processing-fee Expense.","operationId":"unpost_payment_processing_fee_api_payments__company_id___payment_id__unpost_processing_fee_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/unvoid":{"post":{"tags":["payments"],"summary":"Unvoid Payment","description":"Restore a previously voided payment.\n\nReason: POR-2312 makes the normal lifecycle a retained-graph reactivation:\nexact GL, invoice links, and deposit links survive void and become active\ntogether when capacity is still available. Legacy already-destructive voids\nretain evidence-backed recovery, and closed periods remain repair-gated. The\nroute only adapts HTTP into the domain command.","operationId":"unvoid_payment_api_payments__company_id___payment_id__unvoid_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/post-to-qbo/preview":{"get":{"tags":["payments"],"summary":"Preview Post Payment To Qbo","description":"Return the named debit/credit accounts Porter will book for this payment.\n\nReason: POR-1303 — The Post-to-GL confirmation modal must show the *actual*\naccount names so the operator can verify the entry before committing.\nReads the existing payment-clearing transaction_lines (the truth of what\nwill post) and resolves the credit-side A/R name via the canonical\nresolver. When transaction_lines don't yet exist, falls back to the\ncanonical ``resolve_payment_debit_account`` so the preview still reflects\nPorter's deterministic posting rule. Raises 422 with a structured\n``remediation`` field when no clearing/holding account is mapped, so the\nUI can render a destructive toast pointing the user to Settings.","operationId":"preview_post_payment_to_qbo_api_payments__company_id___payment_id__post_to_qbo_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostPaymentToGLPreviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/post-to-qbo":{"post":{"tags":["payments"],"summary":"Post Payment To Qbo","description":"Post a Porter payment to QuickBooks as a QBO Payment.","operationId":"post_payment_to_qbo_api_payments__company_id___payment_id__post_to_qbo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostPaymentToQBOResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/bulk-post-to-qbo":{"post":{"tags":["payments"],"summary":"Bulk Post Payments To Qbo","description":"Post selected Porter payments to QuickBooks as QBO Payments.","operationId":"bulk_post_payments_to_qbo_api_payments__company_id__bulk_post_to_qbo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostPaymentsToQBORequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPostPaymentsToQBOResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/apply":{"post":{"tags":["payments"],"summary":"Apply Payment To Invoice","description":"Apply payment to a single invoice.\n\nReason: Creates payment application linking payment to invoice.\nThis affects the invoice's A/R balance (reduces amount due).","operationId":"apply_payment_to_invoice_api_payments__company_id___payment_id__apply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentApplicationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/apply-bulk":{"post":{"tags":["payments"],"summary":"Apply Payment To Invoices","description":"Apply payment to multiple invoices.\n\nReason: When a single payment covers multiple invoices, apply in one request.","operationId":"apply_payment_to_invoices_api_payments__company_id___payment_id__apply_bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyPaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkApplyResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/applications/{application_id}":{"delete":{"tags":["payments"],"summary":"Remove Payment Application","description":"Remove a payment application.\n\nReason: Unapply payment from an invoice (reverse the application).\nThis increases the invoice's amount due and returns funds to unapplied.","operationId":"remove_payment_application_api_payments__company_id___payment_id__applications__application_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/for-invoice/{invoice_id}":{"get":{"tags":["payments"],"summary":"Get Payments For Invoice","description":"Get all payments applied to an invoice.\n\nReason: Show payment history on invoice detail view.","operationId":"get_payments_for_invoice_api_payments__company_id__for_invoice__invoice_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePaymentApplicationResponse"},"title":"Response Get Payments For Invoice Api Payments  Company Id  For Invoice  Invoice Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/{payment_id}/mark-deposited":{"post":{"tags":["payments"],"summary":"Mark Payment Deposited","description":"Mark payment as deposited and link to bank transaction for reconciliation.","operationId":"mark_payment_deposited_api_payments__company_id___payment_id__mark_deposited_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"bank_transaction_id","in":"query","required":true,"schema":{"type":"string","description":"Bank transaction ID to link","title":"Bank Transaction Id"},"description":"Bank transaction ID to link"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/match-candidates/{bank_transaction_id}":{"get":{"tags":["payments"],"summary":"Get Deposit Match Candidates","description":"Get undeposited payment candidates for matching to a bank deposit (POR-114).","operationId":"get_deposit_match_candidates_api_payments__company_id__match_candidates__bank_transaction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bank_transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Bank Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepositMatchCandidateResponse"},"title":"Response Get Deposit Match Candidates Api Payments  Company Id  Match Candidates  Bank Transaction Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/deposit-payments/{bank_transaction_id}":{"get":{"tags":["payments"],"summary":"Get Deposit Payments","description":"Get the saved matched payments for an already-matched bank deposit.\n\nReason: POR-255 — When a deposit is already matched, retrieve the actual\nlinked payments instead of rerunning the candidate search algorithm.\nReturns the same response format as match-candidates so the frontend\nmodal can display them identically (in read-only mode).","operationId":"get_deposit_payments_api_payments__company_id__deposit_payments__bank_transaction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bank_transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Bank Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepositMatchCandidateResponse"},"title":"Response Get Deposit Payments Api Payments  Company Id  Deposit Payments  Bank Transaction Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/create-deposit":{"post":{"tags":["payments"],"summary":"Create Deposit Match","description":"Link selected payments to a bank deposit transaction (POR-114/POR-1021).","operationId":"create_deposit_match_api_payments__company_id__create_deposit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepositRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepositResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/preview":{"post":{"tags":["payments"],"summary":"Preview Payment Batch","description":"Stateless payment preview — Phase 1 of the direct batch flow.\n\nPOR-944: accepts a `columnMapping` query param so the dialog's column-remap\nUI flows through the canonical endpoint instead of falling back to the\nlegacy `/upload/preview-with-mapping` route.","operationId":"preview_payment_batch_api_payments__company_id__preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"columnMapping","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Columnmapping"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_payment_batch_api_payments__company_id__preview_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentImportPreview"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/batch":{"post":{"tags":["payments"],"summary":"Batch Create Payments","description":"Direct batch endpoint — Phase 2 of the direct batch flow.\n\nReason: Accepts pre-resolved rows (with invoice_id when known) and writes\npayments + payment_applications atomically per row. Both the UI confirm\nstep and the AI tool dispatch through here, so the invoice link computed\nat preview time is preserved instead of being dropped (the bug in the\nold prepare/import_prepared adapter pair).","operationId":"batch_create_payments_api_payments__company_id__batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"async","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Async"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchPaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BatchPaymentResponse"},{"$ref":"#/components/schemas/SyncJobStartResponse"}],"title":"Response Batch Create Payments Api Payments  Company Id  Batch Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/generate-fee-entries":{"post":{"tags":["payments"],"summary":"Generate Fee Entries","description":"Generate processing fee JEs for payments with signed fee_amount but no fee JE yet.\n\nReason: POR-142 — Backfill processing fee JEs for payments imported before the\nprocessing fees account was configured. Also supports re-running after configuration\nchanges. Idempotent: skips payments that already have processing_fee transaction_lines.","operationId":"generate_fee_entries_api_payments__company_id__generate_fee_entries_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFeeEntriesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payments/{company_id}/repair-gl-entries":{"post":{"tags":["payments"],"summary":"Repair Gl Entries","description":"Create missing GL entries for payments that have none.\n\nReason: POR-320 — Payments created before the create_payment fix\nhave no transaction_lines. This endpoint finds all such payments and creates\nthe missing DR Clearing / CR A/R entries. Idempotent: skips payments that\nalready have GL entries. Skips bank-deposit-linked payments.","operationId":"repair_gl_entries_api_payments__company_id__repair_gl_entries_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepairGLResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payment_processor_connections/{processor_id}/set_default":{"post":{"tags":["payment-processor-connections"],"summary":"Set Default Payment Processor","description":"Set one active processor connection as the company's default.","operationId":"set_default_payment_processor_api_payment_processor_connections__processor_id__set_default_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessorConnectionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payment_processor_connections/{processor_id}/clearing_account":{"patch":{"tags":["payment-processor-connections"],"summary":"Update Payment Processor Clearing Account","description":"Set or change which COA account this processor's receipts book to.\n\nReason: This is the clearing/merchant-receivable account the processor's\ndirect integration deposits receipts into. For Helcim it is mirrored to\n`helcim_connections.cash_account_id`, which the Helcim sync reads when it\nbooks card and ACH receipts. New processor connections start NULL — Porter\ndoes not guess; the operator or AI sets this explicitly.","operationId":"update_payment_processor_clearing_account_api_payment_processor_connections__processor_id__clearing_account_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClearingAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentProcessorConnectionResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payment_processor_connections/{processor_id}/tender_accounts":{"get":{"tags":["payment-processor-connections"],"summary":"Get Payment Processor Tender Accounts","description":"List explicit non-card tender account mappings for this processor.","operationId":"get_payment_processor_tender_accounts_api_payment_processor_connections__processor_id__tender_accounts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorTenderAccountMapping"},"title":"Response Get Payment Processor Tender Accounts Api Payment Processor Connections  Processor Id  Tender Accounts Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/payment_processor_connections/{processor_id}/tender_accounts/{tender_kind}":{"put":{"tags":["payment-processor-connections"],"summary":"Update Payment Processor Tender Account","description":"Map a processor tender to an existing account; never create one.","operationId":"update_payment_processor_tender_account_api_payment_processor_connections__processor_id__tender_accounts__tender_kind__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"processor_id","in":"path","required":true,"schema":{"type":"string","title":"Processor Id"}},{"name":"tender_kind","in":"path","required":true,"schema":{"enum":["cash","gift_card","external"],"type":"string","title":"Tender Kind"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenderAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorTenderAccountMapping"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}":{"get":{"tags":["subscriptions"],"summary":"List Subscriptions","description":"List subscriptions for a company.\n\nReason: Thin adapter — CSV-string externalIds parsing and the repo call\nlive in `list_subscriptions_for_company` so AI/MCP surfaces share them.","operationId":"list_subscriptions_api_subscriptions__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (active, cancelled, expired, paused)","title":"Status"},"description":"Filter by status (active, cancelled, expired, paused)"},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by customer","title":"Customer Id"},"description":"Filter by customer"},{"name":"recognition_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by mode (unbilled, deferred, settled)","title":"Recognition Mode"},"description":"Filter by mode (unbilled, deferred, settled)"},{"name":"validityStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by accounting validity (valid, invalid, duplicate, erroneous)","title":"Validitystatus"},"description":"Filter by accounting validity (valid, invalid, duplicate, erroneous)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by subscription or customer name","title":"Search"},"description":"Search by subscription or customer name"},{"name":"externalIds","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated external subscription IDs for bulk lookup","title":"Externalids"},"description":"Comma-separated external subscription IDs for bulk lookup"},{"name":"includeModifications","in":"query","required":false,"schema":{"type":"boolean","description":"Include contract-change history in responses","default":false,"title":"Includemodifications"},"description":"Include contract-change history in responses"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["subscriptions"],"summary":"Create Subscription","description":"Create a new subscription (customer find-or-create when only name is provided).","operationId":"create_subscription_api_subscriptions__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/lookup-external-ids":{"post":{"tags":["subscriptions"],"summary":"Lookup External Subscription Ids","description":"Bulk lookup Porter subscriptions by external subscription IDs.\n\nReason: POR-184 — Two modes:\n- existence_only=true (default): returns {external_id: porter_id} mapping\n- existence_only=false: returns full subscription objects\n\nRequest body: {\"external_ids\": [\"123\", \"456\"], \"existence_only\": true}","operationId":"lookup_external_subscription_ids_api_subscriptions__company_id__lookup_external_ids_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lookup External Subscription Ids Api Subscriptions  Company Id  Lookup External Ids Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/stats":{"get":{"tags":["subscriptions"],"summary":"Get Subscription Stats","description":"Get subscription statistics for the Revenue dashboard.","operationId":"get_subscription_stats_api_subscriptions__company_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/posted-entry-review-sweep":{"get":{"tags":["subscriptions"],"summary":"List Posted Entry Review Sweep","description":"Return every company-local non-valid contract review state without pagination.","operationId":"list_posted_entry_review_sweep_api_subscriptions__company_id__posted_entry_review_sweep_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Posted Entry Review Sweep Api Subscriptions  Company Id  Posted Entry Review Sweep Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/active":{"get":{"tags":["subscriptions"],"summary":"List Active Subscriptions","description":"List active subscriptions only — convenience over the common status filter.","operationId":"list_active_subscriptions_api_subscriptions__company_id__active_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/rev-rec-export":{"get":{"tags":["subscriptions"],"summary":"Export Rev Rec Audit","description":"Download a rev rec audit XLSX with all schedule engine data.\n\nReason: POR-383 — Dumps every subscription, every schedule event, and monthly\nactivity/balance grids for unbilled and deferred revenue. All data comes from\ncalculate_schedules() — the same source as the activity grid and JE detail drawers.","operationId":"export_rev_rec_audit_api_subscriptions__company_id__rev_rec_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date YYYY-MM-DD","title":"Date From"},"description":"Start date YYYY-MM-DD"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date YYYY-MM-DD","title":"Date To"},"description":"End date YYYY-MM-DD"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}":{"get":{"tags":["subscriptions"],"summary":"Get Subscription","description":"Get a single subscription by ID.","operationId":"get_subscription_api_subscriptions__company_id___subscription_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["subscriptions"],"summary":"Update Subscription","description":"Update a subscription.","operationId":"update_subscription_api_subscriptions__company_id___subscription_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["subscriptions"],"summary":"Delete Subscription","description":"Delete a subscription and its related rows.","operationId":"delete_subscription_api_subscriptions__company_id___subscription_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/detail":{"get":{"tags":["subscriptions"],"summary":"Get Subscription Detail","description":"Get full subscription detail with events + calculated schedule.","operationId":"get_subscription_detail_api_subscriptions__company_id___subscription_id__detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/accept-posted-entries":{"post":{"tags":["subscriptions"],"summary":"Accept Erroneous Posted Entries","description":"Accept leaving the current posted entries visible on an erroneous contract.","operationId":"accept_erroneous_posted_entries_api_subscriptions__company_id___subscription_id__accept_posted_entries_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptPostedEntriesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/for-customer/{customer_id}":{"get":{"tags":["subscriptions"],"summary":"Get Subscriptions For Customer","description":"Get all subscriptions for a customer.","operationId":"get_subscriptions_for_customer_api_subscriptions__company_id__for_customer__customer_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionReadModel"},"title":"Response Get Subscriptions For Customer Api Subscriptions  Company Id  For Customer  Customer Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/link-customer":{"post":{"tags":["subscriptions"],"summary":"Link Subscription To Customer","description":"Link subscription to a customer.\n\nReason: Connect subscription to customer entity for invoice matching.","operationId":"link_subscription_to_customer_api_subscriptions__company_id___subscription_id__link_customer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__subscriptions__LinkCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/cancel":{"post":{"tags":["subscriptions"],"summary":"Cancel Subscription","description":"Cancel a subscription.","operationId":"cancel_subscription_api_subscriptions__company_id___subscription_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/activate":{"post":{"tags":["subscriptions"],"summary":"Activate Subscription","description":"Activate a subscription.","operationId":"activate_subscription_api_subscriptions__company_id___subscription_id__activate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/modify":{"post":{"tags":["subscriptions"],"summary":"Modify Subscription","description":"Modify a subscription contract (upsell, contraction, early-termination, extension).","operationId":"modify_subscription_api_subscriptions__company_id___subscription_id__modify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionModifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/write-off-accounts":{"get":{"tags":["subscriptions"],"summary":"Get Write Off Accounts","description":"Get default accounts for the unbilled write-off dialog.\n\nReason: POR-275 — Frontend needs to show account dropdowns with correct\ndefaults. Delegates to write_off.get_write_off_accounts service which\nresolves bad debt from COA, revenue from product type, and translates\nQBO IDs to database UUIDs for the dropdown.","operationId":"get_write_off_accounts_api_subscriptions__company_id___subscription_id__write_off_accounts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteOffAccountsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/write-off-unbilled":{"post":{"tags":["subscriptions"],"summary":"Write Off Unbilled","description":"Write off unbilled revenue on a churned/terminated subscription.\n\nReason: POR-217 — Thin router. Delegates all business logic through the\nshared subscription command boundary.","operationId":"write_off_unbilled_api_subscriptions__company_id___subscription_id__write_off_unbilled_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteOffUnbilledRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/{subscription_id}/unwrite-off-unbilled":{"post":{"tags":["subscriptions"],"summary":"Unwrite Off Unbilled","description":"Reverse an unbilled revenue write-off (restore unbilled balance).\n\nReason: POR-217 — Thin router. Delegates to the shared subscription command\nboundary.","operationId":"unwrite_off_unbilled_api_subscriptions__company_id___subscription_id__unwrite_off_unbilled_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionReadModel"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/for-period/{year}/{month}":{"get":{"tags":["subscriptions"],"summary":"Get Subscriptions For Period","description":"Get subscriptions active during a period (rev rec discovery).","operationId":"get_subscriptions_for_period_api_subscriptions__company_id__for_period__year___month__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionReadModel"},"title":"Response Get Subscriptions For Period Api Subscriptions  Company Id  For Period  Year   Month  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/preview":{"post":{"tags":["subscriptions"],"summary":"Preview Subscriptions","description":"Stateless preview of a subscription CSV/Excel upload.\n\nReason: Direct path replacing prepare_import_dataset for subscriptions.\nNo dataset_id, no DB writes — parses the file and returns preview rows\nthat the frontend renders, then submits back via /batch.","operationId":"preview_subscriptions_api_subscriptions__company_id__preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_subscriptions_api_subscriptions__company_id__preview_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionFileParseResult"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/subscriptions/{company_id}/batch":{"post":{"tags":["subscriptions"],"summary":"Batch Create Subscriptions","description":"Direct batch create of subscriptions from confirmed preview rows.\n\nReason: Replaces the import_prepared_dataset adapter path. Calls the\ncanonical batch writer (import_subscriptions_for_company) which both\nUI and AI now share. Closed-period rows are returned as not_added with\nerror_code='closed_period' (existing behavior).","operationId":"batch_create_subscriptions_api_subscriptions__company_id__batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"async","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Async"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionBatchRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"$ref":"#/components/schemas/SyncJobStartResponse"}],"title":"Response Batch Create Subscriptions Api Subscriptions  Company Id  Batch Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/definitions":{"get":{"tags":["workflows"],"summary":"Get Workflow Definitions","description":"Return active custom workflow object types for the browser explorer.","operationId":"get_workflow_definitions_api_workflows__company_id__definitions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"definitionVersionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionversionid"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinitionsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/versions":{"get":{"tags":["workflows"],"summary":"Get Workflow Versions","description":"Return schema versions available for Operational Model page review.","operationId":"get_workflow_versions_api_workflows__company_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/definitions/{workflow_key}":{"delete":{"tags":["workflows"],"summary":"Delete Workflow Definition","description":"Archive one custom workflow definition/model.","operationId":"delete_workflow_definition_api_workflows__company_id__definitions__workflow_key__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"workflow_key","in":"path","required":true,"schema":{"type":"string","title":"Workflow Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDefinitionDeleteResultResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}":{"get":{"tags":["workflows"],"summary":"Get Workflow Records","description":"Return records for one dynamic workflow object type.","operationId":"get_workflow_records_api_workflows__company_id__records__object_type_key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"reviewStatus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewstatus"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":1000,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}":{"get":{"tags":["workflows"],"summary":"Get Workflow Record Detail","description":"Return one dynamic workflow record with relationship context.","operationId":"get_workflow_record_detail_api_workflows__company_id__records__object_type_key___record_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"patch":{"tags":["workflows"],"summary":"Patch Workflow Record","description":"Update editable values on one dynamic workflow record.","operationId":"patch_workflow_record_api_workflows__company_id__records__object_type_key___record_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}/document/download":{"get":{"tags":["workflows"],"summary":"Download Workflow Record Document","description":"Download the rendered document template for one workflow record.","operationId":"download_workflow_record_document_api_workflows__company_id__records__object_type_key___record_id__document_download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"templateKey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Templatekey"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}/files/{field_key}/prepare":{"post":{"tags":["workflows"],"summary":"Prepare Workflow Record File","description":"Mint a private upload URL for one custom-object record file field.","operationId":"prepare_workflow_record_file_api_workflows__company_id__records__object_type_key___record_id__files__field_key__prepare_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordFilePrepareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordFilePrepareResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}/files/{field_key}/finalize":{"post":{"tags":["workflows"],"summary":"Finalize Workflow Record File","description":"Persist file metadata after direct upload bytes have landed.","operationId":"finalize_workflow_record_file_api_workflows__company_id__records__object_type_key___record_id__files__field_key__finalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordFileFinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}/files/{field_key}/download":{"get":{"tags":["workflows"],"summary":"Get Workflow Record File Download","description":"Return a short-lived signed read URL for one workflow record file.","operationId":"get_workflow_record_file_download_api_workflows__company_id__records__object_type_key___record_id__files__field_key__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordFileDownloadResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}/files/{field_key}/uploads/{media_id}":{"delete":{"tags":["workflows"],"summary":"Discard Workflow Record File Upload Endpoint","description":"Discard prepared direct-upload bytes that were not finalized.","operationId":"discard_workflow_record_file_upload_endpoint_api_workflows__company_id__records__object_type_key___record_id__files__field_key__uploads__media_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"filename","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Filename"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordFileDiscardResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}/files/{field_key}":{"delete":{"tags":["workflows"],"summary":"Clear Workflow Record File","description":"Clear one custom-object record file field and remove its private blob.","operationId":"clear_workflow_record_file_api_workflows__company_id__records__object_type_key___record_id__files__field_key__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/records/{object_type_key}/{record_id}/relationships/{relationship_key}":{"patch":{"tags":["workflows"],"summary":"Patch Workflow Record Relationship","description":"Replace one singular workflow relationship from a dynamic record.","operationId":"patch_workflow_record_relationship_api_workflows__company_id__records__object_type_key___record_id__relationships__relationship_key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"relationship_key","in":"path","required":true,"schema":{"type":"string","title":"Relationship Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordRelationshipPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["workflows"],"summary":"Delete Workflow Record Relationship","description":"Remove existing relationship rows for one workflow record/key.","operationId":"delete_workflow_record_relationship_api_workflows__company_id__records__object_type_key___record_id__relationships__relationship_key__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"relationship_key","in":"path","required":true,"schema":{"type":"string","title":"Relationship Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRecordResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/model-graph":{"get":{"tags":["workflows"],"summary":"Get Workflow Model Graph","description":"Return the object-model graph for each active workflow definition.\n\nRead-only inspection surface: it derives nodes/edges from the workflow\ndefinition (object types, typed reference fields, relationships, bindings)\nand owns no workflow validation or accounting effects.","operationId":"get_workflow_model_graph_api_workflows__company_id__model_graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"definitionVersionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionversionid"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelGraphsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/model-tests":{"get":{"tags":["workflows"],"summary":"Get Workflow Model Tests","description":"Return saved operational-model tests, latest status, and required-test verdict.\n\nReason (POR-2155): this docstring used to say \"publish-gate tests\". The gate\nhas been advisory since POR-2106, so the response carries the live\n`requiredTests` verdict and callers must read enforcement from it rather\nthan assume a gate exists.","operationId":"get_workflow_model_tests_api_workflows__company_id__model_tests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"definitionVersionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionversionid"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelTestsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/model-graph/objects/{object_type_key}/document-template":{"get":{"tags":["workflows"],"summary":"Get Workflow Model Graph Object Document Template Detail","description":"Return full document-template detail for one Model-tab object.","operationId":"get_workflow_model_graph_object_document_template_detail_api_workflows__company_id__model_graph_objects__object_type_key__document_template_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"workflowKey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflowkey"}},{"name":"templateKey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Templatekey"}},{"name":"definitionVersionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionversionid"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelGraphDocumentTemplateDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/model-graph/objects/{object_type_key}/document-preview":{"get":{"tags":["workflows"],"summary":"Preview Workflow Model Graph Object Document","description":"Render a compact document preview for one Model-tab object.","operationId":"preview_workflow_model_graph_object_document_api_workflows__company_id__model_graph_objects__object_type_key__document_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"recordId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordid"}},{"name":"templateKey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Templatekey"}},{"name":"definitionVersionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionversionid"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelDocumentPreviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/model-graph/objects/{object_type_key}":{"patch":{"tags":["workflows"],"summary":"Update Workflow Model Graph Object","description":"Update one custom object type from the Model-tab drawer.","operationId":"update_workflow_model_graph_object_api_workflows__company_id__model_graph_objects__object_type_key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"object_type_key","in":"path","required":true,"schema":{"type":"string","title":"Object Type Key"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelGraphObjectUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelGraphsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/workflows/{company_id}/model-graph/layout":{"put":{"tags":["workflows"],"summary":"Save Workflow Model Layout","description":"Persist a user-arranged Model-tab layout (node positions) for one workflow.\n\nThe layout is shared per company (last-writer-wins); `user_id` records who\nsaved it. Presentation-only — it never affects the derived nodes/edges.","operationId":"save_workflow_model_layout_api_workflows__company_id__model_graph_layout_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelLayoutSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowModelLayoutSaveResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/sync-jobs/{company_id}/{job_id}":{"get":{"tags":["sync-jobs"],"summary":"Get Sync Job","description":"Return one sync job for frontend polling.","operationId":"get_sync_job_api_sync_jobs__company_id___job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncJobPublicResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/integrations/{company_id}/status":{"get":{"tags":["integrations"],"summary":"List Integration Statuses","operationId":"list_integration_statuses_api_integrations__company_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationStatusResponse"},"title":"Response List Integration Statuses Api Integrations  Company Id  Status Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"List Integration Statuses"}},"/api/integrations/{company_id}/{provider}/status":{"get":{"tags":["integrations"],"summary":"Get Integration Status","operationId":"get_integration_status_api_integrations__company_id___provider__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationStatusResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Integration Status"}},"/api/integrations/{company_id}/{provider}/completeness":{"get":{"tags":["integrations"],"summary":"Get Integration Completeness Status","description":"Return current capability, setup, sync, and safe outcome evidence.","operationId":"get_integration_completeness_status_api_integrations__company_id___provider__completeness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCompletenessResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/integrations/{company_id}/square/orders/{provider_order_id}/recheck":{"post":{"tags":["integrations"],"summary":"Recheck Square Order For Owner","description":"Refetch one held Order and re-enter canonical commerce recognition.","operationId":"recheck_square_order_for_owner_api_integrations__company_id__square_orders__provider_order_id__recheck_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_order_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Order Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquareOrderRecheckResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/integrations/{company_id}/{provider}/connect":{"post":{"tags":["integrations"],"summary":"Connect Integration","operationId":"connect_integration_api_integrations__company_id___provider__connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"shopDomain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shopdomain"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Connect Integration"}},"/api/integrations/{company_id}/{provider}/connect-api-key":{"post":{"tags":["integrations"],"summary":"Connect Integration Api Key","operationId":"connect_integration_api_key_api_integrations__company_id___provider__connect_api_key_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Connect Integration Api Key"}},"/api/integrations/oauth/{provider}/callback":{"get":{"tags":["integrations"],"summary":"Integration Oauth Callback","operationId":"integration_oauth_callback_api_integrations_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Integration Oauth Callback"}},"/api/integrations/{company_id}/{provider}/sync":{"post":{"tags":["integrations"],"summary":"Sync Integration","operationId":"sync_integration_api_integrations__company_id___provider__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSyncJobStartResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Sync Integration"}},"/api/integrations/{company_id}/square/gift-card-activities":{"get":{"tags":["integrations"],"summary":"Get Square Gift Card Activities","description":"Return bounded evidence with explicit accounting limitations.","operationId":"get_square_gift_card_activities_api_integrations__company_id__square_gift_card_activities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"activity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity Type"}},{"name":"location_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location External Id"}},{"name":"gift_card_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gift Card External Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Square Gift Card Activities Api Integrations  Company Id  Square Gift Card Activities Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/integrations/{company_id}/{provider}/sync-start-date":{"patch":{"tags":["integrations"],"summary":"Update Integration Sync Start Date","operationId":"update_integration_sync_start_date_api_integrations__company_id___provider__sync_start_date_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSyncStartDateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Update Integration Sync Start Date"}},"/api/integrations/{company_id}/{provider}/disconnect":{"delete":{"tags":["integrations"],"summary":"Disconnect Integration","operationId":"disconnect_integration_api_integrations__company_id___provider__disconnect_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"type":"string","title":"Provider"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Disconnect Integration"}},"/api/email-connections/{company_id}/status":{"get":{"tags":["email-connections"],"summary":"Get Email Connection Status","operationId":"get_email_connection_status_api_email_connections__company_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"provider","in":"query","required":false,"schema":{"enum":["gmail","microsoft"],"type":"string","default":"gmail","title":"Provider"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConnectionStatusResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Email Connection Status"}},"/api/email-connections/{company_id}/gmail/connect":{"post":{"tags":["email-connections"],"summary":"Connect Gmail","operationId":"connect_gmail_api_email_connections__company_id__gmail_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EmailConnectionConnectRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConnectionConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Connect Gmail"}},"/api/email-connections/{company_id}/microsoft/connect":{"post":{"tags":["email-connections"],"summary":"Connect Microsoft","operationId":"connect_microsoft_api_email_connections__company_id__microsoft_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EmailConnectionConnectRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConnectionConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Connect Microsoft"}},"/api/email-connections/oauth/gmail/callback":{"get":{"tags":["email-connections"],"summary":"Gmail Oauth Callback","operationId":"gmail_oauth_callback_api_email_connections_oauth_gmail_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Gmail Oauth Callback"}},"/api/email-connections/oauth/microsoft/callback":{"get":{"tags":["email-connections"],"summary":"Microsoft Oauth Callback","operationId":"microsoft_oauth_callback_api_email_connections_oauth_microsoft_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Microsoft Oauth Callback"}},"/api/email-connections/{company_id}/gmail/{connection_id}":{"delete":{"tags":["email-connections"],"summary":"Disconnect Gmail","operationId":"disconnect_gmail_api_email_connections__company_id__gmail__connection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Disconnect Gmail"}},"/api/email-connections/{company_id}/microsoft/{connection_id}":{"delete":{"tags":["email-connections"],"summary":"Disconnect Microsoft","operationId":"disconnect_microsoft_api_email_connections__company_id__microsoft__connection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Disconnect Microsoft"}},"/api/slack/reauth/{token}":{"get":{"tags":["slack"],"summary":"Slack Reauth Redirect","description":"Redirect a Slack re-auth button into Slack's consent screen.\n\nReason: POR-1879 — this route exists so a Slack Block Kit button can start\nthe grant. It is deliberately public-by-token and mints OAuth state at click\ntime: `oauth_states` expires after 10 minutes, and a button living in a Slack\nmessage is tapped hours or days later, so a pre-baked authorize URL would\nalways land on \"Invalid or expired Slack OAuth state\". Registered ahead of\nthe `/{company_id}/...` routes so the literal `reauth` segment always wins.","operationId":"slack_reauth_redirect_api_slack_reauth__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/slack/{company_id}/status":{"get":{"tags":["slack"],"summary":"Slack Status","operationId":"slack_status_api_slack__company_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackStatusResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Slack Status"}},"/api/slack/{company_id}/connect":{"post":{"tags":["slack"],"summary":"Connect Slack","operationId":"connect_slack_api_slack__company_id__connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Connect Slack"}},"/api/slack/oauth/callback":{"get":{"tags":["slack"],"summary":"Slack Oauth Callback","operationId":"slack_oauth_callback_api_slack_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Slack Oauth Callback"}},"/api/slack/events":{"post":{"tags":["slack"],"summary":"Slack Events","operationId":"slack_events_api_slack_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Slack Events Api Slack Events Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Slack Events"}},"/api/slack/interactivity":{"post":{"tags":["slack"],"summary":"Slack Interactivity","operationId":"slack_interactivity_api_slack_interactivity_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Slack Interactivity Api Slack Interactivity Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Slack Interactivity"}},"/api/revenue-recognition/{company_id}/preview/{year}/{month}":{"get":{"tags":["revenue-recognition"],"summary":"Preview Recognition","description":"Preview revenue recognition for a specific month.\n\nReason: Shows what the JE will look like before posting.\nDelegates schedule-driven recognition assembly to the shared service.","operationId":"preview_recognition_api_revenue_recognition__company_id__preview__year___month__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"path","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"path","required":true,"schema":{"type":"integer","title":"Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecognitionPreviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/summary":{"get":{"tags":["rollforwards"],"summary":"Get Rollforward Summary","description":"Get rollforward summary for the specified account type.\n\nReason: Shows month-over-month changes in unbilled or deferred revenue.","operationId":"get_rollforward_summary_api_rollforwards__company_id__summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"account_type","in":"query","required":false,"schema":{"type":"string","description":"'unbilled' or 'deferred'","default":"unbilled","title":"Account Type"},"description":"'unbilled' or 'deferred'"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"description":"Number of months to include","default":6,"title":"Months"},"description":"Number of months to include"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollforwardSummaryResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/flat-table":{"get":{"tags":["rollforwards"],"summary":"Get Rollforward Flat Table","description":"Get per-subscription rollforward for a specific period.\n\nReason: Detailed view showing each subscription's contribution to the rollforward.","operationId":"get_rollforward_flat_table_api_rollforwards__company_id__flat_table_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"account_type","in":"query","required":false,"schema":{"type":"string","description":"'unbilled' or 'deferred'","default":"unbilled","title":"Account Type"},"description":"'unbilled' or 'deferred'"},{"name":"period_year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Year for the period (defaults to current)","title":"Period Year"},"description":"Year for the period (defaults to current)"},{"name":"period_month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":12,"minimum":1},{"type":"null"}],"description":"Month for the period (defaults to current)","title":"Period Month"},"description":"Month for the period (defaults to current)"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlatTableResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/period-detail/bulk":{"post":{"tags":["rollforwards"],"summary":"Get Bulk Period Detail","description":"Bulk fetch period detail data for multiple periods at once.\n\nReason: The shared rollforward service computes expensive schedules once and\nextracts all requested period details from that same result set.","operationId":"get_bulk_period_detail_api_rollforwards__company_id__period_detail_bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPeriodDetailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPeriodDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/revenue-recognition":{"get":{"tags":["rollforwards"],"summary":"Get Revenue Recognition Rollforward","description":"Get revenue recognition rollforward (P&L view).\n\nReason: Thin router — delegates to _get_rev_rec_rollforward helper.","operationId":"get_revenue_recognition_rollforward_api_rollforwards__company_id__revenue_recognition_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"description":"Number of months to include","default":6,"title":"Months"},"description":"Number of months to include"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueRecognitionRollforwardResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/revenue-recognition/{period}":{"get":{"tags":["rollforwards"],"summary":"Get Revenue Recognition Period Detail","description":"Get detailed revenue recognition for a specific period.","operationId":"get_revenue_recognition_period_detail_api_rollforwards__company_id__revenue_recognition__period__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueRecognitionPeriodDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/unbilled-revenue":{"get":{"tags":["rollforwards"],"summary":"Get Unbilled Revenue Rollforward","description":"Get unbilled revenue rollforward.\n\nReason: Shows how unbilled revenue balance changes over time.\nAdditions = new unbilled (service delivered, not yet invoiced).\nReductions = invoices issued (clearing unbilled).","operationId":"get_unbilled_revenue_rollforward_api_rollforwards__company_id__unbilled_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"description":"Number of months to include","default":6,"title":"Months"},"description":"Number of months to include"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetRollforwardResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/unbilled-revenue/{period}":{"get":{"tags":["rollforwards"],"summary":"Get Unbilled Revenue Period Detail","description":"Get detailed unbilled revenue changes for a specific period.","operationId":"get_unbilled_revenue_period_detail_api_rollforwards__company_id__unbilled_revenue__period__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetPeriodDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/deferred-revenue":{"get":{"tags":["rollforwards"],"summary":"Get Deferred Revenue Rollforward","description":"Get deferred revenue rollforward.\n\nReason: Shows how deferred revenue balance changes over time.\nAdditions = invoices exceeding unbilled (prepayments received).\nReductions = recognition of prepaid revenue.","operationId":"get_deferred_revenue_rollforward_api_rollforwards__company_id__deferred_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"description":"Number of months to include","default":6,"title":"Months"},"description":"Number of months to include"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetRollforwardResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/deferred-revenue/{period}":{"get":{"tags":["rollforwards"],"summary":"Get Deferred Revenue Period Detail","description":"Get detailed deferred revenue changes for a specific period.","operationId":"get_deferred_revenue_period_detail_api_rollforwards__company_id__deferred_revenue__period__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetPeriodDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/accounts-receivable":{"get":{"tags":["rollforwards"],"summary":"Get Accounts Receivable Rollforward","description":"Get accounts receivable rollforward.\n\nReason: Shows how A/R balance changes over time.\nAdditions = invoices issued.\nReductions = payments received.","operationId":"get_accounts_receivable_rollforward_api_rollforwards__company_id__accounts_receivable_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"description":"Number of months to include","default":6,"title":"Months"},"description":"Number of months to include"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetRollforwardResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/accounts-receivable/{period}":{"get":{"tags":["rollforwards"],"summary":"Get Accounts Receivable Period Detail","description":"Get detailed A/R changes for a specific period.","operationId":"get_accounts_receivable_period_detail_api_rollforwards__company_id__accounts_receivable__period__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetPeriodDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/rollforwards/{company_id}/ar-balance":{"get":{"tags":["rollforwards"],"summary":"Get Ar Balance As Of","description":"Get AR balance as of a specific date.\n\nReason: POR-139 — AR = sum of open invoices as of month-end. This is the\ncorrect point-in-time calculation for reconciliation and month-end close.","operationId":"get_ar_balance_as_of_api_rollforwards__company_id__ar_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"as_of_date","in":"query","required":false,"schema":{"type":"string","description":"Date to calculate AR balance as of (YYYY-MM-DD). Defaults to today.","title":"As Of Date"},"description":"Date to calculate AR balance as of (YYYY-MM-DD). Defaults to today."},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ARBalanceAsOfResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}":{"get":{"tags":["journal-entries"],"summary":"List Journal Entries","description":"List journal entries for a company.\n\nReason: Aggregates subscription-based recognition entries by month.\nThese are the month-end JEs (DR Unbilled/Deferred, CR Revenue).\nInvoices post separately - this only shows recognition entries.\n\nThe from_unbilled vs from_deferred split comes from schedule-based\ncalculations (deferred_revenue_change from month-end entries).\n\nShows a fixed window of months (consistent with rollforwards page).\nPeriods with no recognition data show $0.","operationId":"list_journal_entries_api_journal_entries__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (draft, posted)","title":"Status"},"description":"Filter by status (draft, posted)"},{"name":"period_year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by year","title":"Period Year"},"description":"Filter by year"},{"name":"period_month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by month","title":"Period Month"},"description":"Filter by month"},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"description":"Number of months to show","default":12,"title":"Months"},"description":"Number of months to show"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort column","default":"jeDate","title":"Sort By"},"description":"Sort column"},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","description":"Sort direction (asc, desc)","default":"desc","title":"Sort Direction"},"description":"Sort direction (asc, desc)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":12,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntriesListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/posted-periods":{"get":{"tags":["journal-entries"],"summary":"Get Posted Periods","description":"Get list of periods with recognition data.","operationId":"get_posted_periods_api_journal_entries__company_id__posted_periods_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostedPeriodsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/detailed-breakdown":{"get":{"tags":["journal-entries"],"summary":"Get Detailed Breakdown","description":"Get per-subscription detailed breakdown of recognition entries.","operationId":"get_detailed_breakdown_api_journal_entries__company_id__detailed_breakdown_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by year","title":"Year"},"description":"Filter by year"},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by month","title":"Month"},"description":"Filter by month"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort column","default":"amountRecognized","title":"Sort By"},"description":"Sort column"},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","description":"Sort direction","default":"desc","title":"Sort Direction"},"description":"Sort direction"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedBreakdownResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/manual":{"post":{"tags":["journal-entries"],"summary":"Create Manual Journal Entry","description":"Create a manual adjusting journal entry with balanced debit/credit lines.","operationId":"create_manual_journal_entry_api_journal_entries__company_id__manual_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManualJERequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManualJEResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/manual/{je_id}":{"patch":{"tags":["journal-entries"],"summary":"Update Manual Journal Entry","description":"Replace a draft manual/MCP journal entry with balanced form-submitted fields.","operationId":"update_manual_journal_entry_api_journal_entries__company_id__manual__je_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"je_id","in":"path","required":true,"schema":{"type":"string","title":"Je Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateManualJERequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateManualJEResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["journal-entries"],"summary":"Delete Manual Journal Entry","description":"Delete a draft manual/MCP journal entry before it posts to QBO.","operationId":"delete_manual_journal_entry_api_journal_entries__company_id__manual__je_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"je_id","in":"path","required":true,"schema":{"type":"string","title":"Je Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteManualJEResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/unified":{"get":{"tags":["journal-entries"],"summary":"List Unified Journal Entries","description":"List unified journal entries for a company — all source types.\n\nReason: Replaces the subscription-only JE list with a unified view that shows\nall 11 source types (revenue recognition, 6 schedule types, 4 event types).\nEach row = one source type + one month.\nOnly emits rows where data exists (no zero rows).","operationId":"list_unified_journal_entries_api_journal_entries__company_id__unified_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"sourceType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source type key","title":"Sourcetype"},"description":"Filter by source type key"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (draft, posted, excluded)","title":"Status"},"description":"Filter by status (draft, posted, excluded)"},{"name":"postingStatus","in":"query","required":false,"schema":{"enum":["posted","pending","all"],"type":"string","description":"Filter by Porter-book posting status","default":"all","title":"Postingstatus"},"description":"Filter by Porter-book posting status"},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","description":"Sort column","default":"periodMonth","title":"Sortby"},"description":"Sort column"},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","description":"Sort direction (asc, desc)","default":"desc","title":"Sortdirection"},"description":"Sort direction (asc, desc)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"periodYear","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by year","title":"Periodyear"},"description":"Filter by year"},{"name":"periodMonth","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by month","title":"Periodmonth"},"description":"Filter by month"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter by JE date from","title":"Datefrom"},"description":"Filter by JE date from"},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter by JE date to","title":"Dateto"},"description":"Filter by JE date to"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search period, source, status, or memo","title":"Search"},"description":"Search period, source, status, or memo"},{"name":"entryScope","in":"query","required":false,"schema":{"enum":["all","recorded"],"type":"string","description":"all unified sources or recorded JE rows only","default":"all","title":"Entryscope"},"description":"all unified sources or recorded JE rows only"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedJournalEntriesListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/unified/{entry_id}":{"get":{"tags":["journal-entries"],"summary":"Get Unified Journal Entry","description":"Get detail for a single unified journal entry.\n\nReason: Report/GL drill-downs can hand this route a raw journal_entries UUID.\nThe bridge first checks generated posting receipts, then falls back to the\nmanual/QBO unified id shape; the raw parser alone misroutes generated Rev\nRec true-up receipt UUIDs to an empty manual detail.","operationId":"get_unified_journal_entry_api_journal_entries__company_id__unified__entry_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnifiedJEDetailResponse"},{"type":"null"}],"title":"Response Get Unified Journal Entry Api Journal Entries  Company Id  Unified  Entry Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/unified/post":{"post":{"tags":["journal-entries"],"summary":"Post Unified Journal Entry","description":"Post any unified journal entry.\n\nReason: POR-972 — Thin handler. Delegates to the journal-postings\nservice via the JE commands service. ``resolve_posting_target``\nraises ``QboReconnectRequiredError`` (409) if qbo_realm_id is present\nbut tokens are missing/stale — we refuse to write to either ledger\nuntil the user reconnects QBO so Porter and QBO cannot diverge.","operationId":"post_unified_journal_entry_api_journal_entries__company_id__unified_post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUnifiedJERequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUnifiedJEResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/unified/exclude":{"post":{"tags":["journal-entries"],"summary":"Exclude Unified Journal Entry","description":"Exclude a virtual computed period JE candidate from Monthly Close posting.","operationId":"exclude_unified_journal_entry_api_journal_entries__company_id__unified_exclude_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeUnifiedJERequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeUnifiedJEResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/journal-entries/{company_id}/unified/{entry_id}/revert":{"post":{"tags":["journal-entries"],"summary":"Revert Unified Journal Entry","description":"Revert (unpost) a unified journal entry.\n\nReason: POR-347 / POR-1127 — Thin adapter over\n``revert_unified_journal_entry_for_company`` so UI, AI, and MCP surfaces\nshare the same orchestration.","operationId":"revert_unified_journal_entry_api_journal_entries__company_id__unified__entry_id__revert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertUnifiedJEResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/modifications/{company_id}/entity/{entity_type}/{entity_id}":{"get":{"tags":["entity-change-history"],"summary":"Get Entity Field Changes","description":"Get field-change history for a specific entity.","operationId":"get_entity_field_changes_api_modifications__company_id__entity__entity_type___entity_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"type":"string","title":"Entity Type"}},{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Pagination limit","default":50,"title":"Limit"},"description":"Pagination limit"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityFieldChangeHistoryResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/leases/{company_id}":{"get":{"tags":["leases"],"summary":"List Leases","description":"List all leases for a company.","operationId":"list_leases_api_leases__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeaseResponse"},"title":"Response List Leases Api Leases  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["leases"],"summary":"Create Lease","description":"Create a new lease.\n\nReason: POR-79 — creates a lease record with rent terms and GL account\nmappings. Schedule generation for straight-line rent recognition can be\nhandled separately via the schedules API.","operationId":"create_lease_api_leases__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/leases/{company_id}/{lease_id}":{"patch":{"tags":["leases"],"summary":"Update Lease","description":"Update a lease.","operationId":"update_lease_api_leases__company_id___lease_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lease_id","in":"path","required":true,"schema":{"type":"string","title":"Lease Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["leases"],"summary":"Delete Lease","description":"Delete a lease.","operationId":"delete_lease_api_leases__company_id___lease_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lease_id","in":"path","required":true,"schema":{"type":"string","title":"Lease Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/company-account-settings/{company_id}":{"get":{"tags":["company-account-settings"],"summary":"Get Company Account Settings","description":"Get company account settings.\n\nReason: Returns the company's configured account settings, or null if not yet configured.","operationId":"get_company_account_settings_api_company_account_settings__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CompanyAccountSettingsResponse"},{"type":"null"}],"title":"Response Get Company Account Settings Api Company Account Settings  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["company-account-settings"],"summary":"Upsert Company Account Settings","description":"Create or update company account settings.\n\nReason: Upsert pattern — frontend can PUT without knowing if a row exists.","operationId":"upsert_company_account_settings_api_company_account_settings__company_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAccountSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAccountSettingsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/mcp-connections/{company_id}":{"get":{"tags":["mcp-connections"],"summary":"List Mcp Connections","description":"List the MCP servers connected for this company.","operationId":"list_mcp_connections_api_mcp_connections__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpConnectionResponse"},"title":"Response List Mcp Connections Api Mcp Connections  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["mcp-connections"],"summary":"Create Mcp Connection","description":"Register an MCP server after verifying it answers.","operationId":"create_mcp_connection_api_mcp_connections__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpConnectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpConnectionCreated"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/mcp-connections/{company_id}/{connection_id}/tools":{"get":{"tags":["mcp-connections"],"summary":"Get Mcp Connection Tools","description":"Return the tools one connected server currently advertises.","operationId":"get_mcp_connection_tools_api_mcp_connections__company_id___connection_id__tools_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpRemoteTool"},"title":"Response Get Mcp Connection Tools Api Mcp Connections  Company Id   Connection Id  Tools Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/mcp-connections/{company_id}/{connection_id}":{"delete":{"tags":["mcp-connections"],"summary":"Delete Mcp Connection","description":"Remove a connection and its stored credential.","operationId":"delete_mcp_connection_api_mcp_connections__company_id___connection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}":{"get":{"tags":["development-periods"],"summary":"List Dev Periods","description":"List all development periods for a company, optionally filtered by status.\n\nReason: Supports filtering by status (in_progress, complete) to segment\nactive projects from completed ones.","operationId":"list_dev_periods_api_dev_periods__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DevPeriodResponse"},"title":"Response List Dev Periods Api Dev Periods  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["development-periods"],"summary":"Create Dev Period","description":"Create a new development period.\n\nReason: POR-76 — creates a development period to track capitalized\nsoftware costs. Periods start as 'in_progress' and must be marked\n'complete' before amortization begins.","operationId":"create_dev_period_api_dev_periods__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevPeriodCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevPeriodResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}/{period_id}":{"patch":{"tags":["development-periods"],"summary":"Update Dev Period","description":"Update a development period.\n\nReason: Allows updating project details. Status transitions should use\nthe dedicated complete endpoint.","operationId":"update_dev_period_api_dev_periods__company_id___period_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_id","in":"path","required":true,"schema":{"type":"string","title":"Period Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevPeriodUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevPeriodResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["development-periods"],"summary":"Delete Dev Period","description":"Delete a development period.\n\nReason: Allows cleanup of development periods. Should validate that no\namortization schedules exist before deletion in production.","operationId":"delete_dev_period_api_dev_periods__company_id___period_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_id","in":"path","required":true,"schema":{"type":"string","title":"Period Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}/{period_id}/complete":{"patch":{"tags":["development-periods"],"summary":"Complete Dev Period","description":"Mark a development period as complete.\n\nReason: POR-76 — transitions status from 'in_progress' to 'complete' and\nsets completed_at timestamp. This triggers amortization schedule generation.","operationId":"complete_dev_period_api_dev_periods__company_id___period_id__complete_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_id","in":"path","required":true,"schema":{"type":"string","title":"Period Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevPeriodResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}/cost-pools":{"get":{"tags":["development-periods"],"summary":"List Cost Pools","description":"List cost pools for a company, optionally filtered by year.\n\nReason: POR-77 — provides historical view of monthly capitalization decisions.","operationId":"list_cost_pools_api_dev_periods__company_id__cost_pools_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2100,"minimum":2000},{"type":"null"}],"title":"Year"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPoolListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}/cost-pools/{period_month}":{"get":{"tags":["development-periods"],"summary":"Get Cost Pool","description":"Get cost pool detail for a specific month with lines and allocations.\n\nReason: POR-77 — detail view shows which accounts contributed and how\nthe capitalizable amount was allocated to dev periods.","operationId":"get_cost_pool_api_dev_periods__company_id__cost_pools__period_month__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_month","in":"path","required":true,"schema":{"type":"string","title":"Period Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPoolResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["development-periods"],"summary":"Delete Cost Pool","description":"Delete a cost pool (only if not yet posted).\n\nReason: Allows recalculation by deleting and regenerating.\nPosted cost pools must be reversed first.","operationId":"delete_cost_pool_api_dev_periods__company_id__cost_pools__period_month__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_month","in":"path","required":true,"schema":{"type":"string","title":"Period Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}/calculate-cost-pool":{"post":{"tags":["development-periods"],"summary":"Calculate Cost Pool","description":"Calculate and persist a cost pool for a month (POR-77).","operationId":"calculate_cost_pool_api_dev_periods__company_id__calculate_cost_pool_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPoolCalculateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPoolResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}/cost-pools/{period_month}/post":{"post":{"tags":["development-periods"],"summary":"Post Cost Pool","description":"Post a cost pool by creating GL journal entries (POR-77).","operationId":"post_cost_pool_api_dev_periods__company_id__cost_pools__period_month__post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_month","in":"path","required":true,"schema":{"type":"string","title":"Period Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPoolResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev-periods/{company_id}/cost-pools/{period_month}/reverse":{"post":{"tags":["development-periods"],"summary":"Reverse Cost Pool","description":"Reverse a posted cost pool with offsetting GL entries (POR-77).","operationId":"reverse_cost_pool_api_dev_periods__company_id__cost_pools__period_month__reverse_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period_month","in":"path","required":true,"schema":{"type":"string","title":"Period Month"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPoolResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/dev/ontology-explorer":{"get":{"tags":["dev-ontology-explorer"],"summary":"Ontology Explorer Page","operationId":"ontology_explorer_page_api_dev_ontology_explorer_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Ontology Explorer Page"}},"/api/dev/ontology-explorer/get-ontology":{"get":{"tags":["dev-ontology-explorer"],"summary":"Ontology Explorer Get Ontology","operationId":"ontology_explorer_get_ontology_api_dev_ontology_explorer_get_ontology_get","parameters":[{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"entity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Ontology Explorer Get Ontology"}},"/api/dev/ontology-explorer/describe":{"get":{"tags":["dev-ontology-explorer"],"summary":"Ontology Explorer Describe","operationId":"ontology_explorer_describe_api_dev_ontology_explorer_describe_get","parameters":[{"name":"tool","in":"query","required":true,"schema":{"type":"string","title":"Tool"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Ontology Explorer Describe"}},"/api/internal/ontology/get-ontology":{"get":{"tags":["internal-ontology","internal-ontology"],"summary":"Internal Ontology Get Ontology","operationId":"internal_ontology_get_ontology_api_internal_ontology_get_ontology_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"entity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Internal Ontology Get Ontology"}},"/api/internal/ontology/describe":{"get":{"tags":["internal-ontology","internal-ontology"],"summary":"Internal Ontology Describe","operationId":"internal_ontology_describe_api_internal_ontology_describe_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tool","in":"query","required":true,"schema":{"type":"string","title":"Tool"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Internal Ontology Describe"}},"/api/internal/prompt-surfaces/{surface_id}":{"get":{"tags":["internal-prompts","internal-prompts"],"summary":"Get Prompt Surface","description":"Return the prompts relevant to one internal editor surface.","operationId":"get_prompt_surface_api_internal_prompt_surfaces__surface_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"surface_id","in":"path","required":true,"schema":{"type":"string","title":"Surface Id"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSurfaceManifest"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/internal/prompts/{prompt_slug}":{"get":{"tags":["internal-prompts","internal-prompts"],"summary":"Get Internal Prompt","description":"Return one registered prompt as ordered components.","operationId":"get_internal_prompt_api_internal_prompts__prompt_slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_slug","in":"path","required":true,"schema":{"type":"string","title":"Prompt Slug"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}},{"name":"conversationId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptManifest"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/internal/prompts/{prompt_slug}/components/{component_key}/override":{"put":{"tags":["internal-prompts","internal-prompts"],"summary":"Update Internal Prompt Component Override","description":"Create one prompt component version.","operationId":"update_internal_prompt_component_override_api_internal_prompts__prompt_slug__components__component_key__override_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_slug","in":"path","required":true,"schema":{"type":"string","title":"Prompt Slug"}},{"name":"component_key","in":"path","required":true,"schema":{"type":"string","title":"Component Key"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptOverrideUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptManifest"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["internal-prompts","internal-prompts"],"summary":"Reset Internal Prompt Component Override","description":"Restore one prompt component to its default body while preserving history.","operationId":"reset_internal_prompt_component_override_api_internal_prompts__prompt_slug__components__component_key__override_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_slug","in":"path","required":true,"schema":{"type":"string","title":"Prompt Slug"}},{"name":"component_key","in":"path","required":true,"schema":{"type":"string","title":"Component Key"}},{"name":"companyId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptManifest"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/posting-batches/{company_id}":{"get":{"tags":["posting-batches"],"summary":"List Posting Batches","description":"List posting batches for the company, most recent first.\n\nReason: Provides the data for the QBO Posting History page.","operationId":"list_posting_batches_api_posting_batches__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: posted, reverted, partial_revert","title":"Status"},"description":"Filter by status: posted, reverted, partial_revert"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostingBatchListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/posting-batches/{company_id}/{batch_id}":{"get":{"tags":["posting-batches"],"summary":"Get Posting Batch Detail","description":"Get a single posting batch with its linked items.\n\nReason: Lets users see which specific transactions/JEs were in a batch.","operationId":"get_posting_batch_detail_api_posting_batches__company_id___batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostingBatchDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/posting-batches/{company_id}/{batch_id}/revert":{"post":{"tags":["posting-batches"],"summary":"Revert Posting Batch","description":"Revert (unpost) all items in a batch from QBO.\n\nReason: Deletes QBO entities and resets Porter records for the entire batch.\nHandles partial success — if some items fail to unpost, the batch is marked\nas 'partial_revert' rather than failing entirely.","operationId":"revert_posting_batch_api_posting_batches__company_id___batch_id__revert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertBatchResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/helcim/{company_id}/status":{"get":{"tags":["helcim"],"summary":"Get Helcim Status","operationId":"get_helcim_status_api_helcim__company_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimStatusResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Helcim Status"}},"/api/helcim/{company_id}/connect":{"post":{"tags":["helcim"],"summary":"Connect Helcim","operationId":"connect_helcim_api_helcim__company_id__connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimConnectResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Connect Helcim"}},"/api/helcim/{company_id}/sync":{"post":{"tags":["helcim"],"summary":"Sync Helcim","operationId":"sync_helcim_api_helcim__company_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"dateFrom","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Datefrom"}},{"name":"dateTo","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dateto"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSyncJobStartResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Sync Helcim"}},"/api/helcim/{company_id}/myhelcim-subdomain":{"patch":{"tags":["helcim"],"summary":"Update Helcim Myhelcim Subdomain","description":"Set the merchant's myhelcim.com subdomain for invoice payment URLs.\n\nReason: Helcim does not expose the merchant DBA subdomain via any API, but the\ncustomer-facing invoice Pay URL ({subdomain}.myhelcim.com/order/?token=...)\nrequires it. The operator enters it once here; input is normalized to the\ncanonical slug so a pasted host or full URL still works.","operationId":"update_helcim_myhelcim_subdomain_api_helcim__company_id__myhelcim_subdomain_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimSubdomainRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelcimStatusResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/helcim/{company_id}/disconnect":{"delete":{"tags":["helcim"],"summary":"Disconnect Helcim","operationId":"disconnect_helcim_api_helcim__company_id__disconnect_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Disconnect Helcim Api Helcim  Company Id  Disconnect Delete"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Disconnect Helcim"}},"/api/square-payments/webhook":{"post":{"tags":["square-payments","square-payments"],"summary":"Square Webhook","description":"Adapt Square's HTTP request to the canonical webhook intake command.","operationId":"square_webhook_api_square_payments_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/sales/{company_id}":{"get":{"tags":["sales","processor-settlements"],"summary":"List Sales","description":"List canonical Sales without unioning Customer Payment rows.","operationId":"list_sales_api_sales__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["recognized","needs_review","ready"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"posting_status","in":"query","required":false,"schema":{"anyOf":[{"enum":["posted","pending"],"type":"string"},{"type":"null"}],"title":"Posting Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"location_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location External Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleListRecord"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/commerce/{company_id}/post":{"post":{"tags":["sales","processor-settlements"],"summary":"Post Commerce Roots","description":"Post exact canonical Sales followed by exact canonical Refunds.","operationId":"post_commerce_roots_api_commerce__company_id__post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCommerceRootsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCommerceRootsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/sales/{company_id}/post":{"post":{"tags":["sales","processor-settlements"],"summary":"Post Sales","description":"Post Ready Sales to the books for a period or an explicit id list.\n\nReason: POR-2484 -- Square sales arrive in Ready and are posted deliberately\nat close, by a person or by Porter AI. Recognition used to happen as a side\neffect of syncing, so there was no way to choose the moment.","operationId":"post_sales_api_sales__company_id__post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSalesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSalesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/sales/{company_id}/refunds/post":{"post":{"tags":["sales","processor-settlements"],"summary":"Post Sale Refunds","description":"Post refunds recorded as evidence to the books for a period or id list.\n\nReason: POR-2492 -- a separate action from posting Sales, matching the\ninvoice precedent where a write-off has its own posting command. The\nsale-before-refund ordering is enforced inside the command rather than by\nmerging the two actions.","operationId":"post_sale_refunds_api_sales__company_id__refunds_post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSaleRefundsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSaleRefundsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/sales/{company_id}/{sale_id}":{"get":{"tags":["sales","processor-settlements"],"summary":"Get Sale","description":"Return a Sale with its child Tenders and returns.","operationId":"get_sale_api_sales__company_id___sale_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","title":"Sale Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDetailRecord"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/sales/{company_id}/{sale_id}/corrections":{"post":{"tags":["sales","processor-settlements"],"summary":"Correct Commerce Sale","description":"Apply one append-only correction against an exact reviewed Sale snapshot.","operationId":"correct_commerce_sale_api_sales__company_id___sale_id__corrections_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"string","title":"Sale Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectCommerceSaleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectCommerceSaleResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}":{"get":{"tags":["sales","processor-settlements"],"summary":"List Processor Settlements","description":"List payout groups as non-GL bank-reconciliation evidence.","operationId":"list_processor_settlements_api_processor_settlements__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorSettlementGroupRecord"},"title":"Response List Processor Settlements Api Processor Settlements  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/by-payment/{payment_id}":{"get":{"tags":["sales","processor-settlements"],"summary":"Get Processor Settlement For Payment","description":"Return the payout detail linked to one canonical customer payment.","operationId":"get_processor_settlement_for_payment_api_processor_settlements__company_id__by_payment__payment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProcessorSettlementDetailRecord"},{"type":"null"}],"title":"Response Get Processor Settlement For Payment Api Processor Settlements  Company Id  By Payment  Payment Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/{settlement_id}":{"get":{"tags":["sales","processor-settlements"],"summary":"Get Processor Settlement","description":"Return one payout and its exact provider entry membership.","operationId":"get_processor_settlement_api_processor_settlements__company_id___settlement_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"string","title":"Settlement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorSettlementDetailRecord"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/{settlement_id}/costs/post":{"post":{"tags":["sales","processor-settlements"],"summary":"Post Processor Settlement Costs Endpoint","description":"Post exact payout-entry costs through the shared accounting command.","operationId":"post_processor_settlement_costs_endpoint_api_processor_settlements__company_id___settlement_id__costs_post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"string","title":"Settlement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostProcessorSettlementCostsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostProcessorSettlementCostsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/{settlement_id}/commerce-roots/post":{"post":{"tags":["sales","processor-settlements"],"summary":"Post Processor Settlement Commerce Roots","description":"Deliberately post payout-linked Sale/Refund roots on business dates.","operationId":"post_processor_settlement_commerce_roots_api_processor_settlements__company_id___settlement_id__commerce_roots_post_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"string","title":"Settlement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostProcessorSettlementCommerceRootsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/match-candidates/{bank_transaction_id}":{"get":{"tags":["sales","processor-settlements"],"summary":"List Bank Transaction Settlement Candidates","description":"List payouts that may claim or (unresolved) explain this deposit; never claims cash.","operationId":"list_bank_transaction_settlement_candidates_api_processor_settlements__company_id__match_candidates__bank_transaction_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bank_transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Bank Transaction Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorSettlementGroupRecord"},"title":"Response List Bank Transaction Settlement Candidates Api Processor Settlements  Company Id  Match Candidates  Bank Transaction Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/{settlement_id}/bank-match-candidates":{"get":{"tags":["sales","processor-settlements"],"summary":"List Processor Settlement Bank Candidates","description":"List bank deposits this payout may claim, without linking any of them.","operationId":"list_processor_settlement_bank_candidates_api_processor_settlements__company_id___settlement_id__bank_match_candidates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"string","title":"Settlement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorSettlementBankCandidateRecord"},"title":"Response List Processor Settlement Bank Candidates Api Processor Settlements  Company Id   Settlement Id  Bank Match Candidates Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/{settlement_id}/bank-match":{"post":{"tags":["sales","processor-settlements"],"summary":"Match Processor Settlement Bank Transaction","description":"Claim one operator-selected bank row through the exact payout invariant.","operationId":"match_processor_settlement_bank_transaction_api_processor_settlements__company_id___settlement_id__bank_match_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"string","title":"Settlement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorSettlementBankMatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorSettlementGroupRecord"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/square-review/{company_id}":{"get":{"tags":["sales","processor-settlements"],"summary":"Get Square Review","description":"Return every current Square evidence class requiring attention.","operationId":"get_square_review_api_square_review__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquareReviewResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/processor-settlements/{company_id}/{settlement_id}/bank-match-review":{"get":{"tags":["sales","processor-settlements"],"summary":"Preview Processor Settlement Bank Review","operationId":"preview_processor_settlement_bank_review_api_processor_settlements__company_id___settlement_id__bank_match_review_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"string","title":"Settlement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorSettlementReview"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Preview Processor Settlement Bank Review"},"post":{"tags":["sales","processor-settlements"],"summary":"Confirm Processor Settlement Bank Review","operationId":"confirm_processor_settlement_bank_review_api_processor_settlements__company_id___settlement_id__bank_match_review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"string","title":"Settlement Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorSettlementBankReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorSettlementReview"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Confirm Processor Settlement Bank Review"}},"/api/stripe-payments/webhook":{"post":{"tags":["stripe-payments","stripe-payments"],"summary":"Stripe Connect Webhook","operationId":"stripe_connect_webhook_api_stripe_payments_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Stripe Connect Webhook"}},"/api/webhooks/helcim/connected-account":{"post":{"tags":["helcim","webhooks"],"summary":"Helcim Connected Account Webhook","description":"Accept Helcim's connectedAccount approval webhook.\n\nReason: This is the only signal that the merchant finished signup. The\npayload carries the merchant `apiToken` — encrypt it via the shared\n`integration_token_store` (secrets DB, provider='helcim') and flip the pending\npayment_processor_connections row to active. Verified responses always\nreturn 200 so Helcim's retry queue doesn't redeliver duplicates.","operationId":"helcim_connected_account_webhook_api_webhooks_helcim_connected_account_post","parameters":[{"name":"webhook-id","in":"header","required":false,"schema":{"type":"string","default":"","title":"Webhook-Id"}},{"name":"webhook-timestamp","in":"header","required":false,"schema":{"type":"string","default":"","title":"Webhook-Timestamp"}},{"name":"webhook-signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"Webhook-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Helcim Connected Account Webhook Api Webhooks Helcim Connected Account Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/ramp/{company_id}":{"post":{"tags":["ramp","webhooks"],"summary":"Ramp Webhook","description":"Accept a Ramp bill event for one company and enqueue the canonical sync.\n\nCompany identity is the URL path, not a header: Ramp omits the\nsubscription's `additional_headers` on its verification request, so a\nheader-only design leaves that request unattributable and the subscription\nstuck `pending_verification` forever (POR-2020, observed live).","operationId":"ramp_webhook_api_webhooks_ramp__company_id__post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ramp Webhook Api Webhooks Ramp  Company Id  Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/mercury/events":{"post":{"tags":["mercury","webhooks"],"summary":"Mercury Webhook Events","description":"Accept Mercury webhook events and wake the Treasury sync job.","operationId":"mercury_webhook_events_api_webhooks_mercury_events_post","parameters":[{"name":"Mercury-Signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"Mercury-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mercury Webhook Events Api Webhooks Mercury Events Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/shopify/customers/data_request":{"post":{"tags":["shopify","webhooks"],"summary":"Shopify Customers Data Request","description":"A merchant's customer asked what data Porter holds about them.","operationId":"shopify_customers_data_request_api_webhooks_shopify_customers_data_request_post","parameters":[{"name":"X-Shopify-Hmac-Sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Hmac-Sha256"}},{"name":"X-Shopify-Shop-Domain","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Shop-Domain"}},{"name":"X-Shopify-Webhook-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Webhook-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shopify Customers Data Request Api Webhooks Shopify Customers Data Request Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/shopify/customers/redact":{"post":{"tags":["shopify","webhooks"],"summary":"Shopify Customers Redact","description":"Erase what Porter holds about one of a merchant's customers.","operationId":"shopify_customers_redact_api_webhooks_shopify_customers_redact_post","parameters":[{"name":"X-Shopify-Hmac-Sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Hmac-Sha256"}},{"name":"X-Shopify-Shop-Domain","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Shop-Domain"}},{"name":"X-Shopify-Webhook-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Webhook-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shopify Customers Redact Api Webhooks Shopify Customers Redact Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/shopify/shop/redact":{"post":{"tags":["shopify","webhooks"],"summary":"Shopify Shop Redact","description":"Sent 48h after uninstall: remove the shop connection and credentials.","operationId":"shopify_shop_redact_api_webhooks_shopify_shop_redact_post","parameters":[{"name":"X-Shopify-Hmac-Sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Hmac-Sha256"}},{"name":"X-Shopify-Shop-Domain","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Shop-Domain"}},{"name":"X-Shopify-Webhook-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Shopify-Webhook-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shopify Shop Redact Api Webhooks Shopify Shop Redact Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/reports/{company_id}":{"get":{"tags":["reports"],"summary":"List Reports","description":"List all reports for a company, newest first.","operationId":"list_reports_api_reports__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/reports/{company_id}/{report_id}":{"get":{"tags":["reports"],"summary":"Get Report","description":"Get a single report including its HTML content.","operationId":"get_report_api_reports__company_id___report_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["reports"],"summary":"Delete Report","description":"Delete a report.","operationId":"delete_report_api_reports__company_id___report_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/reports/{company_id}/{report_id}/download.pdf":{"get":{"tags":["reports"],"summary":"Download Monthly Performance Pdf","description":"Download a saved Monthly Performance report as a server-rendered PDF.","operationId":"download_monthly_performance_pdf_api_reports__company_id___report_id__download_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/reports/{company_id}/regenerate":{"post":{"tags":["reports"],"summary":"Regenerate Report","description":"Force a fresh structured month-end report for one period.\n\nReason: POR-1320 — the manual Regenerate button. Mirrors the insights\nregenerate endpoint: marks the (company, period) row 'generating' so the\nresponse and the row the frontend polls reflect in-flight state, then kicks\noff the background generator (which re-marks idempotently). This is also how\nthe legacy advisor-uploaded HTML reports migrate to native structured\ncontent in place — on success the html_content is cleared and `content` set.","operationId":"regenerate_report_api_reports__company_id__regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"period","in":"query","required":true,"schema":{"type":"string","description":"Report period to regenerate, YYYY-MM","title":"Period"},"description":"Report period to regenerate, YYYY-MM"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/pdf-print/{kind}/{token}":{"get":{"tags":["pdf"],"summary":"Get Pdf Print Payload","description":"Return the render payload for one tokenized Porter PDF.","operationId":"get_pdf_print_payload_api_pdf_print__kind___token__get","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Pdf Print Payload Api Pdf Print  Kind   Token  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/trial-balance/{company_id}":{"get":{"tags":["trial-balance"],"summary":"Get Trial Balance","description":"Get trial balance from the synced local QBO ledger.","operationId":"get_trial_balance_api_trial_balance__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"basis","in":"query","required":false,"schema":{"anyOf":[{"enum":["cash","accrual"],"type":"string"},{"type":"null"}],"description":"Optional accounting basis override","title":"Basis"},"description":"Optional accounting basis override"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialBalanceResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}":{"get":{"tags":["close-periods"],"summary":"List Close Periods","description":"List all close periods for a company.\n\nReason: POR-150 — Returns periods sorted reverse-chronological with\nprogress summary, attention counts, and computed days-open.","operationId":"list_close_periods_api_close_periods__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["close-periods"],"summary":"Create Close Period","description":"Create a new close period.\n\nReason: POR-1904 — create only the not_started lifecycle row here. Generated\nclose-run/checklist startup belongs to /close-runs start or agent-loop so\nthe caller can show progress instead of waiting inside a create modal.","operationId":"create_close_period_api_close_periods__company_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClosePeriodRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}":{"patch":{"tags":["close-periods"],"summary":"Update Close Period","description":"Update a close period's status or metadata.\n\nReason: POR-150 / POR-156 — Handles forward status transitions with strict\nordering. POR-2371 makes review/closed reversible through one canonical\ncascade so an earlier month never appears open behind a later lock boundary.","operationId":"update_close_period_api_close_periods__company_id___period__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClosePeriodRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/schedule-true-up-check":{"get":{"tags":["close-periods"],"summary":"Get Schedule True Up Check","description":"Return the closed-period schedule true-up checklist line, or null.\n\nReason: POR-2525 — Monthly Close shows \"checked, nothing owed\" / \"cannot\nverify\" for schedule depreciation and amortization. Its own read (not a key\non the goal GET) so a slow or failing schedule computation cannot delay or\nbreak the close checklist (POR-2458).","operationId":"get_schedule_true_up_check_api_close_periods__company_id___period__schedule_true_up_check_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/schedule-snapshot":{"get":{"tags":["close-periods"],"summary":"Get Schedule Snapshot","description":"Return export snapshot versions for this period.\n\nReason: Powers the \"Schedule Snapshot\" tab on the monthly close detail page.\nReturns version metadata (snapshot_group_id, captured_at, captured_by) — the\nfrontend shows one Export button per version row, no data table.","operationId":"get_schedule_snapshot_api_close_periods__company_id___period__schedule_snapshot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/schedule-export/{snapshot_group_id}":{"get":{"tags":["close-periods"],"summary":"Export Schedule Snapshot Immutable","description":"Download a frozen schedule xlsx built from data captured at close time.\n\nReason: Unlike /schedule-snapshot/export (which re-queries live data), this\nendpoint reads from schedule_export_snapshots — the exact Source Data + Activity\nrows frozen at the moment the period was closed. Immutable for audit purposes.\nFalls back to 404 if the period was closed before this feature deployed.","operationId":"export_schedule_snapshot_immutable_api_close_periods__company_id___period__schedule_export__snapshot_group_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"snapshot_group_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Group Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"types","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated schedule types; empty = all","default":"","title":"Types"},"description":"Comma-separated schedule types; empty = all"},{"name":"include_source","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Source"}},{"name":"include_activity","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Activity"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/reconciliation-groups":{"get":{"tags":["reconciliations"],"summary":"Get Reconciliation Groups","description":"List reusable reconciliation account groups.","operationId":"get_reconciliation_groups_api_close_periods__company_id__reconciliation_groups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationAccountGroupResponse"},"title":"Response Get Reconciliation Groups Api Close Periods  Company Id  Reconciliation Groups Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["reconciliations"],"summary":"Create Reconciliation Group","description":"Create a reusable reconciliation account group.","operationId":"create_reconciliation_group_api_close_periods__company_id__reconciliation_groups_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccountGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccountGroupResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/reconciliation-groups/{group_id}":{"patch":{"tags":["reconciliations"],"summary":"Update Reconciliation Group","description":"Update a reusable reconciliation account group.","operationId":"update_reconciliation_group_api_close_periods__company_id__reconciliation_groups__group_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccountGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccountGroupResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["reconciliations"],"summary":"Delete Reconciliation Group","description":"Archive a reusable reconciliation account group.","operationId":"delete_reconciliation_group_api_close_periods__company_id__reconciliation_groups__group_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations":{"get":{"tags":["reconciliations"],"summary":"Get Reconciliations","description":"Get all bank, credit-card, and clearing reconciliation accounts.","operationId":"get_reconciliations_api_close_periods__company_id___period__reconciliations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}":{"patch":{"tags":["reconciliations"],"summary":"Save Statement Balance","description":"Save a user-entered statement balance for a bank or credit-card account.","operationId":"save_statement_balance_api_close_periods__company_id___period__reconciliations__account_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementBalanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccount"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliation-report.pdf":{"get":{"tags":["reconciliations"],"summary":"Download Reconciliation Report Pdf","description":"Download the Reconciliation Report page as a server-rendered Letter PDF.","operationId":"download_reconciliation_report_pdf_api_close_periods__company_id___period__reconciliation_report_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"account","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Account"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/transactions":{"get":{"tags":["reconciliations"],"summary":"Get Reconciliation Transactions","description":"Get reconciliation transaction detail for an account and period.","operationId":"get_reconciliation_transactions_api_close_periods__company_id___period__reconciliations__account_id__transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/bank-transactions":{"get":{"tags":["reconciliations"],"summary":"Get Bank Transactions For Reconciliation","description":"Get the GL-backed reconciliation book register.","operationId":"get_bank_transactions_for_reconciliation_api_close_periods__company_id___period__reconciliations__account_id__bank_transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationBookResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/bank-transactions/cleared-state":{"post":{"tags":["reconciliations"],"summary":"Set Transactions Cleared","description":"Set cleared state for an exact transaction set with an expected-state guard.","operationId":"set_transactions_cleared_api_close_periods__company_id___period__reconciliations__account_id__bank_transactions_cleared_state_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTransactionsClearedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTransactionsClearedResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/ledger-lines/{ledger_line_id}/status":{"post":{"tags":["reconciliations"],"summary":"Set Ledger Line Reconciliation Status","description":"Set outstanding/cleared state for a GL-only reconciliation register row.","operationId":"set_ledger_line_reconciliation_status_api_close_periods__company_id___period__reconciliations__account_id__ledger_lines__ledger_line_id__status_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"ledger_line_id","in":"path","required":true,"schema":{"type":"string","title":"Ledger Line Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerLineReconciliationStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerLineReconciliationStateResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/bank-transactions/bulk-clear":{"post":{"tags":["reconciliations"],"summary":"Bulk Clear Transactions","description":"Bulk set eligible reconciliation transactions to cleared or uncleared.","operationId":"bulk_clear_transactions_api_close_periods__company_id___period__reconciliations__account_id__bank_transactions_bulk_clear_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkClearRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Bulk Clear Transactions Api Close Periods  Company Id   Period  Reconciliations  Account Id  Bank Transactions Bulk Clear Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/mark-reconciled":{"post":{"tags":["reconciliations"],"summary":"Mark Reconciled","description":"Mark an account as reconciled when Porter and statement balances match.","operationId":"mark_reconciled_api_close_periods__company_id___period__reconciliations__account_id__mark_reconciled_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccount"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/unreconcile":{"post":{"tags":["reconciliations"],"summary":"Unreconcile Account","description":"Withdraw an open-period reconciliation assertion with an audit reason.","operationId":"unreconcile_account_api_close_periods__company_id___period__reconciliations__account_id__unreconcile_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreconcileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccount"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/skip":{"post":{"tags":["reconciliations"],"summary":"Skip Reconciliation","description":"Record a documented no-statement skip so the period can close without a full reconciliation.\n\nReason: POR-1395 — the no-statement escape. The route supplies actor context; the\nshared workflow owns validation (a reason is required) and the skip state write.","operationId":"skip_reconciliation_api_close_periods__company_id___period__reconciliations__account_id__skip_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkipReconciliationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccount"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/accept-residual":{"post":{"tags":["reconciliations"],"summary":"Accept Reconciliation Residual","description":"Record the exact live residual as audit evidence without changing books.","operationId":"accept_reconciliation_residual_api_close_periods__company_id___period__reconciliations__account_id__accept_residual_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptResidualRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationAccount"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/suggestions":{"get":{"tags":["reconciliations"],"summary":"Get Reconciliation Suggestions","description":"Find uncleared transactions that explain the current variance.","operationId":"get_reconciliation_suggestions_api_close_periods__company_id___period__reconciliations__account_id__suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationSuggestionsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/export":{"get":{"tags":["reconciliations"],"summary":"Export Reconciliation","description":"Export a single-account reconciliation as Excel.","operationId":"export_reconciliation_api_close_periods__company_id___period__reconciliations__account_id__export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^xlsx$","default":"xlsx","title":"Format"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/export-all":{"get":{"tags":["reconciliations"],"summary":"Export All Reconciliations","description":"Export all statement reconciliation accounts as one Excel workbook.","operationId":"export_all_reconciliations_api_close_periods__company_id___period__reconciliations_export_all_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^xlsx$","default":"xlsx","title":"Format"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-periods/{company_id}/{period}/reconciliations/{account_id}/statement":{"post":{"tags":["reconciliation-statements"],"summary":"Upload Reconciliation Statement","description":"Attach a bank/CC statement document to the reconciliation (audit only).","operationId":"upload_reconciliation_statement_api_close_periods__company_id___period__reconciliations__account_id__statement_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_reconciliation_statement_api_close_periods__company_id___period__reconciliations__account_id__statement_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationStatement"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"get":{"tags":["reconciliation-statements"],"summary":"Get Reconciliation Statement","description":"Get the statement document attached to an account+period.\n\nReturns null if nothing has been attached.","operationId":"get_reconciliation_statement_api_close_periods__company_id___period__reconciliations__account_id__statement_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReconciliationStatement"},{"type":"null"}],"title":"Response Get Reconciliation Statement Api Close Periods  Company Id   Period  Reconciliations  Account Id  Statement Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["reconciliation-statements"],"summary":"Delete Reconciliation Statement","description":"Detach the statement document for an account (idempotent).","operationId":"delete_reconciliation_statement_api_close_periods__company_id___period__reconciliations__account_id__statement_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-runs/{company_id}/{period}":{"get":{"tags":["close-runs"],"summary":"Get Close Run","description":"Read the generated close run and checklist for a period.","operationId":"get_close_run_api_close_runs__company_id___period__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-runs/{company_id}/{period}/start":{"post":{"tags":["close-runs"],"summary":"Start Close Run","description":"Reject retired generated close-run writes.","operationId":"start_close_run_api_close_runs__company_id___period__start_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-runs/{company_id}/{period}/agent-loop":{"post":{"tags":["close-runs"],"summary":"Run Close Agent Loop","description":"Reject retired generated close-run agent-loop writes.","operationId":"run_close_agent_loop_api_close_runs__company_id___period__agent_loop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-runs/{company_id}/{period}/items/{item_id}":{"patch":{"tags":["close-runs"],"summary":"Update Close Item","description":"Reject retired generated close checklist item writes.","operationId":"update_close_item_api_close_runs__company_id___period__items__item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCloseItemRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/close-runs/{company_id}/{period}/items/{item_id}/events":{"get":{"tags":["close-runs"],"summary":"Get Close Item Events","description":"Read audit events for one generated close checklist item.","operationId":"get_close_item_events_api_close_runs__company_id___period__items__item_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/stale":{"get":{"tags":["documents"],"summary":"Get Stale Documents","description":"Get documents needing review (company_profile or accounting_policy\nwith stale or missing last_reviewed_at).\n\nReason: Must be registered BEFORE /{company_id}/documents/{document_id}\nto avoid FastAPI interpreting 'stale' as a document_id.","operationId":"get_stale_documents_api_documents__company_id__documents_stale_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":90,"title":"Days"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaleDocumentsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/{document_id}/status":{"get":{"tags":["documents"],"summary":"Get Document Status","description":"Get extraction status for a document.\n\nReason: POR-495 — Lightweight polling endpoint so the frontend can check\nif extraction is complete without fetching the full document detail.\nRegistered BEFORE the generic /{document_id} route so FastAPI matches it.","operationId":"get_document_status_api_documents__company_id__documents__document_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStatusResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents":{"get":{"tags":["documents"],"summary":"List Documents","description":"List all documents for a company, newest first.","operationId":"list_documents_api_documents__company_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/{document_id}":{"get":{"tags":["documents"],"summary":"Get Document","description":"Get a single document including its extracted text.","operationId":"get_document_api_documents__company_id__documents__document_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["documents"],"summary":"Delete Document","description":"Delete a document and its stored file.","operationId":"delete_document_api_documents__company_id__documents__document_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/upload":{"post":{"tags":["documents"],"summary":"Upload Document","description":"Upload a document file via multipart/form-data.\n\nReason: Accepts actual file data alongside metadata. POR-494 added source\nparam so onboarding uploads are tagged differently from Documents tab uploads.\nPOR-495 added background text extraction — creates the document record\nimmediately (status='uploaded'), returns the response, then kicks off\nasync extraction that updates text_extracted and status='processed'.","operationId":"upload_document_api_documents__company_id__documents_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_api_documents__company_id__documents_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/{document_id}/review":{"patch":{"tags":["documents"],"summary":"Mark Document Reviewed","description":"Mark a document as reviewed (updates last_reviewed_at).","operationId":"mark_document_reviewed_api_documents__company_id__documents__document_id__review_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/{document_id}/memories":{"get":{"tags":["documents"],"summary":"Get Document Memories","description":"Get graph-backed memories linked to a specific document.","operationId":"get_document_memories_api_documents__company_id__documents__document_id__memories_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItemListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/{document_id}/retry":{"post":{"tags":["documents"],"summary":"Retry Document Extraction","description":"Retry extraction on a Failed document (POR-608).","operationId":"retry_document_extraction_api_documents__company_id__documents__document_id__retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/{document_id}/reextract":{"post":{"tags":["documents"],"summary":"Reextract Document","description":"Reset a document's status and re-run its full Porter analysis.","operationId":"reextract_document_api_documents__company_id__documents__document_id__reextract_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/documents/{document_id}/download":{"get":{"tags":["documents"],"summary":"Download Document","description":"Generate a short-lived signed URL for viewing or downloading a document.\n\nReason: POR-518 — Until now the document detail drawer only showed metadata,\nso users with two files of the same name in the same category had no way to\ntell them apart. This endpoint resolves the document, looks up its bucket\npath in `documents.storage_url`, and returns a 5-minute signed URL the\nfrontend opens in a new tab. The browser then renders PDFs/images natively\nand triggers a download for office formats.","operationId":"download_document_api_documents__company_id__documents__document_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDownloadResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/notes":{"get":{"tags":["documents"],"summary":"List Report Notes","description":"List report notes for a company, optionally filtered by period.","operationId":"list_report_notes_api_documents__company_id__notes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"post":{"tags":["documents"],"summary":"Create Report Note","description":"Create a new report note.","operationId":"create_report_note_api_documents__company_id__notes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItemResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/notes/{note_id}":{"patch":{"tags":["documents"],"summary":"Update Report Note","description":"Update a report note's content, tags, or importance.","operationId":"update_report_note_api_documents__company_id__notes__note_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItemResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"delete":{"tags":["documents"],"summary":"Delete Report Note","description":"Delete a report note.","operationId":"delete_report_note_api_documents__company_id__notes__note_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/memories":{"get":{"tags":["documents"],"summary":"List Memories","description":"List graph-backed company memories for a company.","operationId":"list_memories_api_documents__company_id__memories_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItemListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/documents/{company_id}/report-context/{period}":{"get":{"tags":["documents"],"summary":"Get Report Context","description":"Get full report context for a period.\n\nReason: Aggregates all relevant context for AI report generation:\n- All standing documents (no period restriction) + documents for the company\n- All standing notes + notes matching the period\n- Graph-backed company memories","operationId":"get_report_context_api_documents__company_id__report_context__period__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","title":"Period"}},{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportContextResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/onboarding/{company_id}":{"get":{"tags":["onboarding","onboarding"],"summary":"Get Onboarding Status","description":"Get onboarding completion status for a company.\n\nReason: Frontend calls this after auth to decide whether to redirect\nnew users to Porter AI for onboarding.","operationId":"get_onboarding_status_api_onboarding__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Onboarding Status Api Onboarding  Company Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/onboarding/{company_id}/structured-step":{"patch":{"tags":["onboarding","onboarding"],"summary":"Save Structured Onboarding Step","description":"Save answers and progress for the POR-788 structured onboarding flow.","operationId":"save_structured_onboarding_step_api_onboarding__company_id__structured_step_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredOnboardingStepRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Structured Onboarding Step Api Onboarding  Company Id  Structured Step Patch"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/onboarding/{company_id}/bootstrap-coa/stream":{"get":{"tags":["onboarding","onboarding"],"summary":"Stream Bootstrap Coa","description":"Stream the AI chart-of-accounts bootstrap as SSE.","operationId":"stream_bootstrap_coa_api_onboarding__company_id__bootstrap_coa_stream_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/onboarding/{company_id}/skip-billing":{"post":{"tags":["onboarding","onboarding"],"summary":"Skip Onboarding Billing","description":"Bypass the Stripe checkout step for internal Porter staff.\n\nReason: Porter employees demoing/QAing the onboarding flow shouldn't have\nto run a real Stripe checkout. Marks billing as `skipped_internal` so the\ncompletion gate (`onboarding_billing_allows_completion`) lets them through\nwhile staying distinguishable from real paying customers in reports.","operationId":"skip_onboarding_billing_api_onboarding__company_id__skip_billing_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Skip Onboarding Billing Api Onboarding  Company Id  Skip Billing Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/onboarding/{company_id}/complete":{"post":{"tags":["onboarding","onboarding"],"summary":"Complete Onboarding","description":"Mark onboarding as completed.\n\nReason: Called when the user finishes the post-checkout onboarding flow.\nPOR-777 gates this on a confirmed Stripe billing state so the frontend\ncannot unlock the app from the checkout button alone.","operationId":"complete_onboarding_api_onboarding__company_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Complete Onboarding Api Onboarding  Company Id  Complete Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/insights/{company_id}":{"get":{"tags":["insights","insights"],"summary":"Get Insights","description":"Return cached onboarding insights, kicking off generation if missing.\n\nReason: POR-819 — Insights are produced in the background right after\nthe initial QBO sync completes (see `insights_generator.spawn_insights_generation`\nwired from `qbo/sync.py`). The panel just reads from `company_insights`:\n\n  - row missing + sync not done  → `status=\"pending_sync\"` (panel shows\n    \"Porter is still ingesting your QuickBooks data\" loader; poll again)\n  - row missing + sync done      → kick off generation, return `generating`\n  - row present, `generating`    → keep polling\n  - row present, `ready`         → render findings unless quality gates reject it\n  - row present, `failed`        → render error state (user can retry)","operationId":"get_insights_api_insights__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"trigger","in":"query","required":false,"schema":{"type":"string","description":"Generation trigger (kept for compatibility)","default":"onboarding","title":"Trigger"},"description":"Generation trigger (kept for compatibility)"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CachedInsightsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/insights/{company_id}/regenerate":{"post":{"tags":["insights","insights"],"summary":"Regenerate Insights","description":"Force a fresh insights generation, overwriting the cache.\n\nReason: POR-819 — intentionally kept minimal; the onboarding flow does\nnot call this. Useful for admin / support when a company's cached\ninsights are stale or failed.","operationId":"regenerate_insights_api_insights__company_id__regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"trigger","in":"query","required":false,"schema":{"type":"string","description":"Generation trigger label","default":"manual","title":"Trigger"},"description":"Generation trigger label"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CachedInsightsResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/insights/{company_id}/stream":{"get":{"tags":["insights","insights"],"summary":"Stream Insights","description":"Stream onboarding insights as SSE — reasoning + tools + final result.\n\nReason: POR-819 — no longer used by the onboarding panel (which reads the\ncache). Kept for admin / debugging so we can watch the model reason live.","operationId":"stream_insights_api_insights__company_id__stream_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"trigger","in":"query","required":false,"schema":{"type":"string","description":"Generation trigger (kept for compatibility)","default":"onboarding","title":"Trigger"},"description":"Generation trigger (kept for compatibility)"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/memories/{company_id}":{"get":{"tags":["memories","memories"],"summary":"List graph-backed memories for a company","description":"Return every graph-backed memory stored for the company.","operationId":"list_company_memories_api_memories__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Impersonate-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoriesListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/notifications/{company_id}":{"get":{"tags":["notifications","notifications"],"summary":"List Notifications","description":"List notifications for the caller in this company.\n\nReason: Caller sees company-wide notifications plus any user-specific\nnotifications targeted to themselves. Other users' targeted\nnotifications are hidden.","operationId":"list_notifications_api_notifications__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"name":"company_scope","in":"query","required":false,"schema":{"enum":["selected","all"],"type":"string","default":"selected","title":"Company Scope"}},{"name":"resolution_status","in":"query","required":false,"schema":{"anyOf":[{"enum":["needs_action","handled","dismissed"],"type":"string"},{"type":"null"}],"title":"Resolution Status"}},{"name":"notification_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["general","email_triage","close","transactions","schedules","integrations","automations","workflows"],"type":"string"},{"type":"null"}],"title":"Notification Type"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/notifications/{company_id}/{notification_id}/open":{"post":{"tags":["notifications","notifications"],"summary":"Open Notification","description":"Open (or reopen) the conversation seeded by this notification.\n\nReason: Per Ben's design, every notification IS a conversation. The bell\nclick hits this endpoint; we get-or-create a user-owned conversation\nseeded with the notification body as Porter AI's first turn, then return\nthe conversation id. The frontend navigates to\n/porter-ai?conversationId=<returned id>, where the existing conversation\nloader picks it up. Idempotent per (notification, user) so re-clicks\nland in the same thread. Marking the notification read is a side effect.","operationId":"open_notification_api_notifications__company_id___notification_id__open_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenNotificationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/notifications/{company_id}/{notification_id}/read":{"post":{"tags":["notifications","notifications"],"summary":"Mark Notification Read","description":"Mark a single notification as read.","operationId":"mark_notification_read_api_notifications__company_id___notification_id__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/notifications/{company_id}/{notification_id}/resolution":{"post":{"tags":["notifications","notifications"],"summary":"Update Notification Resolution","description":"Set whether one notification needs action, was handled, or was dismissed.","operationId":"update_notification_resolution_api_notifications__company_id___notification_id__resolution_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationResolutionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/notifications/{company_id}/read-all":{"post":{"tags":["notifications","notifications"],"summary":"Mark All Notifications Read","description":"Mark every visible unread notification as read.","operationId":"mark_all_notifications_read_api_notifications__company_id__read_all_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"company_scope","in":"query","required":false,"schema":{"enum":["selected","all"],"type":"string","default":"selected","title":"Company Scope"}},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Mark All Notifications Read Api Notifications  Company Id  Read All Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/notifications/{company_id}/channel-preferences":{"get":{"tags":["notifications","notifications"],"summary":"Get Channel Preferences","description":"Read the caller's notification channel preferences for this company.\n\nReason: POR-1723 — notifications are the single reach hub. Absence of a row\nmeans in-app only (external channels default off / opt-in).","operationId":"get_channel_preferences_api_notifications__company_id__channel_preferences_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelPreferencesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}},"put":{"tags":["notifications","notifications"],"summary":"Update Channel Preferences","description":"Set the caller's per-user notification channel preferences.\n\nReason: POR-1723 — opt-in fan-out. The phone columns were added later, but\nthe rule is the same: targeted notifications may leave the in-app bell only\nthrough channels the recipient explicitly enabled in Settings.","operationId":"update_channel_preferences_api_notifications__company_id__channel_preferences_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelPreferencesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelPreferencesResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/me/email-addresses":{"get":{"tags":["me"],"summary":"Get Email Addresses","operationId":"get_email_addresses_api_me_email_addresses_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserEmailAddressResponse"},"type":"array","title":"Response Get Email Addresses Api Me Email Addresses Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}],"description":"Get Email Addresses"},"post":{"tags":["me"],"summary":"Add Email Address","operationId":"add_email_address_api_me_email_addresses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddUserEmailAddressRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserEmailAddressResponse"},"type":"array","title":"Response Add Email Address Api Me Email Addresses Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}],"description":"Add Email Address"}},"/api/me/email-addresses/{address_id}/primary":{"patch":{"tags":["me"],"summary":"Set Primary Email Address","operationId":"set_primary_email_address_api_me_email_addresses__address_id__primary_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Address Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserEmailAddressResponse"},"title":"Response Set Primary Email Address Api Me Email Addresses  Address Id  Primary Patch"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Set Primary Email Address"}},"/api/me/email-addresses/{address_id}":{"delete":{"tags":["me"],"summary":"Remove Email Address","operationId":"remove_email_address_api_me_email_addresses__address_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"address_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Address Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Remove Email Address"}},"/api/me/is-internal":{"get":{"tags":["me"],"summary":"Get Is Internal","description":"Return whether the caller is Porter internal staff.","operationId":"get_is_internal_api_me_is_internal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsInternalResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/me/profile/{company_id}":{"get":{"tags":["me"],"summary":"Get Company Profile","operationId":"get_company_profile_api_me_profile__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Company Profile"}},"/api/me/phone-number/{company_id}":{"patch":{"tags":["me"],"summary":"Update Phone Number","operationId":"update_phone_number_api_me_phone_number__company_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePhoneNumberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Update Phone Number"},"delete":{"tags":["me"],"summary":"Disconnect Phone Number","description":"Disconnect one verified SMS sender phone from this company route.","operationId":"disconnect_phone_number_api_me_phone_number__company_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectPhoneNumberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/me/phone-number/{company_id}/verify":{"post":{"tags":["me"],"summary":"Verify Phone Number","description":"Confirm the pending SMS verification code and bind one company route.","operationId":"verify_phone_number_api_me_phone_number__company_id__verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company UUID","title":"Company Id"},"description":"Company UUID"},{"name":"X-Impersonate-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"POR-1201: global company operators only — run this request as the given user.","title":"X-Impersonate-User-Id"},"description":"POR-1201: global company operators only — run this request as the given user."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPhoneNumberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/email/inbound":{"post":{"tags":["webhooks-email"],"summary":"Postmark Inbound","description":"Receive a parsed inbound email from Postmark.\n\nReason: Authenticated via HTTP Basic Auth header set on the Postmark\nInbound Stream's webhook URL. The shared secret lives in\nPOSTMARK_INBOUND_WEBHOOK_SECRET; format is `user:password` (we accept any\nuser, only the secret matters).","operationId":"postmark_inbound_api_webhooks_email_inbound_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Postmark Inbound Api Webhooks Email Inbound Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/email/gmail":{"post":{"tags":["webhooks-email"],"summary":"Gmail Pubsub Push","description":"Receive Gmail watch notifications from Google Cloud Pub/Sub.","operationId":"gmail_pubsub_push_api_webhooks_email_gmail_post","parameters":[{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Gmail Pubsub Push Api Webhooks Email Gmail Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/email/microsoft":{"post":{"tags":["webhooks-email"],"summary":"Microsoft Change Notification","operationId":"microsoft_change_notification_api_webhooks_email_microsoft_post","parameters":[{"name":"validationToken","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Validationtoken"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Microsoft Change Notification Api Webhooks Email Microsoft Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Microsoft Change Notification"}},"/api/webhooks/email/microsoft/lifecycle":{"post":{"tags":["webhooks-email"],"summary":"Microsoft Lifecycle Notification","operationId":"microsoft_lifecycle_notification_api_webhooks_email_microsoft_lifecycle_post","parameters":[{"name":"validationToken","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Validationtoken"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Microsoft Lifecycle Notification Api Webhooks Email Microsoft Lifecycle Post"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Microsoft Lifecycle Notification"}},"/api/webhooks/sms/inbound":{"post":{"tags":["webhooks-sms"],"summary":"Twilio Inbound Sms","description":"Receive an inbound Twilio SMS or MMS.\n\nReason: Twilio requires a reply within 15 s or retries. We return empty\nTwiML immediately and run AI processing in a background task.","operationId":"twilio_inbound_sms_api_webhooks_sms_inbound_post","parameters":[{"name":"x-twilio-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Twilio-Signature"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_twilio_inbound_sms_api_webhooks_sms_inbound_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/webhooks/whatsapp/inbound":{"post":{"tags":["webhooks-whatsapp"],"summary":"Twilio Inbound Whatsapp","description":"Receive an inbound Twilio WhatsApp message.","operationId":"twilio_inbound_whatsapp_api_webhooks_whatsapp_inbound_post","parameters":[{"name":"x-twilio-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Twilio-Signature"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_twilio_inbound_whatsapp_api_webhooks_whatsapp_inbound_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}}}},"/api/public/financial-health-audits":{"post":{"tags":["public-financial-audit"],"summary":"Create Audit","operationId":"create_audit_api_public_financial_health_audits_post","parameters":[{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditCreatedSession"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Create Audit"}},"/api/public/financial-health-audits/recovery/email/start":{"post":{"tags":["public-financial-audit"],"summary":"Start Audit Email Challenge","operationId":"start_audit_email_challenge_api_public_financial_health_audits_recovery_email_start_post","parameters":[{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAuditEmailChallengeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEmailChallengeTarget"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Start Audit Email Challenge"}},"/api/public/financial-health-audits/recovery/email/send":{"post":{"tags":["public-financial-audit"],"summary":"Send Audit Email Challenge","operationId":"send_audit_email_challenge_api_public_financial_health_audits_recovery_email_send_post","parameters":[{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAuditEmailChallengeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEmailChallengeSent"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Send Audit Email Challenge"}},"/api/public/financial-health-audits/recovery/email/verify":{"post":{"tags":["public-financial-audit"],"summary":"Verify Audit Email Challenge","operationId":"verify_audit_email_challenge_api_public_financial_health_audits_recovery_email_verify_post","parameters":[{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyAuditEmailChallengeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRecoveredReport"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Verify Audit Email Challenge"}},"/api/public/financial-health-audits/{audit_id}":{"patch":{"tags":["public-financial-audit"],"summary":"Update Audit","operationId":"update_audit_api_public_financial_health_audits__audit_id__patch","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSnapshot"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSession"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Update Audit"},"get":{"tags":["public-financial-audit"],"summary":"Get Audit Status","operationId":"get_audit_status_api_public_financial_health_audits__audit_id__get","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSession"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Audit Status"}},"/api/public/financial-health-audits/{audit_id}/report":{"post":{"tags":["public-financial-audit"],"summary":"Generate Audit Report","operationId":"generate_audit_report_api_public_financial_health_audits__audit_id__report_post","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSession"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Generate Audit Report"}},"/api/public/financial-health-audits/{audit_id}/recovery/request":{"post":{"tags":["public-financial-audit"],"summary":"Request Audit Recovery","operationId":"request_audit_recovery_api_public_financial_health_audits__audit_id__recovery_request_post","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRecoveryRequestState"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Request Audit Recovery"}},"/api/public/financial-health-audits/{audit_id}/email":{"post":{"tags":["public-financial-audit"],"summary":"Capture Audit Email","operationId":"capture_audit_email_api_public_financial_health_audits__audit_id__email_post","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureAuditEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLeadCaptureSession"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Capture Audit Email"}},"/api/public/financial-health-audits/{audit_id}/claim":{"post":{"tags":["public-financial-audit"],"summary":"Claim Audit Company","operationId":"claim_audit_company_api_public_financial_health_audits__audit_id__claim_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditCompanyClaim"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Claim Audit Company"}},"/api/public/financial-health-audits/{audit_id}/documents/prepare":{"post":{"tags":["public-financial-audit"],"summary":"Prepare Audit Document Upload","operationId":"prepare_audit_document_upload_api_public_financial_health_audits__audit_id__documents_prepare_post","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareAuditDocumentUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparedAuditDocumentUpload"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Prepare Audit Document Upload"}},"/api/public/financial-health-audits/{audit_id}/documents/{document_id}/finalize":{"post":{"tags":["public-financial-audit"],"summary":"Finalize Audit Document Upload","operationId":"finalize_audit_document_upload_api_public_financial_health_audits__audit_id__documents__document_id__finalize_post","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeAuditDocumentUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditDocument"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Finalize Audit Document Upload"}},"/api/public/financial-health-audits/{audit_id}/documents":{"get":{"tags":["public-financial-audit"],"summary":"List Audit Documents","operationId":"list_audit_documents_api_public_financial_health_audits__audit_id__documents_get","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditDocument"},"title":"Response List Audit Documents Api Public Financial Health Audits  Audit Id  Documents Get"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"List Audit Documents"}},"/api/public/financial-health-audits/{audit_id}/documents/preflight":{"post":{"tags":["public-financial-audit"],"summary":"Preflight Audit Documents","operationId":"preflight_audit_documents_api_public_financial_health_audits__audit_id__documents_preflight_post","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditDocumentPreflight"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Preflight Audit Documents"}},"/api/public/financial-health-audits/{audit_id}/quickbooks/connect":{"post":{"tags":["public-financial-audit"],"summary":"Start Quickbooks Connection","operationId":"start_quickbooks_connection_api_public_financial_health_audits__audit_id__quickbooks_connect_post","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuickBooksConnectionStartRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickBooksConnectionStart"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Start Quickbooks Connection"}},"/api/public/financial-health-audits/{audit_id}/quickbooks/status":{"get":{"tags":["public-financial-audit"],"summary":"Get Quickbooks Connection Status","operationId":"get_quickbooks_connection_status_api_public_financial_health_audits__audit_id__quickbooks_status_get","parameters":[{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Audit Id"}},{"name":"X-Porter-Audit-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Token"}},{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickBooksConnectionState"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Get Quickbooks Connection Status"}},"/api/public/financial-health-audits/quickbooks/callback":{"get":{"tags":["public-financial-audit"],"summary":"Quickbooks Connection Callback","operationId":"quickbooks_connection_callback_api_public_financial_health_audits_quickbooks_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"realmId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Realmid"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Quickbooks Connection Callback"}},"/api/public/landing-notifications":{"post":{"tags":["public-landing-notifications"],"summary":"Send Public Landing Notification","operationId":"send_public_landing_notification_api_public_landing_notifications_post","parameters":[{"name":"X-Porter-Audit-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Porter-Audit-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLandingNotificationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLandingNotificationResult"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Send Public Landing Notification"}},"/.well-known/oauth-protected-resource/mcp/sse":{"get":{"summary":"Rfc9728 Protected Resource Metadata","operationId":"rfc9728_protected_resource_metadata__well_known_oauth_protected_resource_mcp_sse_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Rfc9728 Protected Resource Metadata"}},"/.well-known/oauth-protected-resource/mcp":{"get":{"summary":"Rfc9728 Protected Resource Metadata","operationId":"rfc9728_protected_resource_metadata__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Rfc9728 Protected Resource Metadata"}},"/.well-known/oauth-authorization-server":{"get":{"summary":"Rfc8414 Authorization Server Metadata","operationId":"rfc8414_authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Rfc8414 Authorization Server Metadata"}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Health Check"}},"/health/deep":{"get":{"summary":"Health Check Deep","operationId":"health_check_deep_health_deep_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Stable request quota policy and window for this API.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","schema":{"type":"integer"}}}}},"description":"Health Check Deep"}}},"components":{"schemas":{"ACHMetadata":{"properties":{"origCoName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origconame"},"traceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracenumber"},"indName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indname"},"rawDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rawdescription"}},"type":"object","title":"ACHMetadata","description":"Parsed ACH transaction metadata."},"APBalanceResponse":{"properties":{"asOfDate":{"type":"string","title":"Asofdate"},"totalOpenAp":{"type":"number","title":"Totalopenap"},"aging":{"$ref":"#/components/schemas/AgingBuckets"},"openBills":{"items":{"$ref":"#/components/schemas/OpenBillItemResponse"},"type":"array","title":"Openbills"},"vendorSummary":{"items":{"$ref":"#/components/schemas/APVendorAgingSummaryResponse"},"type":"array","title":"Vendorsummary"}},"type":"object","required":["asOfDate","totalOpenAp","aging","openBills"],"title":"APBalanceResponse","description":"Response for A/P balance aging report.\n\nReason: POR-173 — The A/P drawer needs as-of-date balance, aging buckets,\nand a list of open bills to display the full aging report."},"APVendorAgingSummaryResponse":{"properties":{"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"current":{"type":"number","title":"Current","default":0.0},"oneTo30":{"type":"number","title":"Oneto30","default":0.0},"thirtyOneTo60":{"type":"number","title":"Thirtyoneto60","default":0.0},"sixtyOneTo90":{"type":"number","title":"Sixtyoneto90","default":0.0},"ninetyPlus":{"type":"number","title":"Ninetyplus","default":0.0},"total":{"type":"number","title":"Total","default":0.0}},"type":"object","title":"APVendorAgingSummaryResponse","description":"A/P aging summary row grouped by vendor."},"ARAgingResponse":{"properties":{"current":{"type":"number","title":"Current","default":0.0},"1_30":{"type":"number","title":"1 30","default":0.0},"31_60":{"type":"number","title":"31 60","default":0.0},"61_90":{"type":"number","title":"61 90","default":0.0},"90_plus":{"type":"number","title":"90 Plus","default":0.0}},"type":"object","title":"ARAgingResponse","description":"Aging buckets for A/R report."},"ARBalanceAsOfResponse":{"properties":{"asOfDate":{"type":"string","title":"Asofdate"},"totalInvoiced":{"type":"number","title":"Totalinvoiced"},"totalPaid":{"type":"number","title":"Totalpaid"},"arBalance":{"type":"number","title":"Arbalance"},"invoiceCount":{"type":"integer","title":"Invoicecount"}},"type":"object","required":["asOfDate","totalInvoiced","totalPaid","arBalance","invoiceCount"],"title":"ARBalanceAsOfResponse","description":"Reason: POR-139 — AR balance as of a specific date for reconciliation."},"ARBalanceResponse":{"properties":{"asOfDate":{"type":"string","title":"Asofdate"},"totalOpenAr":{"type":"number","title":"Totalopenar"},"openInvoiceBalance":{"type":"number","title":"Openinvoicebalance"},"postedBookAr":{"type":"number","title":"Postedbookar"},"reconcilingDifference":{"type":"number","title":"Reconcilingdifference"},"aging":{"$ref":"#/components/schemas/ARAgingResponse"},"openInvoices":{"items":{"$ref":"#/components/schemas/AROpenInvoiceResponse"},"type":"array","title":"Openinvoices"},"reconcilingActivity":{"items":{"$ref":"#/components/schemas/AROpenInvoiceResponse"},"type":"array","title":"Reconcilingactivity"}},"type":"object","required":["asOfDate","totalOpenAr","openInvoiceBalance","postedBookAr","reconcilingDifference","aging","openInvoices","reconcilingActivity"],"title":"ARBalanceResponse","description":"Full A/R balance report response."},"AROpenInvoiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"amount":{"type":"number","title":"Amount"},"remainingBalance":{"type":"number","title":"Remainingbalance"},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"daysPastDue":{"type":"integer","title":"Dayspastdue"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"sourceCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcecategory"},"sourceLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcelabel"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"itemDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Itemdate"},"evidenceRef":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidenceref"}},"type":"object","required":["id","amount","remainingBalance","daysPastDue"],"title":"AROpenInvoiceResponse","description":"Single posted A/R item in the aging report."},"AcceptPostedEntriesRequest":{"properties":{"reason":{"type":"string","minLength":1,"title":"Reason"},"expectedEvidenceFingerprint":{"type":"string","minLength":1,"title":"Expectedevidencefingerprint"}},"type":"object","required":["reason","expectedEvidenceFingerprint"],"title":"AcceptPostedEntriesRequest","description":"The visible operator acknowledgement of one current posted-evidence set."},"AcceptResidualRequest":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"AcceptResidualRequest","description":"Request body for a documented, book-neutral residual acceptance."},"AccountActionResponse":{"properties":{"account":{"$ref":"#/components/schemas/AccountResponse"},"qboSynced":{"type":"boolean","title":"Qbosynced","default":false},"qboError":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboerror"}},"type":"object","required":["account"],"title":"AccountActionResponse","description":"Response for account mutation actions."},"AccountListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AccountResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"AccountListResponse","description":"Paginated account list response with camelCase."},"AccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"},"workspaceKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspacekind"},"parentCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcompanyid"},"parentCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcompanyname"},"name":{"type":"string","title":"Name"},"acctNum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acctnum"},"fullyQualifiedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullyqualifiedname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"accountType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accounttype"},"subType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification"},"qboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountid"},"parentQboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentqboaccountid"},"isActive":{"type":"boolean","title":"Isactive","default":true},"syncToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synctoken"},"qboSyncError":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbosyncerror"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"createdBySource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbysource"},"createdByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuseremail"},"semanticRoles":{"items":{"type":"string"},"type":"array","title":"Semanticroles"},"semanticRolesSource":{"type":"string","title":"Semanticrolessource","default":"system_inferred"},"displayPriority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Displaypriority"},"displayPrioritySource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayprioritysource"}},"type":"object","required":["id","name"],"title":"AccountResponse","description":"Account response with camelCase."},"AccountSemanticRolesResponse":{"properties":{"roles":{"items":{"type":"string"},"type":"array","title":"Roles"}},"type":"object","required":["roles"],"title":"AccountSemanticRolesResponse","description":"Supported account semantic role names."},"ActivityActor":{"properties":{"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["kind","label"],"title":"ActivityActor","description":"Actor label shown in the activity feed."},"ActivityEffect":{"properties":{"id":{"type":"string","title":"Id"},"occurredAt":{"type":"string","format":"date-time","title":"Occurredat"},"status":{"type":"string","title":"Status"},"tableName":{"type":"string","title":"Tablename"},"operation":{"type":"string","title":"Operation"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordid"},"recordCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recordcount"},"durationMs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Durationms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"artifactRefs":{"items":{"$ref":"#/components/schemas/ActivityEntityRef"},"type":"array","title":"Artifactrefs"},"externalRefs":{"items":{"$ref":"#/components/schemas/ActivityExternalRef"},"type":"array","title":"Externalrefs"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","occurredAt","status","tableName","operation"],"title":"ActivityEffect","description":"Low-level table mutation caused by an activity command."},"ActivityEntityRef":{"properties":{"type":{"type":"string","title":"Type"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["type"],"title":"ActivityEntityRef","description":"Artifact or domain record affected by an activity event."},"ActivityEvent":{"properties":{"id":{"type":"string","title":"Id"},"sourceKind":{"type":"string","title":"Sourcekind"},"occurredAt":{"type":"string","format":"date-time","title":"Occurredat"},"status":{"type":"string","title":"Status"},"summary":{"type":"string","title":"Summary"},"actor":{"$ref":"#/components/schemas/ActivityActor"},"actionSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actionsource"},"actionType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actiontype"},"entityType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitytype"},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entityid"},"primarySubject":{"anyOf":[{"$ref":"#/components/schemas/ActivityEntityRef"},{"type":"null"}]},"entityRefs":{"items":{"$ref":"#/components/schemas/ActivityEntityRef"},"type":"array","title":"Entityrefs"},"affectedArtifacts":{"items":{"$ref":"#/components/schemas/ActivityEntityRef"},"type":"array","title":"Affectedartifacts"},"fieldChanges":{"items":{"$ref":"#/components/schemas/ActivityFieldChange"},"type":"array","title":"Fieldchanges"},"effects":{"items":{"$ref":"#/components/schemas/ActivityEffect"},"type":"array","title":"Effects"},"externalRefs":{"items":{"$ref":"#/components/schemas/ActivityExternalRef"},"type":"array","title":"Externalrefs"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"toolCallId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Toolcallid"},"traceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Traceid"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"provenance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provenance"},"raw":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Raw"}},"type":"object","required":["id","sourceKind","occurredAt","status","summary","actor"],"title":"ActivityEvent","description":"Normalized company activity event."},"ActivityExternalRef":{"properties":{"system":{"type":"string","title":"System"},"objectType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objecttype"},"objectId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objectid"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["system"],"title":"ActivityExternalRef","description":"External system pointer attached to an activity event or effect."},"ActivityFeedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityEvent"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"ActivityFeedResponse","description":"Paginated activity feed response."},"ActivityFieldChange":{"properties":{"id":{"type":"string","title":"Id"},"entityType":{"type":"string","title":"Entitytype"},"entityId":{"type":"string","title":"Entityid"},"fieldName":{"type":"string","title":"Fieldname"},"previousValue":{"anyOf":[{},{"type":"null"}],"title":"Previousvalue"},"newValue":{"anyOf":[{},{"type":"null"}],"title":"Newvalue"},"previousDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previousdisplayname"},"newDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newdisplayname"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"artifactRef":{"anyOf":[{"$ref":"#/components/schemas/ActivityEntityRef"},{"type":"null"}]}},"type":"object","required":["id","entityType","entityId","fieldName","modifiedAt"],"title":"ActivityFieldChange","description":"Field-level diff attached to a parent activity command."},"ActivityGridPeriod":{"properties":{"period":{"type":"string","title":"Period"},"label":{"type":"string","title":"Label"}},"type":"object","required":["period","label"],"title":"ActivityGridPeriod","description":"A single period column in the activity grid."},"ActivityGridResponse":{"properties":{"periods":{"items":{"$ref":"#/components/schemas/ActivityGridPeriod"},"type":"array","title":"Periods"},"rows":{"items":{"$ref":"#/components/schemas/ActivityGridRow"},"type":"array","title":"Rows"},"totals":{"additionalProperties":{"type":"number"},"type":"object","title":"Totals"},"beginningBalances":{"additionalProperties":{"type":"number"},"type":"object","title":"Beginningbalances","default":{}},"endingBalances":{"additionalProperties":{"type":"number"},"type":"object","title":"Endingbalances","default":{}},"additions":{"additionalProperties":{"type":"number"},"type":"object","title":"Additions","default":{}},"amortizations":{"additionalProperties":{"type":"number"},"type":"object","title":"Amortizations","default":{}},"interestExpense":{"additionalProperties":{"type":"number"},"type":"object","title":"Interestexpense","default":{}},"unattributedPeriods":{"items":{"type":"string"},"type":"array","title":"Unattributedperiods","default":[]},"incompleteBalanceFromPeriod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incompletebalancefromperiod"}},"type":"object","required":["periods","rows","totals"],"title":"ActivityGridResponse","description":"Full activity grid: periods × schedule rows with totals."},"ActivityGridRow":{"properties":{"scheduleId":{"type":"string","title":"Scheduleid"},"title":{"type":"string","title":"Title"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"values":{"additionalProperties":{"type":"number"},"type":"object","title":"Values"}},"type":"object","required":["scheduleId","title","values"],"title":"ActivityGridRow","description":"A single schedule row in the activity grid."},"AddExpr-Input":{"properties":{"op":{"type":"string","const":"add","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"AddExpr"},"AddExpr-Output":{"properties":{"op":{"type":"string","const":"add","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"AddExpr"},"AddUserEmailAddressRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"AddUserEmailAddressRequest"},"AdminBlockedAccount":{"properties":{"companyId":{"type":"string","title":"Companyid"},"companyName":{"type":"string","title":"Companyname"},"blocker":{"type":"string","enum":["onboarding_incomplete","payment_incomplete"],"title":"Blocker"},"billingStatus":{"type":"string","title":"Billingstatus"},"contactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactemail"},"memberCount":{"type":"integer","title":"Membercount"},"blockedSince":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Blockedsince"},"blockedSeconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Blockedseconds"}},"type":"object","required":["companyId","companyName","blocker","billingStatus","memberCount"],"title":"AdminBlockedAccount"},"AdminBlockedAccountListResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdminBlockedAccount"},"type":"array","title":"Accounts"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["totalCount"],"title":"AdminBlockedAccountListResponse"},"AdminFeedbackInventoryResponse":{"properties":{"feedback":{"items":{"$ref":"#/components/schemas/AdminFeedbackItem"},"type":"array","title":"Feedback"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["totalCount"],"title":"AdminFeedbackInventoryResponse"},"AdminFeedbackItem":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"companyName":{"type":"string","title":"Companyname"},"category":{"type":"string","title":"Category"},"status":{"type":"string","enum":["open","handled"],"title":"Status"},"message":{"type":"string","title":"Message"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"toolName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Toolname"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"reporterUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporteruserid"},"reporterEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporteremail"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"handledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Handledat"},"linearIssueId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linearissueid"},"handledNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handlednote"},"sourceFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcefingerprint"},"sourcePayload":{"anyOf":[{},{"type":"null"}],"title":"Sourcepayload"}},"type":"object","required":["id","companyId","companyName","category","status","message","createdAt"],"title":"AdminFeedbackItem"},"AdminOutreachMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat"},"actorEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actoremail"},"fromAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fromaddress"}},"type":"object","required":["id","role","content","direction"],"title":"AdminOutreachMessage"},"AdminOutreachThread":{"properties":{"id":{"type":"string","title":"Id"},"threadKind":{"type":"string","enum":["conversation","failed_email"],"title":"Threadkind"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailmessageid"},"companyId":{"type":"string","title":"Companyid"},"companyName":{"type":"string","title":"Companyname"},"channel":{"type":"string","title":"Channel"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"},"sendStatus":{"type":"string","enum":["sent","failed"],"title":"Sendstatus"},"hasReply":{"type":"boolean","title":"Hasreply"},"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sentat"},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastactivityat"},"actorEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actoremail"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"}},"type":"object","required":["id","threadKind","companyId","companyName","channel","sendStatus","hasReply"],"title":"AdminOutreachThread"},"AdminOutreachThreadDetail":{"properties":{"id":{"type":"string","title":"Id"},"threadKind":{"type":"string","enum":["conversation","failed_email"],"title":"Threadkind"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailmessageid"},"companyId":{"type":"string","title":"Companyid"},"companyName":{"type":"string","title":"Companyname"},"channel":{"type":"string","title":"Channel"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"},"sendStatus":{"type":"string","enum":["sent","failed"],"title":"Sendstatus"},"hasReply":{"type":"boolean","title":"Hasreply"},"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sentat"},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastactivityat"},"actorEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actoremail"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"messages":{"items":{"$ref":"#/components/schemas/AdminOutreachMessage"},"type":"array","title":"Messages"}},"type":"object","required":["id","threadKind","companyId","companyName","channel","sendStatus","hasReply"],"title":"AdminOutreachThreadDetail"},"AdminOutreachThreadListResponse":{"properties":{"threads":{"items":{"$ref":"#/components/schemas/AdminOutreachThread"},"type":"array","title":"Threads"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["totalCount"],"title":"AdminOutreachThreadListResponse"},"AdminPermissionGrant":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"kind":{"type":"string","enum":["endpoint","tool","stored"],"title":"Kind"},"category":{"type":"string","title":"Category"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},"type":"object","required":["id","label","kind","category"],"title":"AdminPermissionGrant"},"AdminPermissionRole":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"displayName":{"type":"string","title":"Displayname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"grantIds":{"items":{"type":"string"},"type":"array","title":"Grantids"},"isSystem":{"type":"boolean","title":"Issystem"},"roleKind":{"type":"string","enum":["system","global"],"title":"Rolekind"},"assignedMemberCount":{"type":"integer","title":"Assignedmembercount","default":0}},"type":"object","required":["id","name","displayName","isSystem","roleKind"],"title":"AdminPermissionRole"},"AdminPermissionRoleCreate":{"properties":{"displayName":{"type":"string","maxLength":120,"minLength":1,"title":"Displayname"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"grantIds":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Grantids"}},"type":"object","required":["displayName","grantIds"],"title":"AdminPermissionRoleCreate"},"AdminPermissionRoleUpdate":{"properties":{"displayName":{"type":"string","maxLength":120,"minLength":1,"title":"Displayname"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"grantIds":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Grantids"}},"type":"object","required":["displayName","grantIds"],"title":"AdminPermissionRoleUpdate"},"AdminPermissionRolesResponse":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/AdminPermissionRole"},"type":"array","title":"Roles"},"grants":{"items":{"$ref":"#/components/schemas/AdminPermissionGrant"},"type":"array","title":"Grants"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["totalCount"],"title":"AdminPermissionRolesResponse"},"AdminPromptInventoryItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"category":{"type":"string","title":"Category"},"promptType":{"type":"string","title":"Prompttype"},"managed":{"type":"boolean","title":"Managed"},"editable":{"type":"boolean","title":"Editable"},"dynamic":{"type":"boolean","title":"Dynamic"},"editorSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Editorslug"},"sourceRefs":{"items":{"$ref":"#/components/schemas/AdminPromptRef"},"type":"array","title":"Sourcerefs"},"usageRefs":{"items":{"$ref":"#/components/schemas/AdminPromptRef"},"type":"array","title":"Usagerefs"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"}},"type":"object","required":["id","title","category","promptType","managed","editable","dynamic"],"title":"AdminPromptInventoryItem"},"AdminPromptInventoryResponse":{"properties":{"prompts":{"items":{"$ref":"#/components/schemas/AdminPromptInventoryItem"},"type":"array","title":"Prompts"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["totalCount"],"title":"AdminPromptInventoryResponse"},"AdminPromptRef":{"properties":{"label":{"type":"string","title":"Label"},"path":{"type":"string","title":"Path"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["label","path"],"title":"AdminPromptRef"},"AdminSkill":{"properties":{"id":{"type":"string","title":"Id"},"source":{"type":"string","enum":["builtin","global","company"],"title":"Source"},"scope":{"type":"string","enum":["global","company"],"title":"Scope"},"editable":{"type":"boolean","title":"Editable"},"overrideOfId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overrideofid"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid"},"ownerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owneremail"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"instructions":{"type":"string","title":"Instructions"},"instructionsSha256":{"type":"string","title":"Instructionssha256"},"availability":{"type":"string","enum":["chat","automation"],"title":"Availability"},"visibility":{"type":"string","enum":["private","public"],"title":"Visibility"},"accessSummary":{"type":"string","title":"Accesssummary"},"promptCatalogEligible":{"type":"boolean","title":"Promptcatalogeligible"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"updatedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyemail"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archivedat"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","source","scope","editable","key","name","description","instructions","instructionsSha256","availability","visibility","accessSummary","promptCatalogEligible"],"title":"AdminSkill"},"AdminSkillInventoryResponse":{"properties":{"skills":{"items":{"$ref":"#/components/schemas/AdminSkill"},"type":"array","title":"Skills"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["totalCount"],"title":"AdminSkillInventoryResponse"},"AdminSkillUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Description"},"instructions":{"anyOf":[{"type":"string","maxLength":100000,"minLength":1},{"type":"null"}],"title":"Instructions"},"availability":{"anyOf":[{"type":"string","enum":["chat","automation"]},{"type":"null"}],"title":"Availability"},"visibility":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}],"title":"Visibility"},"actionAssociations":{"anyOf":[{"items":{"$ref":"#/components/schemas/PorterAISkillActionAssociation"},"type":"array"},{"type":"null"}],"title":"Actionassociations"}},"type":"object","title":"AdminSkillUpdate"},"AdminUsageCompanyRef":{"properties":{"companyId":{"type":"string","title":"Companyid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"}},"type":"object","required":["companyId"],"title":"AdminUsageCompanyRef"},"AdminUsageDayPoint":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"surface":{"type":"string","enum":["web","ui","mcp","slack","sms","whatsapp","email"],"title":"Surface"},"activeUsers":{"type":"integer","title":"Activeusers"}},"type":"object","required":["day","surface","activeUsers"],"title":"AdminUsageDayPoint"},"AdminUsageSummary":{"properties":{"days":{"type":"integer","title":"Days"},"since":{"type":"string","format":"date-time","title":"Since"},"includeInternal":{"type":"boolean","title":"Includeinternal"},"activeUsers":{"type":"integer","title":"Activeusers"},"activeCompanies":{"type":"integer","title":"Activecompanies"},"excludedInternalUsers":{"type":"integer","title":"Excludedinternalusers"},"surfaces":{"items":{"$ref":"#/components/schemas/AdminUsageSurfaceTotals"},"type":"array","title":"Surfaces"},"byDay":{"items":{"$ref":"#/components/schemas/AdminUsageDayPoint"},"type":"array","title":"Byday"},"users":{"items":{"$ref":"#/components/schemas/AdminUsageUser"},"type":"array","title":"Users"}},"type":"object","required":["days","since","includeInternal","activeUsers","activeCompanies","excludedInternalUsers","surfaces","byDay","users"],"title":"AdminUsageSummary"},"AdminUsageSurfaceTotals":{"properties":{"surface":{"type":"string","enum":["web","ui","mcp","slack","sms","whatsapp","email"],"title":"Surface"},"activeUsers":{"type":"integer","title":"Activeusers"},"activeCompanies":{"type":"integer","title":"Activecompanies"},"activeUserDays":{"type":"integer","title":"Activeuserdays"},"toolCalls":{"type":"integer","title":"Toolcalls"}},"type":"object","required":["surface","activeUsers","activeCompanies","activeUserDays","toolCalls"],"title":"AdminUsageSurfaceTotals"},"AdminUsageUser":{"properties":{"userId":{"type":"string","title":"Userid"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"isInternal":{"type":"boolean","title":"Isinternal"},"companies":{"items":{"$ref":"#/components/schemas/AdminUsageCompanyRef"},"type":"array","title":"Companies"},"mcpClients":{"items":{"type":"string"},"type":"array","title":"Mcpclients"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastseenat"},"activeDays":{"type":"integer","title":"Activedays"},"surfaces":{"items":{"$ref":"#/components/schemas/AdminUsageUserSurface"},"type":"array","title":"Surfaces"}},"type":"object","required":["userId","isInternal","activeDays"],"title":"AdminUsageUser"},"AdminUsageUserSurface":{"properties":{"surface":{"type":"string","enum":["web","ui","mcp","slack","sms","whatsapp","email"],"title":"Surface"},"activeDays":{"type":"integer","title":"Activedays"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastseenat"},"toolCalls":{"type":"integer","title":"Toolcalls"}},"type":"object","required":["surface","activeDays","toolCalls"],"title":"AdminUsageUserSurface"},"AgingBuckets":{"properties":{"current":{"type":"number","title":"Current","default":0.0},"1_30":{"type":"number","title":"1 30","default":0.0},"31_60":{"type":"number","title":"31 60","default":0.0},"61_90":{"type":"number","title":"61 90","default":0.0},"90_plus":{"type":"number","title":"90 Plus","default":0.0}},"type":"object","title":"AgingBuckets","description":"Aging bucket totals for A/P report.\n\nReason: Explicit model ensures camelCase serialization of bucket keys."},"AiActivityFeedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AiActivityItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"AiActivityFeedResponse","description":"Paginated AI activity feed response."},"AiActivityItem":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"source":{"type":"string","title":"Source"},"actorLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actorlabel"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"runId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runid"},"occurredAt":{"type":"string","format":"date-time","title":"Occurredat"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","kind","title","source","occurredAt"],"title":"AiActivityItem","description":"Normalized conversation row for the Activity page's AI activity inspector."},"AiUsageSpendSummary":{"properties":{"windowDays":{"type":"integer","title":"Windowdays"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"},"totalUsd":{"type":"number","title":"Totalusd"},"totalInputTokens":{"type":"integer","title":"Totalinputtokens"},"totalCachedInputTokens":{"type":"integer","title":"Totalcachedinputtokens"},"totalUncachedInputTokens":{"type":"integer","title":"Totaluncachedinputtokens"},"totalOutputTokens":{"type":"integer","title":"Totaloutputtokens"},"totalReasoningTokens":{"type":"integer","title":"Totalreasoningtokens"},"totalTokens":{"type":"integer","title":"Totaltokens"},"totalToolCalls":{"type":"integer","title":"Totaltoolcalls"},"totalCompactionItems":{"type":"integer","title":"Totalcompactionitems"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"missingEstimatedCostInputTokens":{"type":"integer","title":"Missingestimatedcostinputtokens"},"missingEstimatedCostOutputTokens":{"type":"integer","title":"Missingestimatedcostoutputtokens"},"missingCompanyCalls":{"type":"integer","title":"Missingcompanycalls"},"calls":{"type":"integer","title":"Calls"},"bySource":{"items":{"$ref":"#/components/schemas/SpendBySource"},"type":"array","title":"Bysource"},"byModel":{"items":{"$ref":"#/components/schemas/SpendByModel"},"type":"array","title":"Bymodel"},"byServiceTier":{"items":{"$ref":"#/components/schemas/SpendByServiceTier"},"type":"array","title":"Byservicetier"},"byModelTier":{"items":{"$ref":"#/components/schemas/SpendByModelTier"},"type":"array","title":"Bymodeltier"},"byCompany":{"items":{"$ref":"#/components/schemas/SpendByCompany"},"type":"array","title":"Bycompany"},"byConversation":{"items":{"$ref":"#/components/schemas/SpendByConversation"},"type":"array","title":"Byconversation"},"estimatedCostGaps":{"items":{"$ref":"#/components/schemas/EstimatedCostGap"},"type":"array","title":"Estimatedcostgaps"},"byDay":{"items":{"$ref":"#/components/schemas/SpendByDay"},"type":"array","title":"Byday"}},"type":"object","required":["windowDays","companyId","totalUsd","totalInputTokens","totalCachedInputTokens","totalUncachedInputTokens","totalOutputTokens","totalReasoningTokens","totalTokens","totalToolCalls","totalCompactionItems","missingEstimatedCostCalls","missingEstimatedCostInputTokens","missingEstimatedCostOutputTokens","missingCompanyCalls","calls","bySource","byModel","byServiceTier","byModelTier","byCompany","byConversation","estimatedCostGaps","byDay"],"title":"AiUsageSpendSummary"},"AllDatesScopeSelection":{"properties":{"kind":{"type":"string","const":"all_dates","title":"Kind"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"AllDatesScopeSelection"},"ApiKeyConnectRequest":{"properties":{"apiKey":{"type":"string","title":"Apikey","default":""},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"orgId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orgid"}},"type":"object","title":"ApiKeyConnectRequest"},"ApplyNumbersRequest":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/Assignment"},"type":"array","title":"Assignments"}},"type":"object","required":["assignments"],"title":"ApplyNumbersRequest","description":"Request body for the apply-numbers endpoint."},"ApplyNumbersResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ApplyNumbersResult"},"type":"array","title":"Results"},"summary":{"$ref":"#/components/schemas/ApplyNumbersSummary"}},"type":"object","required":["results","summary"],"title":"ApplyNumbersResponse","description":"Response for the apply-numbers endpoint."},"ApplyNumbersResult":{"properties":{"accountId":{"type":"string","title":"Accountid"},"success":{"type":"boolean","title":"Success"},"qboSynced":{"type":"boolean","title":"Qbosynced"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["accountId","success","qboSynced"],"title":"ApplyNumbersResult","description":"Result for a single account-number assignment."},"ApplyNumbersSummary":{"properties":{"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["succeeded","failed"],"title":"ApplyNumbersSummary","description":"Summary counts for the apply-numbers response."},"ApplyPaymentRequest":{"properties":{"applications":{"items":{"$ref":"#/components/schemas/PaymentApplicationCreate"},"type":"array","title":"Applications"}},"type":"object","required":["applications"],"title":"ApplyPaymentRequest","description":"Request to apply payment to invoice(s)."},"ApplyRuleHistoryRequest":{"properties":{"selectedTransactionIds":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Selectedtransactionids"}},"type":"object","required":["selectedTransactionIds"],"title":"ApplyRuleHistoryRequest","description":"Exact reviewed rows selected for an opt-in historical correction."},"ApproveRequest":{"properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"effectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectivedate"}},"type":"object","title":"ApproveRequest","description":"Request body for approving a bill."},"ApproveResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"approvedBy":{"type":"string","title":"Approvedby"},"approvedAt":{"type":"string","title":"Approvedat"}},"type":"object","required":["id","status","approvedBy","approvedAt"],"title":"ApproveResponse","description":"Response from bill approval.\n\nReason: The repo's approve() only sets status='approved' and updated_at.\nWe enrich with the user_id from the access token as approved_by."},"ArtifactActionRunRequest":{"properties":{"recordId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Recordid"},"value":{"title":"Value"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"additionalProperties":false,"type":"object","title":"ArtifactActionRunRequest"},"ArtifactActionRunResponse":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"sourceToken":{"type":"string","title":"Sourcetoken"},"actionKey":{"type":"string","title":"Actionkey"},"action":{"type":"string","title":"Action"},"message":{"type":"string","title":"Message","default":""},"links":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Links"},"result":{"title":"Result"}},"type":"object","required":["artifactId","sourceToken","actionKey","action"],"title":"ArtifactActionRunResponse"},"ArtifactAsOf":{"properties":{"dataRef":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Dataref"},"label":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Label"},"defaultDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultdate","description":"Optional artifact comparison-date intent. Use literal today for a date resolved when the artifact runs, or an ISO civil date for a fixed comparison date. Exclusive with defaultPeriod and defaultRange."},"defaultPeriod":{"anyOf":[{"type":"string","enum":["this_month","last_month","this_quarter","last_quarter","ytd","this_year","trailing_3_months","trailing_6_months","trailing_12_months"]},{"type":"null"}],"title":"Defaultperiod","description":"Optional calendar reporting period the report opens on, resolved when it runs. Sources must read a date range: monthly finance reads take period/year/month with year and month from context; range reads take start/end dates with the end date from context. Readers can then switch presets or pick a custom range. Exclusive with defaultDate and defaultRange."},"defaultRange":{"anyOf":[{"$ref":"#/components/schemas/ArtifactDefaultRange"},{"type":"null"}],"description":"Optional fixed reporting date range the report opens on, with the same source rules as defaultPeriod. Monthly finance reads need whole-month boundaries. Exclusive with defaultDate and defaultPeriod."}},"additionalProperties":false,"type":"object","title":"ArtifactAsOf"},"ArtifactDataRef":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"}},"additionalProperties":false,"type":"object","required":["key"],"title":"ArtifactDataRef"},"ArtifactDefaultRange":{"properties":{"startDate":{"type":"string","format":"date","title":"Startdate","description":"Inclusive ISO civil start date."},"endDate":{"type":"string","format":"date","title":"Enddate","description":"Inclusive ISO civil end date; not before startDate."}},"additionalProperties":false,"type":"object","required":["startDate","endDate"],"title":"ArtifactDefaultRange"},"ArtifactDetailConfig-Input":{"properties":{"presentation":{"type":"string","enum":["drawer","modal","popover","inline"],"title":"Presentation","description":"Interaction surface for the configured detail: drawer side panel, modal overlay, popover, or inline table row expansion."},"title":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Title","description":"Expression for the opened detail title.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"description":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Description","description":"Optional short explanation shown above detail sections."},"sections":{"items":{"$ref":"#/components/schemas/ArtifactDetailSection-Input"},"type":"array","maxItems":8,"minItems":1,"title":"Sections"}},"additionalProperties":false,"type":"object","required":["presentation","title","sections"],"title":"ArtifactDetailConfig"},"ArtifactDetailConfig-Output":{"properties":{"presentation":{"type":"string","enum":["drawer","modal","popover","inline"],"title":"Presentation","description":"Interaction surface for the configured detail: drawer side panel, modal overlay, popover, or inline table row expansion."},"title":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Title","description":"Expression for the opened detail title.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"description":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Description","description":"Optional short explanation shown above detail sections."},"sections":{"items":{"$ref":"#/components/schemas/ArtifactDetailSection-Output"},"type":"array","maxItems":8,"minItems":1,"title":"Sections"}},"additionalProperties":false,"type":"object","required":["presentation","title","sections"],"title":"ArtifactDetailConfig"},"ArtifactDetailItem-Input":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format","description":"Display format for the detail value expression.","default":"text"}},"additionalProperties":false,"type":"object","required":["label","value"],"title":"ArtifactDetailItem"},"ArtifactDetailItem-Output":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format","description":"Display format for the detail value expression.","default":"text"}},"additionalProperties":false,"type":"object","required":["label","value"],"title":"ArtifactDetailItem"},"ArtifactDetailPanelBlock-Input":{"properties":{"type":{"type":"string","const":"detailPanel","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"title":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Title","description":"Expression for the side-panel drawer title.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"description":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Description","description":"Optional short explanation shown above side-panel content."},"sections":{"items":{"$ref":"#/components/schemas/ArtifactDetailSection-Input"},"type":"array","maxItems":8,"title":"Sections"},"contentLayout":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}},{"type":"null"}],"title":"Contentlayout","description":"Optional full artifact layout rendered inside this side-panel drawer. Use this for rich drawer bodies with tabs, overview metrics, tables, charts, lists, narrative, sections, or panels; referenced blocks may be panel-only or intentionally reused in another artifact layout placement."},"blockIds":{"items":{"type":"string"},"type":"array","maxItems":16,"title":"Blockids","description":"Legacy compact list of artifact display block ids rendered inside this side panel. Use contentLayout for new rich side-panel bodies. Referenced blocks may be panel-only or intentionally reused in another artifact layout placement."}},"additionalProperties":false,"type":"object","required":["type","id","title"],"title":"ArtifactDetailPanelBlock"},"ArtifactDetailPanelBlock-Output":{"properties":{"type":{"type":"string","const":"detailPanel","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"title":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Title","description":"Expression for the side-panel drawer title.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"description":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Description","description":"Optional short explanation shown above side-panel content."},"sections":{"items":{"$ref":"#/components/schemas/ArtifactDetailSection-Output"},"type":"array","maxItems":8,"title":"Sections"},"contentLayout":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}},{"type":"null"}],"title":"Contentlayout","description":"Optional full artifact layout rendered inside this side-panel drawer. Use this for rich drawer bodies with tabs, overview metrics, tables, charts, lists, narrative, sections, or panels; referenced blocks may be panel-only or intentionally reused in another artifact layout placement."},"blockIds":{"items":{"type":"string"},"type":"array","maxItems":16,"title":"Blockids","description":"Legacy compact list of artifact display block ids rendered inside this side panel. Use contentLayout for new rich side-panel bodies. Referenced blocks may be panel-only or intentionally reused in another artifact layout placement."}},"additionalProperties":false,"type":"object","required":["type","id","title"],"title":"ArtifactDetailPanelBlock"},"ArtifactDetailSection-Input":{"properties":{"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"items":{"items":{"$ref":"#/components/schemas/ArtifactDetailItem-Input"},"type":"array","maxItems":20,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["title","items"],"title":"ArtifactDetailSection"},"ArtifactDetailSection-Output":{"properties":{"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"items":{"items":{"$ref":"#/components/schemas/ArtifactDetailItem-Output"},"type":"array","maxItems":20,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["title","items"],"title":"ArtifactDetailSection"},"ArtifactInteractionAssignment-Input":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key","description":"Artifact-local interaction context key to set for downstream expression.interaction references."},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","description":"Expression evaluated against the clicked item. For table, chart, and list interactions this may read clicked-row fields; for metric interactions it should use literal, control, interaction, or aggregate expressions.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}}},"additionalProperties":false,"type":"object","required":["key","value"],"title":"ArtifactInteractionAssignment"},"ArtifactInteractionAssignment-Output":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key","description":"Artifact-local interaction context key to set for downstream expression.interaction references."},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","description":"Expression evaluated against the clicked item. For table, chart, and list interactions this may read clicked-row fields; for metric interactions it should use literal, control, interaction, or aggregate expressions.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}}},"additionalProperties":false,"type":"object","required":["key","value"],"title":"ArtifactInteractionAssignment"},"ArtifactInteractionConfig-Input":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Label","description":"Accessible action label for the click target. Porter renders the actual control chrome."},"setContext":{"items":{"$ref":"#/components/schemas/ArtifactInteractionAssignment-Input"},"type":"array","maxItems":12,"title":"Setcontext","description":"Artifact-local transient context updates to apply when the target is clicked. These do not write Porter records or run ontology mutations."},"detail":{"anyOf":[{"$ref":"#/components/schemas/ArtifactDetailConfig-Input"},{"type":"null"}],"description":"Optional detail surface to open from the same interaction. Use the same drawer, modal, popover, or inline contract as existing details."},"sidePanelId":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Sidepanelid","description":"Optional detailPanel block id to open as a drawer after applying the interaction context. Use this when the drawer itself is an artifact element with its own rows or child display blocks."}},"additionalProperties":false,"type":"object","title":"ArtifactInteractionConfig"},"ArtifactInteractionConfig-Output":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Label","description":"Accessible action label for the click target. Porter renders the actual control chrome."},"setContext":{"items":{"$ref":"#/components/schemas/ArtifactInteractionAssignment-Output"},"type":"array","maxItems":12,"title":"Setcontext","description":"Artifact-local transient context updates to apply when the target is clicked. These do not write Porter records or run ontology mutations."},"detail":{"anyOf":[{"$ref":"#/components/schemas/ArtifactDetailConfig-Output"},{"type":"null"}],"description":"Optional detail surface to open from the same interaction. Use the same drawer, modal, popover, or inline contract as existing details."},"sidePanelId":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Sidepanelid","description":"Optional detailPanel block id to open as a drawer after applying the interaction context. Use this when the drawer itself is an artifact element with its own rows or child display blocks."}},"additionalProperties":false,"type":"object","title":"ArtifactInteractionConfig"},"ArtifactLayoutBlockNode":{"properties":{"type":{"type":"string","const":"block","title":"Type"},"blockId":{"type":"string","maxLength":80,"minLength":1,"title":"Blockid"}},"additionalProperties":false,"type":"object","required":["type","blockId"],"title":"ArtifactLayoutBlockNode"},"ArtifactLayoutGridItem-Input":{"properties":{"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}},"span":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11,12],"title":"Span","default":1}},"additionalProperties":false,"type":"object","required":["child"],"title":"ArtifactLayoutGridItem"},"ArtifactLayoutGridItem-Output":{"properties":{"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}},"span":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11,12],"title":"Span","default":1}},"additionalProperties":false,"type":"object","required":["child"],"title":"ArtifactLayoutGridItem"},"ArtifactLayoutGridNode-Input":{"properties":{"type":{"type":"string","const":"grid","title":"Type"},"columns":{"type":"integer","enum":[1,2,3,4,5,6,12],"title":"Columns"},"gap":{"type":"string","enum":["none","xs","sm","md","lg"],"title":"Gap","default":"md"},"children":{"items":{"$ref":"#/components/schemas/ArtifactLayoutGridItem-Input"},"type":"array","maxItems":24,"minItems":1,"title":"Children"}},"additionalProperties":false,"type":"object","required":["type","columns","children"],"title":"ArtifactLayoutGridNode"},"ArtifactLayoutGridNode-Output":{"properties":{"type":{"type":"string","const":"grid","title":"Type"},"columns":{"type":"integer","enum":[1,2,3,4,5,6,12],"title":"Columns"},"gap":{"type":"string","enum":["none","xs","sm","md","lg"],"title":"Gap","default":"md"},"children":{"items":{"$ref":"#/components/schemas/ArtifactLayoutGridItem-Output"},"type":"array","maxItems":24,"minItems":1,"title":"Children"}},"additionalProperties":false,"type":"object","required":["type","columns","children"],"title":"ArtifactLayoutGridNode"},"ArtifactLayoutMetricGroupNode":{"properties":{"type":{"type":"string","const":"metricGroup","title":"Type"},"blockIds":{"items":{"type":"string"},"type":"array","maxItems":12,"minItems":1,"title":"Blockids"},"columns":{"enum":["auto",1,2,3,4,5,6],"title":"Columns","default":"auto"}},"additionalProperties":false,"type":"object","required":["type","blockIds"],"title":"ArtifactLayoutMetricGroupNode"},"ArtifactLayoutPanelNode-Input":{"properties":{"type":{"type":"string","const":"panel","title":"Type"},"height":{"type":"string","enum":["content","compact","standard","tall","viewport-half"],"title":"Height","default":"content"},"overflow":{"type":"string","enum":["visible","scroll","clip"],"title":"Overflow","default":"visible"},"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}}},"additionalProperties":false,"type":"object","required":["type","child"],"title":"ArtifactLayoutPanelNode"},"ArtifactLayoutPanelNode-Output":{"properties":{"type":{"type":"string","const":"panel","title":"Type"},"height":{"type":"string","enum":["content","compact","standard","tall","viewport-half"],"title":"Height","default":"content"},"overflow":{"type":"string","enum":["visible","scroll","clip"],"title":"Overflow","default":"visible"},"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}}},"additionalProperties":false,"type":"object","required":["type","child"],"title":"ArtifactLayoutPanelNode"},"ArtifactLayoutSectionNode-Input":{"properties":{"type":{"type":"string","const":"section","title":"Type"},"title":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Title","description":"Optional visible section heading for a group of related artifact content. Use only for user-facing group labels; keep element-specific titles on the display blocks."},"description":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Description","description":"Optional quiet explanatory text under the section heading. Use for section-level context, not implementation notes or artifact behavior instructions."},"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}}},"additionalProperties":false,"type":"object","required":["type","child"],"title":"ArtifactLayoutSectionNode"},"ArtifactLayoutSectionNode-Output":{"properties":{"type":{"type":"string","const":"section","title":"Type"},"title":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Title","description":"Optional visible section heading for a group of related artifact content. Use only for user-facing group labels; keep element-specific titles on the display blocks."},"description":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Description","description":"Optional quiet explanatory text under the section heading. Use for section-level context, not implementation notes or artifact behavior instructions."},"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}}},"additionalProperties":false,"type":"object","required":["type","child"],"title":"ArtifactLayoutSectionNode"},"ArtifactLayoutSplitNode-Input":{"properties":{"type":{"type":"string","const":"split","title":"Type"},"ratio":{"type":"string","enum":["balanced","main-sidebar","sidebar-main"],"title":"Ratio","description":"Two-pane width contract. Use a sidebar ratio when one pane has at most three compact user-facing table columns and the other pane materially benefits from more width. Use balanced only for similarly complex panes.","default":"balanced"},"gap":{"type":"string","enum":["none","xs","sm","md","lg"],"title":"Gap","default":"md"},"children":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}},{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Children"}},"additionalProperties":false,"type":"object","required":["type","children"],"title":"ArtifactLayoutSplitNode"},"ArtifactLayoutSplitNode-Output":{"properties":{"type":{"type":"string","const":"split","title":"Type"},"ratio":{"type":"string","enum":["balanced","main-sidebar","sidebar-main"],"title":"Ratio","description":"Two-pane width contract. Use a sidebar ratio when one pane has at most three compact user-facing table columns and the other pane materially benefits from more width. Use balanced only for similarly complex panes.","default":"balanced"},"gap":{"type":"string","enum":["none","xs","sm","md","lg"],"title":"Gap","default":"md"},"children":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}},{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Children"}},"additionalProperties":false,"type":"object","required":["type","children"],"title":"ArtifactLayoutSplitNode"},"ArtifactLayoutStackNode-Input":{"properties":{"type":{"type":"string","const":"stack","title":"Type"},"direction":{"type":"string","enum":["vertical","horizontal"],"title":"Direction","default":"vertical"},"gap":{"type":"string","enum":["none","xs","sm","md","lg"],"title":"Gap","default":"md"},"align":{"type":"string","enum":["start","center","stretch","between"],"title":"Align","default":"stretch"},"children":{"items":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}},"type":"array","maxItems":24,"minItems":1,"title":"Children"}},"additionalProperties":false,"type":"object","required":["type","children"],"title":"ArtifactLayoutStackNode"},"ArtifactLayoutStackNode-Output":{"properties":{"type":{"type":"string","const":"stack","title":"Type"},"direction":{"type":"string","enum":["vertical","horizontal"],"title":"Direction","default":"vertical"},"gap":{"type":"string","enum":["none","xs","sm","md","lg"],"title":"Gap","default":"md"},"align":{"type":"string","enum":["start","center","stretch","between"],"title":"Align","default":"stretch"},"children":{"items":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}},"type":"array","maxItems":24,"minItems":1,"title":"Children"}},"additionalProperties":false,"type":"object","required":["type","children"],"title":"ArtifactLayoutStackNode"},"ArtifactLayoutTab-Input":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"},"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}}},"additionalProperties":false,"type":"object","required":["id","label","child"],"title":"ArtifactLayoutTab"},"ArtifactLayoutTab-Output":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"},"child":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"title":"Child","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}}},"additionalProperties":false,"type":"object","required":["id","label","child"],"title":"ArtifactLayoutTab"},"ArtifactLayoutTabsNode-Input":{"properties":{"type":{"type":"string","const":"tabs","title":"Type"},"tabs":{"items":{"$ref":"#/components/schemas/ArtifactLayoutTab-Input"},"type":"array","maxItems":8,"minItems":2,"title":"Tabs"},"defaultTabId":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Defaulttabid"}},"additionalProperties":false,"type":"object","required":["type","tabs"],"title":"ArtifactLayoutTabsNode"},"ArtifactLayoutTabsNode-Output":{"properties":{"type":{"type":"string","const":"tabs","title":"Type"},"tabs":{"items":{"$ref":"#/components/schemas/ArtifactLayoutTab-Output"},"type":"array","maxItems":8,"minItems":2,"title":"Tabs"},"defaultTabId":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Defaulttabid"}},"additionalProperties":false,"type":"object","required":["type","tabs"],"title":"ArtifactLayoutTabsNode"},"ArtifactLiveDataProgram":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key","description":"Stable key matched by an artifact dataRef."},"title":{"type":"string","maxLength":160,"title":"Title","description":"Short data-source label.","default":""},"description":{"type":"string","maxLength":500,"title":"Description","description":"What the data source contributes to the artifact.","default":""},"selectionId":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Selectionid","description":"Selection key required when the program reads the current selection."},"program":{"$ref":"#/components/schemas/ArtifactRowProgram","description":"Read-only ontology row program. Literal, uploaded-file, and data_ref rows are invalid. Direct runtime refs are limited to declared date context. Operational-model sources must read connected objects."}},"additionalProperties":false,"type":"object","required":["key","program"],"title":"ArtifactLiveDataProgram"},"ArtifactLiveDataProgramSummary":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title","default":""},"description":{"type":"string","title":"Description","default":""},"selectionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selectionid"},"temporal":{"anyOf":[{"$ref":"#/components/schemas/TemporalContract"},{"type":"null"}]},"workflowObjectTypeKeys":{"items":{"type":"string"},"type":"array","title":"Workflowobjecttypekeys"}},"type":"object","required":["key"],"title":"ArtifactLiveDataProgramSummary"},"ArtifactMetricComparison-Input":{"properties":{"prior":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Prior","description":"Expression for the comparable-period value, in the same units and format as the metric value. Compute it from the same filters as the current value over the comparable period, typically an aggregate over a dataRef whose program reads the prior period (for example the elapsed prior-year window). The renderer subtracts it from the current value to show the change.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label","description":"Name of the comparable period, rendered after 'vs' (for example 'FY2025 YTD', 'prior quarter', 'full FY2025'). Name the exact comparison basis so readers can tell an elapsed-period comparison from a full prior period."},"favorableDirection":{"type":"string","enum":["increase","decrease"],"title":"Favorabledirection","description":"Which direction of change is good news for this metric: increase for revenue or engagements, decrease for costs or time to close. A favorable change renders green, an unfavorable change renders oxblood, and no change renders muted."},"change":{"type":"string","enum":["absolute","percent","both"],"title":"Change","description":"Which change to show. absolute shows the signed difference in the metric format; percent shows the change relative to the prior value; both shows the difference followed by the percentage. The percentage renders as n/m (not meaningful) when the prior value is zero or negative, and the whole comparison renders as unavailable when either value is missing or non-numeric.","default":"both"}},"additionalProperties":false,"type":"object","required":["prior","label","favorableDirection"],"title":"ArtifactMetricComparison","description":"Prior/comparable-period comparison rendered as a metric's toned delta.\n\nReason: POR-2674 — headline metrics could only carry a free-text subtitle\nthat the renderer always inked neutral, so an improvement and a decline\nlooked identical. The comparison is authored as the comparable value plus\nwhich direction is good news; the renderer computes the change, the\npercentage, and the tone. Tone follows favorability, not arithmetic sign\n(BIBLE §IV.12 / report-favorability.ts): revenue up and expenses down are\nboth favorable. The zero/negative/missing prior guard lives in the renderer\nso no author has to hand-write a safe division."},"ArtifactMetricComparison-Output":{"properties":{"prior":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Prior","description":"Expression for the comparable-period value, in the same units and format as the metric value. Compute it from the same filters as the current value over the comparable period, typically an aggregate over a dataRef whose program reads the prior period (for example the elapsed prior-year window). The renderer subtracts it from the current value to show the change.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label","description":"Name of the comparable period, rendered after 'vs' (for example 'FY2025 YTD', 'prior quarter', 'full FY2025'). Name the exact comparison basis so readers can tell an elapsed-period comparison from a full prior period."},"favorableDirection":{"type":"string","enum":["increase","decrease"],"title":"Favorabledirection","description":"Which direction of change is good news for this metric: increase for revenue or engagements, decrease for costs or time to close. A favorable change renders green, an unfavorable change renders oxblood, and no change renders muted."},"change":{"type":"string","enum":["absolute","percent","both"],"title":"Change","description":"Which change to show. absolute shows the signed difference in the metric format; percent shows the change relative to the prior value; both shows the difference followed by the percentage. The percentage renders as n/m (not meaningful) when the prior value is zero or negative, and the whole comparison renders as unavailable when either value is missing or non-numeric.","default":"both"}},"additionalProperties":false,"type":"object","required":["prior","label","favorableDirection"],"title":"ArtifactMetricComparison","description":"Prior/comparable-period comparison rendered as a metric's toned delta.\n\nReason: POR-2674 — headline metrics could only carry a free-text subtitle\nthat the renderer always inked neutral, so an improvement and a decline\nlooked identical. The comparison is authored as the comparable value plus\nwhich direction is good news; the renderer computes the change, the\npercentage, and the tone. Tone follows favorability, not arithmetic sign\n(BIBLE §IV.12 / report-favorability.ts): revenue up and expenses down are\nboth favorable. The zero/negative/missing prior guard lives in the renderer\nso no author has to hand-write a safe division."},"ArtifactOntologyAction":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key","description":"Stable key referenced by artifact controls."},"title":{"type":"string","maxLength":160,"title":"Title","description":"Short user-facing action label.","default":""},"description":{"type":"string","maxLength":500,"title":"Description","description":"What the saved artifact action changes.","default":""},"action":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Action","description":"Exact ontology tool id for one action. Use mutations for writes; read-only actions require a declared file-download result. Use this or ordered steps, and preserve graph-local ids."},"staticParams":{"additionalProperties":true,"type":"object","title":"Staticparams","description":"Static parameters copied into the single ontology action payload before runtime control bindings are applied. Mutation actions must include a non-empty reason here so direct artifact interactions retain audit provenance."},"bindings":{"items":{"$ref":"#/components/schemas/ArtifactOntologyActionBinding"},"type":"array","maxItems":20,"title":"Bindings","description":"Runtime bindings for one action; ordered groups use steps[].bindings. Table edits map record_id and control_value into the mutation schema. Use one action per editable field; explicit null clears. Create durable model storage before binding state with no record field."},"steps":{"items":{"$ref":"#/components/schemas/ArtifactOntologyActionStep"},"type":"array","maxItems":10,"title":"Steps","description":"Ordered ontology mutation steps for one artifact action. Use when a single user edit needs multiple saved Porter mutations."}},"additionalProperties":false,"type":"object","required":["key"],"title":"ArtifactOntologyAction"},"ArtifactOntologyActionBinding":{"properties":{"path":{"type":"string","maxLength":160,"minLength":1,"title":"Path","description":"Dotted payload path to set before calling the saved ontology mutation. Use this to map a control-provided value, record id, or declared control attribute into the ontology action's parameter schema."},"source":{"type":"string","enum":["control_value","record_id","attribute"],"title":"Source","description":"Where the runtime value for this payload path comes from: the control value, the control's target record id, or a named attribute declared on the control. control_value may be explicit null when a nullable edit control is cleared; omitted control values still fail."},"attribute":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Attribute","description":"Required when source is attribute. Names the declared control attribute whose value should be copied into this payload path."}},"additionalProperties":false,"type":"object","required":["path","source"],"title":"ArtifactOntologyActionBinding"},"ArtifactOntologyActionStep":{"properties":{"action":{"type":"string","maxLength":160,"minLength":1,"title":"Action","description":"Exact ontology tool id for this step. Use mutations for writes; read-only actions require a declared file-download result. Preserve graph-local ids."},"staticParams":{"additionalProperties":true,"type":"object","title":"Staticparams","description":"Static parameters copied into this ontology action payload before runtime control bindings are applied."},"bindings":{"items":{"$ref":"#/components/schemas/ArtifactOntologyActionBinding"},"type":"array","maxItems":20,"title":"Bindings","description":"Runtime bindings that map a trusted artifact control event into the ontology action payload."}},"additionalProperties":false,"type":"object","required":["action"],"title":"ArtifactOntologyActionStep"},"ArtifactOntologyActionSummary":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title","default":""},"description":{"type":"string","title":"Description","default":""},"action":{"type":"string","title":"Action"},"stepCount":{"type":"integer","title":"Stepcount","default":1}},"type":"object","required":["key","action"],"title":"ArtifactOntologyActionSummary"},"ArtifactProgramAdmissionReceipt":{"properties":{"companyId":{"type":"string","title":"Companyid"},"principalIdentity":{"type":"string","title":"Principalidentity"},"sourceToken":{"type":"string","title":"Sourcetoken"},"programHash":{"type":"string","title":"Programhash"},"dependencyContractHash":{"type":"string","title":"Dependencycontracthash"},"scopeIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scopeidentity"},"admittedAt":{"type":"string","title":"Admittedat"}},"type":"object","required":["companyId","principalIdentity","sourceToken","programHash","dependencyContractHash","admittedAt"],"title":"ArtifactProgramAdmissionReceipt"},"ArtifactProgramBatchRunItemResponse":{"properties":{"programKey":{"type":"string","title":"Programkey"},"response":{"anyOf":[{"$ref":"#/components/schemas/ArtifactProgramRunResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"repairDetails":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Repairdetails"}},"type":"object","required":["programKey"],"title":"ArtifactProgramBatchRunItemResponse"},"ArtifactProgramBatchRunRequest":{"properties":{"programs":{"items":{"$ref":"#/components/schemas/ArtifactProgramBatchRunRequestItem"},"type":"array","maxItems":20,"minItems":1,"title":"Programs"}},"additionalProperties":false,"type":"object","required":["programs"],"title":"ArtifactProgramBatchRunRequest"},"ArtifactProgramBatchRunRequestItem":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"request":{"$ref":"#/components/schemas/ArtifactProgramRunRequest"}},"additionalProperties":false,"type":"object","required":["key"],"title":"ArtifactProgramBatchRunRequestItem"},"ArtifactProgramBatchRunResponse":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"sourceToken":{"type":"string","title":"Sourcetoken"},"items":{"items":{"$ref":"#/components/schemas/ArtifactProgramBatchRunItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["artifactId","sourceToken","items"],"title":"ArtifactProgramBatchRunResponse"},"ArtifactProgramDrilldownClickedPoint":{"properties":{"rowIndex":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rowindex"},"row":{"additionalProperties":true,"type":"object","title":"Row"},"x":{"anyOf":[{},{"type":"null"}],"title":"X"},"y":{"anyOf":[{},{"type":"null"}],"title":"Y"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"series":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Series"},"selection":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionSelection"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"ArtifactProgramDrilldownClickedPoint"},"ArtifactProgramDrilldownEntityGroup":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"rows":{"items":{"$ref":"#/components/schemas/ArtifactProgramDrilldownEntityRow"},"type":"array","title":"Rows"},"totalAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalamount"}},"type":"object","required":["id","label","rows"],"title":"ArtifactProgramDrilldownEntityGroup"},"ArtifactProgramDrilldownEntityRow":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"sourceLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcelabel"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"amount":{"type":"number","title":"Amount"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["amount"],"title":"ArtifactProgramDrilldownEntityRow"},"ArtifactProgramDrilldownGlAccount":{"properties":{"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"accountType":{"type":"string","title":"Accounttype"},"openingBalance":{"type":"number","title":"Openingbalance"},"transactions":{"items":{"$ref":"#/components/schemas/ArtifactProgramDrilldownTransaction"},"type":"array","title":"Transactions"},"closingBalance":{"type":"number","title":"Closingbalance"},"totalDebits":{"type":"number","title":"Totaldebits"},"totalCredits":{"type":"number","title":"Totalcredits"},"page":{"type":"integer","title":"Page"},"pageSize":{"type":"integer","title":"Pagesize"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["accountId","accountName","accountType","openingBalance","transactions","closingBalance","totalDebits","totalCredits","page","pageSize","totalCount"],"title":"ArtifactProgramDrilldownGlAccount"},"ArtifactProgramDrilldownLineage":{"properties":{"kind":{"type":"string","const":"row_program","title":"Kind","default":"row_program"},"resultStep":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resultstep"},"sourceSteps":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Sourcesteps"},"transformations":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Transformations"},"supportsDefaultDrilldown":{"type":"boolean","title":"Supportsdefaultdrilldown","default":true}},"type":"object","title":"ArtifactProgramDrilldownLineage"},"ArtifactProgramDrilldownRequest":{"properties":{"runtimeContext":{"additionalProperties":true,"type":"object","title":"Runtimecontext"},"temporalOverrides":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PointScopeSelection"},{"$ref":"#/components/schemas/RangeScopeSelection"},{"$ref":"#/components/schemas/PeriodScopeSelection"},{"$ref":"#/components/schemas/LastClosedPeriodScopeSelection"},{"$ref":"#/components/schemas/PreviousPeriodScopeSelection"},{"$ref":"#/components/schemas/AllDatesScopeSelection"},{"$ref":"#/components/schemas/CurrentStateScopeSelection"},{"$ref":"#/components/schemas/UndatedScopeSelection"}],"discriminator":{"propertyName":"kind","mapping":{"all_dates":"#/components/schemas/AllDatesScopeSelection","current_state":"#/components/schemas/CurrentStateScopeSelection","last_closed_period":"#/components/schemas/LastClosedPeriodScopeSelection","period":"#/components/schemas/PeriodScopeSelection","point":"#/components/schemas/PointScopeSelection","previous_period":"#/components/schemas/PreviousPeriodScopeSelection","range":"#/components/schemas/RangeScopeSelection","undated":"#/components/schemas/UndatedScopeSelection"}}},"type":"object","title":"Temporaloverrides"},"acceptedTemporalVersions":{"items":{"type":"integer"},"type":"array","title":"Acceptedtemporalversions"},"originScopeIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originscopeidentity"},"selection":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Selection"},"limit":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Limit"},"compactRows":{"type":"boolean","title":"Compactrows","default":false},"compactExecutionBindings":{"type":"boolean","title":"Compactexecutionbindings","default":false},"clicked":{"$ref":"#/components/schemas/ArtifactProgramDrilldownClickedPoint"},"basis":{"anyOf":[{"type":"string","enum":["cash","accrual"]},{"type":"null"}],"title":"Basis"}},"additionalProperties":false,"type":"object","required":["clicked"],"title":"ArtifactProgramDrilldownRequest"},"ArtifactProgramDrilldownResponse":{"properties":{"kind":{"type":"string","enum":["gl","entities","unsupported"],"title":"Kind"},"title":{"type":"string","title":"Title"},"subtitle":{"type":"string","title":"Subtitle","default":""},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"},"accounts":{"items":{"$ref":"#/components/schemas/ArtifactProgramDrilldownGlAccount"},"type":"array","title":"Accounts"},"rows":{"items":{"$ref":"#/components/schemas/ArtifactProgramDrilldownEntityRow"},"type":"array","title":"Rows"},"groups":{"items":{"$ref":"#/components/schemas/ArtifactProgramDrilldownEntityGroup"},"type":"array","title":"Groups"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["kind","title"],"title":"ArtifactProgramDrilldownResponse","description":"Driver data for a clicked Artifact Canvas data bucket."},"ArtifactProgramDrilldownSource":{"properties":{"kind":{"type":"string","const":"artifact_program","title":"Kind"},"artifactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifactid"},"sourceToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetoken"},"programKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Programkey"},"lineage":{"anyOf":[{"$ref":"#/components/schemas/ArtifactProgramDrilldownLineage"},{"type":"null"}]}},"type":"object","required":["kind"],"title":"ArtifactProgramDrilldownSource"},"ArtifactProgramDrilldownTransaction":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"debit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Debit"},"credit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit"},"runningBalance":{"type":"number","title":"Runningbalance"}},"type":"object","required":["date","sourceType","sourceId","source","memo","debit","credit","runningBalance"],"title":"ArtifactProgramDrilldownTransaction"},"ArtifactProgramMissingProjectionPath":{"properties":{"step":{"type":"string","title":"Step"},"path":{"type":"string","title":"Path"},"outputAlias":{"type":"string","title":"Outputalias"}},"type":"object","required":["step","path","outputAlias"],"title":"ArtifactProgramMissingProjectionPath","description":"One value-free missing field observed by lenient viewer projection."},"ArtifactProgramQueryTemporalReceipt":{"properties":{"step":{"type":"string","title":"Step"},"canonicalActionId":{"type":"string","title":"Canonicalactionid"},"capability":{"type":"string","title":"Capability"},"scopeId":{"type":"string","title":"Scopeid"},"actualParameters":{"additionalProperties":true,"type":"object","title":"Actualparameters"},"resolvedScopeIdentity":{"type":"string","title":"Resolvedscopeidentity"},"sourceSnapshotAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcesnapshotat"},"sourceSelection":{"anyOf":[{"$ref":"#/components/schemas/ConnectedEvidenceCompleteness"},{"type":"null"}]},"retrievedAt":{"type":"string","title":"Retrievedat"},"historicalMode":{"type":"string","enum":["economic_as_of","current_only","undated"],"title":"Historicalmode"},"currentFields":{"items":{"type":"string"},"type":"array","title":"Currentfields"}},"type":"object","required":["step","canonicalActionId","capability","scopeId","actualParameters","resolvedScopeIdentity","retrievedAt","historicalMode"],"title":"ArtifactProgramQueryTemporalReceipt"},"ArtifactProgramRunRequest":{"properties":{"runtimeContext":{"additionalProperties":true,"type":"object","title":"Runtimecontext"},"temporalOverrides":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PointScopeSelection"},{"$ref":"#/components/schemas/RangeScopeSelection"},{"$ref":"#/components/schemas/PeriodScopeSelection"},{"$ref":"#/components/schemas/LastClosedPeriodScopeSelection"},{"$ref":"#/components/schemas/PreviousPeriodScopeSelection"},{"$ref":"#/components/schemas/AllDatesScopeSelection"},{"$ref":"#/components/schemas/CurrentStateScopeSelection"},{"$ref":"#/components/schemas/UndatedScopeSelection"}],"discriminator":{"propertyName":"kind","mapping":{"all_dates":"#/components/schemas/AllDatesScopeSelection","current_state":"#/components/schemas/CurrentStateScopeSelection","last_closed_period":"#/components/schemas/LastClosedPeriodScopeSelection","period":"#/components/schemas/PeriodScopeSelection","point":"#/components/schemas/PointScopeSelection","previous_period":"#/components/schemas/PreviousPeriodScopeSelection","range":"#/components/schemas/RangeScopeSelection","undated":"#/components/schemas/UndatedScopeSelection"}}},"type":"object","title":"Temporaloverrides"},"acceptedTemporalVersions":{"items":{"type":"integer"},"type":"array","title":"Acceptedtemporalversions"},"originScopeIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originscopeidentity"},"selection":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Selection"},"limit":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Limit"},"compactRows":{"type":"boolean","title":"Compactrows","default":false},"compactExecutionBindings":{"type":"boolean","title":"Compactexecutionbindings","default":false}},"additionalProperties":false,"type":"object","title":"ArtifactProgramRunRequest"},"ArtifactProgramRunResponse":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"sourceToken":{"type":"string","title":"Sourcetoken"},"programKey":{"type":"string","title":"Programkey"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"total":{"type":"integer","title":"Total"},"truncated":{"type":"boolean","title":"Truncated","default":false},"missingProjectionPaths":{"items":{"$ref":"#/components/schemas/ArtifactProgramMissingProjectionPath"},"type":"array","title":"Missingprojectionpaths"},"admissionReceipt":{"anyOf":[{"$ref":"#/components/schemas/ArtifactProgramAdmissionReceipt"},{"type":"null"}]},"temporalReceipt":{"anyOf":[{"$ref":"#/components/schemas/ArtifactProgramTemporalReceipt"},{"type":"null"}]},"execution":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionResult"},{"type":"null"}]},"drilldownSource":{"anyOf":[{"$ref":"#/components/schemas/ArtifactProgramDrilldownSource"},{"type":"null"}]}},"type":"object","required":["artifactId","sourceToken","programKey","rows","total"],"title":"ArtifactProgramRunResponse"},"ArtifactProgramTemporalReceipt":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"resolvedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T.*(?:Z|[+-]\\d{2}:\\d{2})$","format":"date-time","title":"Resolvedat"},"timezone":{"type":"string","title":"Timezone"},"scopes":{"additionalProperties":{"$ref":"#/components/schemas/ResolvedTemporalScope"},"type":"object","title":"Scopes"},"contextScope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextscope"},"scopeIdentity":{"type":"string","title":"Scopeidentity"},"queries":{"items":{"$ref":"#/components/schemas/ArtifactProgramQueryTemporalReceipt"},"type":"array","title":"Queries"}},"additionalProperties":false,"type":"object","required":["resolvedAt","timezone","scopes","contextScope","scopeIdentity"],"title":"ArtifactProgramTemporalReceipt"},"ArtifactRootFrame":{"properties":{"density":{"type":"string","enum":["compact","standard"],"title":"Density"},"toolbar":{"anyOf":[{"$ref":"#/components/schemas/ArtifactToolbar"},{"type":"null"}]},"asOf":{"anyOf":[{"$ref":"#/components/schemas/ArtifactAsOf"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["density"],"title":"ArtifactRootFrame"},"ArtifactRowFilter-Input":{"properties":{"field":{"type":"string","maxLength":200,"minLength":1,"title":"Field"},"operator":{"type":"string","enum":["equals","notEquals","contains","gte","lte"],"title":"Operator","description":"Comparison to apply between the row field and evaluated filter value.","default":"equals"},"equals":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Equals","description":"Compatibility literal value for a single rowFilter predicate."},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Value","description":"Expression evaluated for the comparison value. Use control expressions to bind toolbar or inline controls to table/chart row filtering and aggregate rowFilters."},"ignoreValues":{"items":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"array","maxItems":20,"title":"Ignorevalues","description":"Values meaning unfiltered, e.g. an 'all' option; the active-filter summary clears the control to the first."}},"additionalProperties":false,"type":"object","required":["field"],"title":"ArtifactRowFilter"},"ArtifactRowFilter-Output":{"properties":{"field":{"type":"string","maxLength":200,"minLength":1,"title":"Field"},"operator":{"type":"string","enum":["equals","notEquals","contains","gte","lte"],"title":"Operator","description":"Comparison to apply between the row field and evaluated filter value.","default":"equals"},"equals":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Equals","description":"Compatibility literal value for a single rowFilter predicate."},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Value","description":"Expression evaluated for the comparison value. Use control expressions to bind toolbar or inline controls to table/chart row filtering and aggregate rowFilters."},"ignoreValues":{"items":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"array","maxItems":20,"title":"Ignorevalues","description":"Values meaning unfiltered, e.g. an 'all' option; the active-filter summary clears the control to the first."}},"additionalProperties":false,"type":"object","required":["field"],"title":"ArtifactRowFilter"},"ArtifactRowProgram":{"properties":{"program_version":{"type":"integer","const":2,"description":"Current artifact row-program contract version.","default":2},"steps":{"items":{"$ref":"#/components/schemas/ProgramStep"},"type":"array","maxItems":32,"minItems":1,"title":"Steps","description":"Ordered ontology-query and analyze steps. Params reference earlier outputs or declared runtime-context fields with structured row_ref objects."},"result":{"properties":{"row_ref":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$","title":"Row Ref","description":"Name of an earlier step or the declared runtime context."},"path":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*(?:\\.[a-zA-Z_][a-zA-Z0-9_]*)*$"},{"type":"null"}],"title":"Path","description":"Optional dotted field path within the referenced value."}},"additionalProperties":false,"type":"object","required":["row_ref"],"title":"RowProgramReference","description":"Structured reference to the step that supplies the artifact rows."}},"additionalProperties":false,"type":"object","required":["steps","result"],"title":"ArtifactRowProgram","description":"Saved artifact row program with one additional ephemeral selection input.","x-rowProgramReference":{"additionalProperties":false,"description":"A structured reference to one prior row-program output.","properties":{"row_ref":{"description":"Name of an earlier step or the declared runtime context.","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$","title":"Row Ref","type":"string"},"path":{"anyOf":[{"pattern":"^[a-zA-Z_][a-zA-Z0-9_]*(?:\\.[a-zA-Z_][a-zA-Z0-9_]*)*$","type":"string"},{"type":"null"}],"description":"Optional dotted field path within the referenced value.","title":"Path"}},"required":["row_ref"],"title":"RowProgramReference","type":"object"},"x-runtimeContext":{"additionalProperties":false,"properties":{"date":{"description":"Current runtime date.","format":"date","type":"string"},"year":{"description":"Year derived from the runtime date.","type":"integer"},"month":{"description":"Month derived from the runtime date.","maximum":12,"minimum":1,"type":"integer"},"selection":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}],"description":"Current artifact selection value."}},"required":["date","year","month","selection"],"type":"object"},"x-runtimeContextRefFields":["date","year","month","selection"]},"ArtifactRowSelection-Input":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"rowKey":{"type":"string","maxLength":200,"minLength":1,"title":"Rowkey"},"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"initial":{"type":"string","const":"first","title":"Initial","default":"first"}},"additionalProperties":false,"type":"object","required":["id","rowKey","label"],"title":"ArtifactRowSelection"},"ArtifactRowSelection-Output":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"rowKey":{"type":"string","maxLength":200,"minLength":1,"title":"Rowkey"},"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"initial":{"type":"string","const":"first","title":"Initial","default":"first"}},"additionalProperties":false,"type":"object","required":["id","rowKey","label"],"title":"ArtifactRowSelection"},"ArtifactSelectionFilter":{"properties":{"selectionId":{"type":"string","maxLength":80,"minLength":1,"title":"Selectionid"},"field":{"type":"string","maxLength":200,"minLength":1,"title":"Field"}},"additionalProperties":false,"type":"object","required":["selectionId","field"],"title":"ArtifactSelectionFilter"},"ArtifactSpec-Input":{"properties":{"kind":{"type":"string","enum":["dashboard","planner","model"],"title":"Kind"},"dataMode":{"type":"string","enum":["live","standalone"],"title":"Datamode","description":"live uses ontologyDataSources. standalone is only for manual/no-data artifacts and must not declare dataRefs. Finance, reporting, and planning artifacts default live when Porter records support any part; editable working values belong to persisted ontology-backed state or artifact controls.","default":"live"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title","description":"Compatibility-only legacy shell title. New artifact shell title is owned by generated_artifact_versions.title and is not read from the spec."},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Compatibility-only legacy shell description. New artifact shell description is owned by generated_artifact_versions.summary."},"summary":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Summary","description":"Compatibility-only legacy shell summary. New artifact shell summary is owned by generated_artifact_versions.summary."},"enhancementPrompts":{"items":{"type":"string","maxLength":240,"minLength":1},"type":"array","maxItems":4,"minItems":4,"title":"Enhancementprompts","description":"Exactly four artifact-specific next-step prompts shown in the artifact AI side panel after this artifact is saved. Each prompt must be a complete user request that would enhance the current artifact by either adding new display elements or updating existing elements. Do not use generic product tips, implementation notes, or prompts that ask to create a separate artifact."},"frame":{"$ref":"#/components/schemas/ArtifactRootFrame"},"dataRefs":{"items":{"$ref":"#/components/schemas/ArtifactDataRef"},"type":"array","maxItems":20,"title":"Datarefs"},"controls":{"items":{"oneOf":[{"$ref":"#/components/schemas/TextControlSpec"},{"$ref":"#/components/schemas/NumberControlSpec"},{"$ref":"#/components/schemas/MoneyControlSpec"},{"$ref":"#/components/schemas/PercentControlSpec"},{"$ref":"#/components/schemas/DateControlSpec"},{"$ref":"#/components/schemas/SelectControlSpec"},{"$ref":"#/components/schemas/SegmentedControlSpec"},{"$ref":"#/components/schemas/ToggleControlSpec"},{"$ref":"#/components/schemas/CheckboxControlSpec"},{"$ref":"#/components/schemas/SliderControlSpec"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CheckboxControlSpec","date":"#/components/schemas/DateControlSpec","money":"#/components/schemas/MoneyControlSpec","number":"#/components/schemas/NumberControlSpec","percent":"#/components/schemas/PercentControlSpec","segmented":"#/components/schemas/SegmentedControlSpec","select":"#/components/schemas/SelectControlSpec","slider":"#/components/schemas/SliderControlSpec","text":"#/components/schemas/TextControlSpec","toggle":"#/components/schemas/ToggleControlSpec"}}},"type":"array","maxItems":30,"title":"Controls","description":"working values; control expressions; read-only Porter source figures; dependent artifact output changes."},"layout":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Input"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Input"}],"title":"Layout","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Input","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Input","section":"#/components/schemas/ArtifactLayoutSectionNode-Input","split":"#/components/schemas/ArtifactLayoutSplitNode-Input","stack":"#/components/schemas/ArtifactLayoutStackNode-Input","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Input"}}},"blocks":{"items":{"oneOf":[{"$ref":"#/components/schemas/MetricBlock-Input"},{"$ref":"#/components/schemas/TableBlock-Input"},{"$ref":"#/components/schemas/ChartBlock-Input"},{"$ref":"#/components/schemas/ListBlock-Input"},{"$ref":"#/components/schemas/NarrativeBlock"},{"$ref":"#/components/schemas/EmptyStateBlock"},{"$ref":"#/components/schemas/PixelMapBlock-Input"},{"$ref":"#/components/schemas/ExplorationCanvasBlock-Input"},{"$ref":"#/components/schemas/ArtifactDetailPanelBlock-Input"}],"discriminator":{"propertyName":"type","mapping":{"chart":"#/components/schemas/ChartBlock-Input","detailPanel":"#/components/schemas/ArtifactDetailPanelBlock-Input","emptyState":"#/components/schemas/EmptyStateBlock","explorationCanvas":"#/components/schemas/ExplorationCanvasBlock-Input","list":"#/components/schemas/ListBlock-Input","metric":"#/components/schemas/MetricBlock-Input","narrative":"#/components/schemas/NarrativeBlock","pixelMap":"#/components/schemas/PixelMapBlock-Input","table":"#/components/schemas/TableBlock-Input"}}},"type":"array","maxItems":80,"minItems":1,"title":"Blocks"}},"additionalProperties":false,"type":"object","required":["kind","enhancementPrompts","frame","layout","blocks"],"title":"ArtifactSpec"},"ArtifactSpec-Output":{"properties":{"kind":{"type":"string","enum":["dashboard","planner","model"],"title":"Kind"},"dataMode":{"type":"string","enum":["live","standalone"],"title":"Datamode","description":"live uses ontologyDataSources. standalone is only for manual/no-data artifacts and must not declare dataRefs. Finance, reporting, and planning artifacts default live when Porter records support any part; editable working values belong to persisted ontology-backed state or artifact controls.","default":"live"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title","description":"Compatibility-only legacy shell title. New artifact shell title is owned by generated_artifact_versions.title and is not read from the spec."},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Compatibility-only legacy shell description. New artifact shell description is owned by generated_artifact_versions.summary."},"summary":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Summary","description":"Compatibility-only legacy shell summary. New artifact shell summary is owned by generated_artifact_versions.summary."},"enhancementPrompts":{"items":{"type":"string","maxLength":240,"minLength":1},"type":"array","maxItems":4,"minItems":4,"title":"Enhancementprompts","description":"Exactly four artifact-specific next-step prompts shown in the artifact AI side panel after this artifact is saved. Each prompt must be a complete user request that would enhance the current artifact by either adding new display elements or updating existing elements. Do not use generic product tips, implementation notes, or prompts that ask to create a separate artifact."},"frame":{"$ref":"#/components/schemas/ArtifactRootFrame"},"dataRefs":{"items":{"$ref":"#/components/schemas/ArtifactDataRef"},"type":"array","maxItems":20,"title":"Datarefs"},"controls":{"items":{"oneOf":[{"$ref":"#/components/schemas/TextControlSpec"},{"$ref":"#/components/schemas/NumberControlSpec"},{"$ref":"#/components/schemas/MoneyControlSpec"},{"$ref":"#/components/schemas/PercentControlSpec"},{"$ref":"#/components/schemas/DateControlSpec"},{"$ref":"#/components/schemas/SelectControlSpec"},{"$ref":"#/components/schemas/SegmentedControlSpec"},{"$ref":"#/components/schemas/ToggleControlSpec"},{"$ref":"#/components/schemas/CheckboxControlSpec"},{"$ref":"#/components/schemas/SliderControlSpec"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CheckboxControlSpec","date":"#/components/schemas/DateControlSpec","money":"#/components/schemas/MoneyControlSpec","number":"#/components/schemas/NumberControlSpec","percent":"#/components/schemas/PercentControlSpec","segmented":"#/components/schemas/SegmentedControlSpec","select":"#/components/schemas/SelectControlSpec","slider":"#/components/schemas/SliderControlSpec","text":"#/components/schemas/TextControlSpec","toggle":"#/components/schemas/ToggleControlSpec"}}},"type":"array","maxItems":30,"title":"Controls","description":"working values; control expressions; read-only Porter source figures; dependent artifact output changes."},"layout":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"title":"Layout","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}},"blocks":{"items":{"oneOf":[{"$ref":"#/components/schemas/MetricBlock-Output"},{"$ref":"#/components/schemas/TableBlock-Output"},{"$ref":"#/components/schemas/ChartBlock-Output"},{"$ref":"#/components/schemas/ListBlock-Output"},{"$ref":"#/components/schemas/NarrativeBlock"},{"$ref":"#/components/schemas/EmptyStateBlock"},{"$ref":"#/components/schemas/PixelMapBlock-Output"},{"$ref":"#/components/schemas/ExplorationCanvasBlock-Output"},{"$ref":"#/components/schemas/ArtifactDetailPanelBlock-Output"}],"discriminator":{"propertyName":"type","mapping":{"chart":"#/components/schemas/ChartBlock-Output","detailPanel":"#/components/schemas/ArtifactDetailPanelBlock-Output","emptyState":"#/components/schemas/EmptyStateBlock","explorationCanvas":"#/components/schemas/ExplorationCanvasBlock-Output","list":"#/components/schemas/ListBlock-Output","metric":"#/components/schemas/MetricBlock-Output","narrative":"#/components/schemas/NarrativeBlock","pixelMap":"#/components/schemas/PixelMapBlock-Output","table":"#/components/schemas/TableBlock-Output"}}},"type":"array","maxItems":80,"minItems":1,"title":"Blocks"}},"additionalProperties":false,"type":"object","required":["kind","enhancementPrompts","frame","layout","blocks"],"title":"ArtifactSpec"},"ArtifactToolbar":{"properties":{"refresh":{"anyOf":[{"type":"boolean","const":true},{"type":"null"}],"title":"Refresh"},"controls":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Controls"}},"additionalProperties":false,"type":"object","title":"ArtifactToolbar"},"AssetClassCreate":{"properties":{"class_name":{"type":"string","title":"Class Name"},"capitalization_threshold":{"type":"number","title":"Capitalization Threshold","default":2000},"useful_life_months":{"type":"integer","title":"Useful Life Months","default":60},"asset_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Id"},"asset_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Name"},"accumulated_depreciation_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Depreciation Account Id"},"accumulated_depreciation_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Depreciation Account Name"},"expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Id"},"expense_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Name"},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["class_name"],"title":"AssetClassCreate","description":"Create a new asset class."},"AssetClassResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"className":{"type":"string","title":"Classname"},"capitalizationThreshold":{"type":"number","title":"Capitalizationthreshold","default":2000},"usefulLifeMonths":{"type":"integer","title":"Usefullifemonths","default":60},"assetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assetaccountid"},"assetAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assetaccountname"},"accumulatedDepreciationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulateddepreciationaccountid"},"accumulatedDepreciationAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulateddepreciationaccountname"},"expenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expenseaccountid"},"expenseAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expenseaccountname"},"displayOrder":{"type":"integer","title":"Displayorder","default":0}},"type":"object","required":["id","companyId","className"],"title":"AssetClassResponse","description":"Fixed asset class configuration."},"AssetClassUpdate":{"properties":{"class_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class Name"},"capitalization_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Capitalization Threshold"},"useful_life_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Useful Life Months"},"asset_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Id"},"asset_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Name"},"accumulated_depreciation_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Depreciation Account Id"},"accumulated_depreciation_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Depreciation Account Name"},"expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Id"},"expense_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Name"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","title":"AssetClassUpdate","description":"Partial update for an asset class."},"Assignment":{"properties":{"accountId":{"type":"string","title":"Accountid"},"number":{"type":"string","title":"Number"}},"type":"object","required":["accountId","number"],"title":"Assignment","description":"A single account-number assignment."},"AssistantPreferenceUpdateRequest":{"properties":{"actionConfirmationMode":{"type":"string","enum":["ask","act"],"title":"Actionconfirmationmode"}},"type":"object","required":["actionConfirmationMode"],"title":"AssistantPreferenceUpdateRequest","description":"Request to update assistant behavior preferences."},"AssumptionGroupsResponse":{"properties":{"state":{"type":"string","title":"State"},"scenarioId":{"type":"string","title":"Scenarioid"},"runId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runid"},"groups":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Groups"},"legacyFallback":{"type":"boolean","title":"Legacyfallback"}},"type":"object","required":["state","scenarioId","groups","legacyFallback"],"title":"AssumptionGroupsResponse"},"AssumptionUpdateRequest":{"properties":{"key":{"type":"string","title":"Key"},"value":{"title":"Value"},"reason":{"type":"string","title":"Reason"},"authority":{"$ref":"#/components/schemas/MutationAuthorityRequest"}},"type":"object","required":["key","value","reason","authority"],"title":"AssumptionUpdateRequest"},"AuditAnswers":{"properties":{"business_type":{"anyOf":[{"type":"string","enum":["Construction","HVAC (heating and air)","Plumbing or electrical","Restoration or cleaning","Other home services","Interior design","Professional services","Ecommerce","Retail","Restaurant or food service","Healthcare","Real estate","Other","Something else"]},{"type":"null"}],"title":"Business Type"},"connection_choice":{"anyOf":[{"type":"string","enum":["quickbooks","documents","questions","skip"]},{"type":"null"}],"title":"Connection Choice"},"audit_goals":{"items":{"type":"string","enum":["See where my money is going","Understand why costs are rising","Know how much cash to keep","See what I can afford to invest","Get ready to apply for financing","Get customers to pay faster","Feel more confident in my numbers","See what’s wrong or missing in my books","Find cost-saving opportunities","See which jobs or customers actually make me money","Know if I can afford my next big move (expansion, vehicle purchase, new hire, etc)","Understand my cash flow needs","Get paid faster by customers who owe me","Something else"]},"type":"array","maxItems":8,"title":"Audit Goals"},"audit_goals_other":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Audit Goals Other"},"revenue_pattern":{"anyOf":[{"type":"string","enum":["Pretty steady","Seasonal, but predictable","A few big projects or orders","Mostly from a few big customers","It changes a lot","I’m not sure"]},{"type":"null"}],"title":"Revenue Pattern"},"biggest_cash_plan":{"anyOf":[{"type":"string","enum":["Hiring","Equipment or vehicles","Inventory","Inventory or materials","Opening or expanding a location","Paying taxes or debt","Paying down debt or taxes","Taking money out of the business","Nothing major planned","Nothing big planned","I’m not sure yet","Not sure yet"]},{"type":"null"}],"title":"Biggest Cash Plan"},"cash_plan_details":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Cash Plan Details"},"business_type_other":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Business Type Other"},"books_confidence":{"anyOf":[{"type":"string","enum":["Very confident — last month is complete","Mostly confident — a few things may be off","Not very confident — we need some cleanup","Very confident: last month is complete","Mostly confident: a few things may be off","Not very confident: we need some cleanup","We’re a few months behind","I’m not sure"]},{"type":"null"}],"title":"Books Confidence"},"runway_guess":{"anyOf":[{"type":"string","enum":["Under 1 month","1 to 3 months","3 to 6 months","6 months or more","Unsure"]},{"type":"null"}],"title":"Runway Guess"},"invoices_guess":{"anyOf":[{"type":"string","enum":["Nothing — customers pay upfront","Nothing: customers pay upfront","Under $5k","$5k to $25k","$25k to $100k","Over $100k","Unsure"]},{"type":"null"}],"title":"Invoices Guess"},"priorities":{"items":{"type":"string","enum":["Understand revenue and cost drivers","Close the books faster","Improve invoicing and collections","Streamline accounts payable","Track where cash is going","Clean up the books","Prepare for growth or a sale","Other"]},"type":"array","maxItems":8,"title":"Priorities"},"priorities_other":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Priorities Other"},"bookkeeping":{"anyOf":[{"type":"string","enum":["I do","In-house staff","Outside bookkeeper","No one currently"]},{"type":"null"}],"title":"Bookkeeping"},"bookkeeping_owner":{"anyOf":[{"type":"string","enum":["I do them myself","Someone on my team","An outside bookkeeper or firm","My accountant, mostly at tax time","No one right now"]},{"type":"null"}],"title":"Bookkeeping Owner"},"monthly_bookkeeping_cost":{"anyOf":[{"type":"string","enum":["Nothing","Under $300","$300 to $1,000","$1,000 to $2,500","Over $2,500","Not sure"]},{"type":"null"}],"title":"Monthly Bookkeeping Cost"},"close_time_self":{"anyOf":[{"type":"string","enum":["A day or less","A few days","About a week","More than a week","It never really gets closed"]},{"type":"null"}],"title":"Close Time Self"},"close_time_staff":{"anyOf":[{"type":"string","enum":["A day or less","A few days","About a week","More than a week","It never really gets closed"]},{"type":"null"}],"title":"Close Time Staff"},"financials_delivery":{"anyOf":[{"type":"string","enum":["Within a week","One to two weeks","Two to four weeks","More than a month","Not sure"]},{"type":"null"}],"title":"Financials Delivery"},"website_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Website Url"},"business_description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Business Description"},"cash_on_hand":{"anyOf":[{"type":"string","enum":["Under $10k","$10k to $50k","$50k to $250k","$250k to $1m","Over $1m"]},{"type":"null"}],"title":"Cash On Hand"},"monthly_out":{"anyOf":[{"type":"string","enum":["Under $10k","$10k to $50k","$50k to $250k","Over $250k"]},{"type":"null"}],"title":"Monthly Out"},"costs_moved":{"anyOf":[{"type":"string","enum":["Increased significantly","Increased slightly","Stayed flat","Decreased","Went up a lot","Went up a little","Stayed about the same","Went down"]},{"type":"null"}],"title":"Costs Moved"},"prices_moved":{"anyOf":[{"type":"string","enum":["Increased significantly","Increased slightly","Stayed flat","Decreased","Went up a lot","Went up a little","Stayed about the same","Went down"]},{"type":"null"}],"title":"Prices Moved"},"payment_time":{"anyOf":[{"type":"string","enum":["Paid upfront","Within 30 days","30 to 60 days","Some invoices over 60 days","Unsure"]},{"type":"null"}],"title":"Payment Time"},"close_time":{"anyOf":[{"type":"string","enum":["One day or less","Several days","More than a week","We do not close monthly"]},{"type":"null"}],"title":"Close Time"}},"additionalProperties":false,"type":"object","title":"AuditAnswers","description":"Closed questionnaire envelope; unknown fields never reach Porter AI."},"AuditClaimStatus":{"type":"string","enum":["unclaimed","claimed","abandoned"],"title":"AuditClaimStatus"},"AuditCompanyClaim":{"properties":{"companyId":{"type":"string","format":"uuid","title":"Companyid"},"claimed":{"type":"boolean","const":true,"title":"Claimed","default":true}},"type":"object","required":["companyId"],"title":"AuditCompanyClaim","description":"Authenticated handoff into the existing company-backed workspace."},"AuditCreateRequest":{"properties":{"step_id":{"type":"string","maxLength":64,"minLength":1,"title":"Step Id"},"path":{"anyOf":[{"$ref":"#/components/schemas/AuditPath"},{"type":"null"}]},"answers":{"$ref":"#/components/schemas/AuditAnswers"},"captured_email":{"type":"string","maxLength":320,"minLength":3,"title":"Captured Email"},"utm_source":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Utm Campaign"},"meta_fbc":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Meta Fbc"},"meta_fbp":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Meta Fbp"},"captured_first_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Captured First Name"}},"additionalProperties":false,"type":"object","required":["step_id","captured_email"],"title":"AuditCreateRequest"},"AuditCreatedSession":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"stepId":{"type":"string","title":"Stepid"},"path":{"anyOf":[{"$ref":"#/components/schemas/AuditPath"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/AuditStatus"},"answers":{"$ref":"#/components/schemas/AuditAnswers"},"report":{"anyOf":[{"$ref":"#/components/schemas/AuditReport"},{"type":"null"}]},"generationActivity":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Generationactivity"},"connectionStatus":{"$ref":"#/components/schemas/QuickBooksConnectionStatus","default":"not_started"},"qboCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocompanyname"},"qboConnectedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Qboconnectedat"},"capturedEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedemail"},"capturedFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedfirstname"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"},"utmSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmsource"},"utmMedium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmmedium"},"utmCampaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmcampaign"},"metaFbc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metafbc"},"metaFbp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metafbp"},"accessToken":{"type":"string","minLength":32,"title":"Accesstoken"}},"type":"object","required":["id","stepId","path","status","answers","createdAt","updatedAt","completedAt","accessToken"],"title":"AuditCreatedSession"},"AuditDocument":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"contentType":{"type":"string","maxLength":255,"minLength":1,"title":"Contenttype"},"sizeBytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sizebytes"},"status":{"$ref":"#/components/schemas/AuditDocumentStatus"},"errorMessage":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Errormessage"},"extractionSummary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extractionsummary"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","filename","contentType","status","createdAt"],"title":"AuditDocument","description":"Safe public projection of one anonymous-audit upload."},"AuditDocumentPreflight":{"properties":{"eligible":{"type":"boolean","title":"Eligible"},"message":{"type":"string","maxLength":500,"minLength":1,"title":"Message"}},"type":"object","required":["eligible","message"],"title":"AuditDocumentPreflight","description":"Whether the current upload packet can satisfy the fixed report shape."},"AuditDocumentStatus":{"type":"string","enum":["uploading","processing","ready","failed"],"title":"AuditDocumentStatus"},"AuditEmailChallengeSent":{"properties":{"challengeId":{"type":"string","title":"Challengeid"}},"type":"object","required":["challengeId"],"title":"AuditEmailChallengeSent"},"AuditEmailChallengeTarget":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"AuditEmailChallengeTarget"},"AuditFinding":{"properties":{"metric":{"type":"string","maxLength":40,"minLength":1,"title":"Metric"},"label":{"type":"string","maxLength":32,"minLength":1,"title":"Label"},"narrative":{"type":"string","maxLength":300,"minLength":1,"title":"Narrative"},"sentiment":{"type":"string","enum":["positive","neutral","caution","concerning"],"title":"Sentiment","default":"neutral"},"category":{"anyOf":[{"type":"string","enum":["financial_picture","books_health","potential_flags"]},{"type":"null"}],"title":"Category"}},"additionalProperties":false,"type":"object","required":["metric","label","narrative"],"title":"AuditFinding","description":"Compact public-audit projection of Porter's onboarding finding contract."},"AuditFunnelLead":{"properties":{"auditId":{"type":"string","title":"Auditid"},"email":{"type":"string","title":"Email"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"emailCapturedAt":{"type":"string","format":"date-time","title":"Emailcapturedat"},"utmSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmsource"},"utmMedium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmmedium"},"utmCampaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmcampaign"},"stepId":{"type":"string","title":"Stepid"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"connectionStatus":{"type":"string","title":"Connectionstatus"},"status":{"type":"string","title":"Status"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"},"claimStatus":{"type":"string","title":"Claimstatus"},"claimedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Claimedat"},"companyId":{"type":"string","title":"Companyid"},"paid":{"type":"boolean","title":"Paid"}},"type":"object","required":["auditId","email","createdAt","emailCapturedAt","stepId","connectionStatus","status","claimStatus","companyId","paid"],"title":"AuditFunnelLead"},"AuditFunnelPreEmail":{"properties":{"status":{"type":"string","enum":["ok","not_configured","error"],"title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"events":{"items":{"$ref":"#/components/schemas/AuditFunnelPreEmailEvent"},"type":"array","title":"Events"}},"type":"object","required":["status"],"title":"AuditFunnelPreEmail"},"AuditFunnelPreEmailEvent":{"properties":{"event":{"type":"string","title":"Event"},"count":{"type":"integer","title":"Count"},"uniquePersons":{"type":"integer","title":"Uniquepersons"}},"type":"object","required":["event","count","uniquePersons"],"title":"AuditFunnelPreEmailEvent"},"AuditFunnelResponse":{"properties":{"days":{"type":"integer","title":"Days"},"includeInternal":{"type":"boolean","title":"Includeinternal"},"windowStart":{"type":"string","format":"date-time","title":"Windowstart"},"funnel":{"$ref":"#/components/schemas/AuditFunnelStepCounts"},"leads":{"items":{"$ref":"#/components/schemas/AuditFunnelLead"},"type":"array","title":"Leads"},"preEmail":{"$ref":"#/components/schemas/AuditFunnelPreEmail"}},"type":"object","required":["days","includeInternal","windowStart","funnel","leads","preEmail"],"title":"AuditFunnelResponse"},"AuditFunnelStepCounts":{"properties":{"emailCaptured":{"type":"integer","title":"Emailcaptured"},"pathChosen":{"type":"integer","title":"Pathchosen"},"pathConnected":{"type":"integer","title":"Pathconnected"},"pathDocuments":{"type":"integer","title":"Pathdocuments"},"pathUnconnected":{"type":"integer","title":"Pathunconnected"},"quickbooksConnected":{"type":"integer","title":"Quickbooksconnected"},"quickbooksFailed":{"type":"integer","title":"Quickbooksfailed"},"reportRequested":{"type":"integer","title":"Reportrequested"},"completed":{"type":"integer","title":"Completed"},"generationFailed":{"type":"integer","title":"Generationfailed"},"claimed":{"type":"integer","title":"Claimed"},"paid":{"type":"integer","title":"Paid"}},"type":"object","required":["emailCaptured","pathChosen","pathConnected","pathDocuments","pathUnconnected","quickbooksConnected","quickbooksFailed","reportRequested","completed","generationFailed","claimed","paid"],"title":"AuditFunnelStepCounts"},"AuditLeadCaptureSession":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"stepId":{"type":"string","title":"Stepid"},"path":{"anyOf":[{"$ref":"#/components/schemas/AuditPath"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/AuditStatus"},"answers":{"$ref":"#/components/schemas/AuditAnswers"},"report":{"anyOf":[{"$ref":"#/components/schemas/AuditReport"},{"type":"null"}]},"generationActivity":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Generationactivity"},"connectionStatus":{"$ref":"#/components/schemas/QuickBooksConnectionStatus","default":"not_started"},"qboCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocompanyname"},"qboConnectedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Qboconnectedat"},"capturedEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedemail"},"capturedFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedfirstname"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"},"utmSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmsource"},"utmMedium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmmedium"},"utmCampaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmcampaign"},"metaFbc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metafbc"},"metaFbp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metafbp"},"recoveryAvailable":{"type":"boolean","title":"Recoveryavailable"}},"type":"object","required":["id","stepId","path","status","answers","createdAt","updatedAt","completedAt","recoveryAvailable"],"title":"AuditLeadCaptureSession","description":"Lead-capture result that selects the next public-audit screen."},"AuditNarratedAction":{"properties":{"title":{"type":"string","maxLength":100,"minLength":1,"title":"Title","description":"A short action-oriented title."},"body":{"type":"string","maxLength":260,"minLength":1,"title":"Body","description":"Briefly explain the concrete action and its intended outcome."}},"additionalProperties":false,"type":"object","required":["title","body"],"title":"AuditNarratedAction"},"AuditNarratedActions":{"properties":{"thisWeek":{"items":{"$ref":"#/components/schemas/AuditNarratedAction"},"type":"array","maxItems":2,"minItems":1,"title":"Thisweek"},"thisQuarter":{"items":{"$ref":"#/components/schemas/AuditNarratedAction"},"type":"array","maxItems":2,"minItems":1,"title":"Thisquarter"}},"additionalProperties":false,"type":"object","required":["thisWeek","thisQuarter"],"title":"AuditNarratedActions"},"AuditNarratedFinding":{"properties":{"checkId":{"type":"string","maxLength":64,"minLength":1,"title":"Checkid"},"stat":{"type":"string","maxLength":64,"minLength":1,"title":"Stat","description":"The single headline figure for this finding, written for a stat card next to the title. Give the number with its unit and only the qualifier needed to keep it unambiguous, for example '$35k of $60k AR overdue' or '60% gross margin' or 'No bank statements provided'. This is not a sentence and not an explanation; the title and body carry the meaning."},"verdict":{"type":"string","enum":["looks_good","needs_attention","fact"],"title":"Verdict"},"title":{"type":"string","maxLength":80,"minLength":1,"title":"Title","description":"A short, plain-language finding title consistent with the stat and body. Preserve essential scope and time qualifiers; brevity must not broaden the claim."},"body":{"type":"string","maxLength":550,"minLength":1,"title":"Body","description":"A concise, plain-language paragraph explaining the evidence, business implication and material limitations. Distinguish observed balances from forecasts; do not infer future cash sufficiency without supporting timing evidence. Keep units, periods, denominators and qualifiers consistent with the stat and title. Do not pad sparse evidence."},"fixNote":{"type":"string","maxLength":220,"minLength":1,"title":"Fixnote","description":"A brief practical next step tied to this finding."},"tiedTo":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tiedto"},"locked":{"type":"boolean","title":"Locked"}},"additionalProperties":false,"type":"object","required":["checkId","stat","verdict","title","body","fixNote","locked"],"title":"AuditNarratedFinding","description":"Evidence-based finding shared by generated and persisted V2 reports."},"AuditPath":{"type":"string","enum":["connected","documents","unconnected"],"title":"AuditPath"},"AuditRecoveredReport":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"path":{"anyOf":[{"$ref":"#/components/schemas/AuditPath"},{"type":"null"}]},"report":{"anyOf":[{"$ref":"#/components/schemas/AuditReport"},{"type":"null"}]},"capturedEmail":{"type":"string","title":"Capturedemail"},"capturedFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedfirstname"},"session":{"anyOf":[{"$ref":"#/components/schemas/AuditCreatedSession"},{"type":"null"}]}},"type":"object","required":["id","path","report","capturedEmail"],"title":"AuditRecoveredReport","description":"Small report projection returned by a one-time recovery code."},"AuditRecoveryRequestState":{"properties":{"state":{"type":"string","minLength":32,"title":"State"}},"type":"object","required":["state"],"title":"AuditRecoveryRequestState","description":"Opaque credential for a separately requested report-recovery flow."},"AuditReport":{"properties":{"version":{"type":"integer","enum":[1,2],"title":"Version","default":1},"eyebrow":{"type":"string","const":"Audit complete","title":"Eyebrow","default":"Audit complete"},"title":{"type":"string","const":"Three things worth your attention.","title":"Title","default":"Three things worth your attention."},"lede":{"type":"string","title":"Lede","default":""},"analysisSummary":{"type":"string","title":"Analysissummary","default":""},"findings":{"items":{"anyOf":[{"$ref":"#/components/schemas/AuditFinding"},{"$ref":"#/components/schemas/StoredAuditFinding"},{"$ref":"#/components/schemas/AuditNarratedFinding"}]},"type":"array","title":"Findings"},"additionalFindings":{"items":{"anyOf":[{"$ref":"#/components/schemas/AuditFinding"},{"$ref":"#/components/schemas/StoredAuditFinding"},{"$ref":"#/components/schemas/AuditNarratedFinding"}]},"type":"array","title":"Additionalfindings"},"deepFindings":{"items":{"$ref":"#/components/schemas/AuditFinding"},"type":"array","title":"Deepfindings"},"confidenceTitle":{"type":"string","title":"Confidencetitle","default":""},"confidenceBody":{"type":"string","title":"Confidencebody","default":""},"actions":{"items":{"$ref":"#/components/schemas/StoredAuditAction"},"type":"array","title":"Actions"},"evidencePeriod":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"title":"Evidenceperiod"},"scopeNote":{"type":"string","maxLength":220,"title":"Scopenote","default":""},"headline":{"type":"string","title":"Headline","default":""},"reviewPeriod":{"type":"string","title":"Reviewperiod","default":""},"summary":{"type":"string","title":"Summary","default":""},"actionPlan":{"anyOf":[{"$ref":"#/components/schemas/AuditNarratedActions"},{"type":"null"}]},"keyMetrics":{"items":{"$ref":"#/components/schemas/AuditReportMetric"},"type":"array","maxItems":4,"title":"Keymetrics"},"featuredComparison":{"anyOf":[{"$ref":"#/components/schemas/AuditReportComparison"},{"type":"null"}]},"evidenceBlocks":{"items":{"$ref":"#/components/schemas/AuditReportEvidenceBlock"},"type":"array","title":"Evidenceblocks"},"reliabilityNote":{"type":"string","title":"Reliabilitynote","default":""},"reliabilityAreas":{"items":{"$ref":"#/components/schemas/AuditReportReliabilityArea"},"type":"array","title":"Reliabilityareas"},"asOfDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asofdate"},"reportingBasis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reportingbasis"},"auditPacketVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auditpacketversion"},"isSample":{"type":"boolean","const":false,"title":"Issample","default":false}},"type":"object","title":"AuditReport"},"AuditReportComparison":{"properties":{"eyebrow":{"type":"string","title":"Eyebrow"},"title":{"type":"string","title":"Title"},"leftLabel":{"type":"string","title":"Leftlabel"},"leftValue":{"type":"string","title":"Leftvalue"},"rightLabel":{"type":"string","title":"Rightlabel"},"rightValue":{"type":"string","title":"Rightvalue"},"ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ratio"},"interpretation":{"type":"string","title":"Interpretation"}},"additionalProperties":false,"type":"object","required":["eyebrow","title","leftLabel","leftValue","rightLabel","rightValue","interpretation"],"title":"AuditReportComparison"},"AuditReportEvidenceBlock":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Rows"}},"additionalProperties":false,"type":"object","required":["title","description","columns","rows"],"title":"AuditReportEvidenceBlock"},"AuditReportMetric":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"},"context":{"type":"string","title":"Context"},"tone":{"type":"string","enum":["neutral","positive","caution"],"title":"Tone","default":"neutral"}},"additionalProperties":false,"type":"object","required":["label","value","context"],"title":"AuditReportMetric"},"AuditReportReliabilityArea":{"properties":{"label":{"type":"string","title":"Label"},"status":{"type":"string","enum":["good","watch","gap"],"title":"Status"},"note":{"type":"string","title":"Note"}},"additionalProperties":false,"type":"object","required":["label","status","note"],"title":"AuditReportReliabilityArea"},"AuditSession":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"stepId":{"type":"string","title":"Stepid"},"path":{"anyOf":[{"$ref":"#/components/schemas/AuditPath"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/AuditStatus"},"answers":{"$ref":"#/components/schemas/AuditAnswers"},"report":{"anyOf":[{"$ref":"#/components/schemas/AuditReport"},{"type":"null"}]},"generationActivity":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Generationactivity"},"connectionStatus":{"$ref":"#/components/schemas/QuickBooksConnectionStatus","default":"not_started"},"qboCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocompanyname"},"qboConnectedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Qboconnectedat"},"capturedEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedemail"},"capturedFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedfirstname"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"},"utmSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmsource"},"utmMedium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmmedium"},"utmCampaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utmcampaign"},"metaFbc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metafbc"},"metaFbp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metafbp"}},"type":"object","required":["id","stepId","path","status","answers","createdAt","updatedAt","completedAt"],"title":"AuditSession"},"AuditSnapshot":{"properties":{"step_id":{"type":"string","maxLength":64,"minLength":1,"title":"Step Id"},"path":{"anyOf":[{"$ref":"#/components/schemas/AuditPath"},{"type":"null"}]},"answers":{"$ref":"#/components/schemas/AuditAnswers"},"captured_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Captured Email"},"utm_source":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Utm Campaign"},"meta_fbc":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Meta Fbc"},"meta_fbp":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Meta Fbp"}},"additionalProperties":false,"type":"object","required":["step_id"],"title":"AuditSnapshot"},"AuditStatus":{"type":"string","enum":["in_progress","generating","completed","failed"],"title":"AuditStatus"},"AuthLogoutResponse":{"properties":{"kindeLogoutUrl":{"type":"string","title":"Kindelogouturl"}},"type":"object","required":["kindeLogoutUrl"],"title":"AuthLogoutResponse"},"AuthMeResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"csrfToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Csrftoken"}},"type":"object","required":["id","email"],"title":"AuthMeResponse"},"AuthStartRequest":{"properties":{"intent":{"type":"string","enum":["login","register"],"title":"Intent"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectionid"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"returnTo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Returnto"},"prompt":{"type":"string","enum":["create","none"],"title":"Prompt","default":"create"},"mcpState":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Mcpstate"}},"type":"object","required":["intent"],"title":"AuthStartRequest"},"AuthStartResponse":{"properties":{"authUrl":{"type":"string","title":"Authurl"}},"type":"object","required":["authUrl"],"title":"AuthStartResponse"},"AutomationCreateRequest":{"properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"kind":{"type":"string","enum":["standard","custom"],"title":"Kind","default":"custom"},"visibility":{"type":"string","enum":["private","public"],"title":"Visibility","default":"private"},"enabled":{"type":"boolean","title":"Enabled","default":false},"trigger":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger"},"skill":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Skill"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Policy"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","title":"AutomationCreateRequest","description":"Create a persisted automation definition."},"AutomationDefinitionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"companyId":{"type":"string","format":"uuid","title":"Companyid"},"userId":{"type":"string","title":"Userid"},"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description","default":""},"kind":{"type":"string","enum":["standard","custom"],"title":"Kind","default":"custom"},"scope":{"type":"string","enum":["global","company"],"title":"Scope","default":"company"},"overrideOfAutomationId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"},{"type":"null"}],"title":"Overrideofautomationid"},"visibility":{"type":"string","enum":["private","public"],"title":"Visibility","default":"private"},"enabled":{"type":"boolean","title":"Enabled","default":false},"trigger":{"additionalProperties":true,"type":"object","title":"Trigger"},"skill":{"additionalProperties":true,"type":"object","title":"Skill"},"context":{"additionalProperties":true,"type":"object","title":"Context"},"relatedRecords":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Relatedrecords"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"scheduleInfo":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scheduleinfo"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"updatedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyemail"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archivedat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","companyId","userId","key","label","createdAt","updatedAt"],"title":"AutomationDefinitionResponse","description":"Persisted user automation definition within a company."},"AutomationEnabledRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"AutomationEnabledRequest","description":"Toggle a persisted automation definition."},"AutomationListResponse":{"properties":{"automations":{"items":{"$ref":"#/components/schemas/AutomationDefinitionResponse"},"type":"array","title":"Automations"}},"type":"object","title":"AutomationListResponse","description":"Persisted user automations within a company."},"AutomationRunCreateRequest":{"properties":{"idempotencyKey":{"type":"string","title":"Idempotencykey"},"trigger":{"additionalProperties":true,"type":"object","title":"Trigger"},"skillContext":{"additionalProperties":true,"type":"object","title":"Skillcontext"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"status":{"type":"string","enum":["queued","running","succeeded","failed","skipped","cancelled"],"title":"Status","default":"queued"},"conversationId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversationid"},"aiRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airunid"},"output":{"additionalProperties":true,"type":"object","title":"Output"},"error":{"additionalProperties":true,"type":"object","title":"Error"}},"type":"object","required":["idempotencyKey"],"title":"AutomationRunCreateRequest","description":"Create or reuse a durable automation run receipt."},"AutomationRunRerunRequest":{"properties":{"allowSucceeded":{"type":"boolean","title":"Allowsucceeded","default":false}},"type":"object","title":"AutomationRunRerunRequest","description":"Replay one past run with the inputs it was originally given."},"AutomationRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"companyId":{"type":"string","format":"uuid","title":"Companyid"},"userId":{"type":"string","title":"Userid"},"automationId":{"type":"string","format":"uuid","title":"Automationid"},"automationKey":{"type":"string","title":"Automationkey"},"idempotencyKey":{"type":"string","title":"Idempotencykey"},"trigger":{"additionalProperties":true,"type":"object","title":"Trigger"},"skillContext":{"additionalProperties":true,"type":"object","title":"Skillcontext"},"relatedRecords":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Relatedrecords"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"status":{"type":"string","enum":["queued","running","succeeded","failed","skipped","cancelled"],"title":"Status","default":"queued"},"conversationId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversationid"},"conversationOwnerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationowneremail"},"aiRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airunid"},"output":{"additionalProperties":true,"type":"object","title":"Output"},"error":{"additionalProperties":true,"type":"object","title":"Error"},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startedat"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","companyId","userId","automationId","automationKey","idempotencyKey","createdAt","updatedAt"],"title":"AutomationRunResponse","description":"Durable run receipt for one automation firing."},"AutomationUpdateRequest":{"properties":{"confirmSchedule":{"type":"boolean","title":"Confirmschedule","default":false},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"visibility":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}],"title":"Visibility"},"trigger":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger"},"skill":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Skill"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Policy"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","title":"AutomationUpdateRequest","description":"Patch a persisted automation definition."},"AvgExpr-Input":{"properties":{"op":{"type":"string","const":"avg","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"AvgExpr"},"AvgExpr-Output":{"properties":{"op":{"type":"string","const":"avg","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"AvgExpr"},"BackOfficeMemberInviteInput":{"properties":{"email":{"type":"string","maxLength":320,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$","title":"Email"},"displayName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Displayname"}},"type":"object","required":["email"],"title":"BackOfficeMemberInviteInput","description":"Input for an investor inviting an analyst."},"BackOfficeMemberListResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/BackOfficeMemberResponse"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"BackOfficeMemberListResponse"},"BackOfficeMemberResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"invitedByInvestorId":{"type":"string","title":"Invitedbyinvestorid"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid"},"email":{"type":"string","title":"Email"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"status":{"type":"string","enum":["pending","active","revoked"],"title":"Status"},"invitedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitedat"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","companyId","invitedByInvestorId","email","status"],"title":"BackOfficeMemberResponse"},"BadgeSpec-Input":{"properties":{"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format","description":"Display format for the badge label expression. Required because list badges do not inherit table-column kind metadata.","default":"text"},"toneMap":{"additionalProperties":{"type":"string","enum":["neutral","success","warning","error"]},"type":"object","title":"Tonemap"}},"additionalProperties":false,"type":"object","required":["label","format"],"title":"BadgeSpec"},"BadgeSpec-Output":{"properties":{"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format","description":"Display format for the badge label expression. Required because list badges do not inherit table-column kind metadata.","default":"text"},"toneMap":{"additionalProperties":{"type":"string","enum":["neutral","success","warning","error"]},"type":"object","title":"Tonemap"}},"additionalProperties":false,"type":"object","required":["label","format"],"title":"BadgeSpec"},"BalanceSheetPeriod":{"properties":{"period":{"type":"string","title":"Period"},"periodLabel":{"type":"string","title":"Periodlabel"},"beginningBalance":{"type":"number","title":"Beginningbalance"},"additions":{"type":"number","title":"Additions"},"reductions":{"type":"number","title":"Reductions"},"netChange":{"type":"number","title":"Netchange"},"endingBalance":{"type":"number","title":"Endingbalance"},"subscriptionCount":{"type":"integer","title":"Subscriptioncount"}},"type":"object","required":["period","periodLabel","beginningBalance","additions","reductions","netChange","endingBalance","subscriptionCount"],"title":"BalanceSheetPeriod","description":"A single period in a balance sheet rollforward."},"BalanceSheetPeriodDetailResponse":{"properties":{"period":{"type":"string","title":"Period"},"periodLabel":{"type":"string","title":"Periodlabel"},"beginningBalance":{"type":"number","title":"Beginningbalance"},"endingBalance":{"type":"number","title":"Endingbalance"},"subscriptions":{"items":{"$ref":"#/components/schemas/BalanceSheetSubscriptionDetail"},"type":"array","title":"Subscriptions"},"totalAdditions":{"type":"number","title":"Totaladditions"},"totalReductions":{"type":"number","title":"Totalreductions"},"totalNetChange":{"type":"number","title":"Totalnetchange"}},"type":"object","required":["period","periodLabel","beginningBalance","endingBalance","subscriptions","totalAdditions","totalReductions","totalNetChange"],"title":"BalanceSheetPeriodDetailResponse","description":"Detailed balance sheet changes for a specific period."},"BalanceSheetResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"asOfDate":{"type":"string","title":"Asofdate"},"sections":{"items":{"$ref":"#/components/schemas/BsSection"},"type":"array","title":"Sections"},"totalAssets":{"type":"number","title":"Totalassets"},"totalLiabilities":{"type":"number","title":"Totalliabilities"},"totalEquity":{"type":"number","title":"Totalequity"},"totalLiabilitiesAndEquity":{"type":"number","title":"Totalliabilitiesandequity"},"isBalanced":{"type":"boolean","title":"Isbalanced"},"reliability":{"anyOf":[{"$ref":"#/components/schemas/StatementReliabilityModel"},{"type":"null"}]}},"type":"object","required":["companyId","asOfDate","sections","totalAssets","totalLiabilities","totalEquity","totalLiabilitiesAndEquity","isBalanced"],"title":"BalanceSheetResponse"},"BalanceSheetRollforwardResponse":{"properties":{"periodSummaries":{"items":{"$ref":"#/components/schemas/BalanceSheetPeriod"},"type":"array","title":"Periodsummaries"},"totalNetChange":{"type":"number","title":"Totalnetchange"},"totalAdditions":{"type":"number","title":"Totaladditions"},"totalReductions":{"type":"number","title":"Totalreductions"},"currentBalance":{"type":"number","title":"Currentbalance"}},"type":"object","required":["periodSummaries","totalNetChange","totalAdditions","totalReductions","currentBalance"],"title":"BalanceSheetRollforwardResponse","description":"Multi-period balance sheet rollforward."},"BalanceSheetSubscriptionDetail":{"properties":{"subscriptionId":{"type":"string","title":"Subscriptionid"},"customerName":{"type":"string","title":"Customername"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"additions":{"type":"number","title":"Additions"},"reductions":{"type":"number","title":"Reductions"},"netChange":{"type":"number","title":"Netchange"}},"type":"object","required":["subscriptionId","customerName","additions","reductions","netChange"],"title":"BalanceSheetSubscriptionDetail","description":"Per-subscription detail for balance sheet period."},"BankAccountCoverageResponse":{"properties":{"id":{"type":"string","title":"Id"},"accountName":{"type":"string","title":"Accountname"},"accountType":{"type":"string","enum":["checking","savings","credit_card","other"],"title":"Accounttype"},"institution":{"type":"string","title":"Institution"},"institutionLogo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institutionlogo"},"lastFour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastfour"},"connectionMethod":{"type":"string","enum":["plaid","direct","manual"],"title":"Connectionmethod","default":"plaid"},"connectionStatus":{"type":"string","enum":["connected","needs_reconnect","disconnected","syncing"],"title":"Connectionstatus","default":"connected"},"lastSyncAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncat"},"pendingCount":{"type":"integer","title":"Pendingcount","default":0},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"qboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountid"},"qboAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountname"},"mappedGlAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedglaccountid"},"mappedGlAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedglaccountname"},"mappedGlAccountType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedglaccounttype"},"mappingSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappingsource"},"mappedByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedbyuseremail"},"mappedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedat"},"statementCloseDay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statementcloseday"}},"type":"object","required":["id","accountName","accountType","institution"],"title":"BankAccountCoverageResponse","description":"Bank account coverage response matching frontend BankAccountCoverage type.\n\nReason: Frontend expects an array of these objects directly (not wrapped).\nField names match frontend/src/shared/transactions-types.ts BankAccountCoverage."},"BankAccountGlMappingRequest":{"properties":{"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"qboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountid"},"qboAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountname"}},"type":"object","title":"BankAccountGlMappingRequest","description":"Request to link a bank account to a Porter Chart of Accounts account.\n\nReason: account_id is the canonical Porter accounts.id UUID. qbo_account_id\nremains only as a legacy alias for older frontend payloads."},"BankAccountGlMappingResolutionResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BankAccountMappingAdmissionItemResponse"},"type":"array","title":"Items"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"},"total":{"type":"integer","title":"Total"},"outcome":{"type":"string","enum":["ready","needs_review"],"title":"Outcome"},"requiresAction":{"type":"boolean","title":"Requiresaction"},"notification":{"type":"null","title":"Notification"}},"type":"object","required":["items","counts","total","outcome","requiresAction"],"title":"BankAccountGlMappingResolutionResponse","description":"Structured Plaid connect mapping outcome.\n\nReason (POR-2614): Plaid connect must expose the exact admission receipt\nthat gates seed intake. The mapping worker owns notification delivery, so\nconnect returns readiness rather than a route-local automatic GL decision."},"BankAccountMappingAdmissionItemResponse":{"properties":{"kind":{"type":"string","const":"bank_account","title":"Kind"},"targetId":{"type":"string","title":"Targetid"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"status":{"type":"string","enum":["already_mapped","review_queued","needs_attention"],"title":"Status"},"intakeReady":{"type":"boolean","title":"Intakeready"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"reviewJobId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewjobid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["kind","targetId","status","intakeReady"],"title":"BankAccountMappingAdmissionItemResponse","description":"Current reviewed mapping readiness for one connected source account."},"BankAccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"plaidAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plaidaccountid"},"plaidItemId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plaiditemid"},"name":{"type":"string","title":"Name"},"officialName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Officialname"},"accountType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accounttype"},"accountSubtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountsubtype"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"currentBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Currentbalance"},"availableBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Availablebalance"},"balanceObservedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balanceobservedat"},"balanceStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balancestatus"},"currency":{"type":"string","title":"Currency","default":"USD"},"isActive":{"type":"boolean","title":"Isactive","default":true},"institutionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institutionname"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncedat"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"qboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountid"},"qboAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountname"},"mappedGlAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedglaccountid"},"mappedGlAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedglaccountname"},"mappedGlAccountType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedglaccounttype"},"mappingSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappingsource"},"mappedByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedbyuseremail"},"mappedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mappedat"},"feedCoverageStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedcoveragestartdate"},"coverageEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coverageenddate"}},"type":"object","required":["id","name"],"title":"BankAccountResponse","description":"Bank account details response."},"BankStatementResponse":{"properties":{"itemId":{"type":"string","title":"Itemid"},"institutionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institutionname"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"accountMask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountmask"},"statementId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementid"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"datePosted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateposted"}},"type":"object","required":["itemId"],"title":"BankStatementResponse","description":"A single available bank statement (metadata only — PDF via download)."},"BankTransactionAllowedActions":{"properties":{"select":{"type":"boolean","title":"Select","default":true},"categorize":{"type":"boolean","title":"Categorize","default":true},"updateStatus":{"type":"boolean","title":"Updatestatus","default":true},"exclude":{"type":"boolean","title":"Exclude","default":true},"post":{"type":"boolean","title":"Post","default":true},"runPipeline":{"type":"boolean","title":"Runpipeline","default":true},"matchPayments":{"type":"boolean","title":"Matchpayments","default":true},"recordPayment":{"type":"boolean","title":"Recordpayment","default":true},"viewPipelineTrace":{"type":"boolean","title":"Viewpipelinetrace","default":true}},"type":"object","title":"BankTransactionAllowedActions","description":"Bank-register row capability flags for frontend mutation gating."},"BankTransactionBatchOptions":{"properties":{"forceCreate":{"type":"boolean","title":"Forcecreate"},"skipDuplicates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skipduplicates"}},"additionalProperties":false,"type":"object","required":["forceCreate"],"title":"BankTransactionBatchOptions","description":"Options for the direct bank transaction batch endpoint."},"BankTransactionBatchRequest":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"options":{"$ref":"#/components/schemas/BankTransactionBatchOptions"}},"type":"object","required":["rows","options"],"title":"BankTransactionBatchRequest","description":"Direct batch import request for bank transactions — one shot, stateless."},"BankTransactionCategoryAllocation":{"properties":{"categoryAccountId":{"type":"string","title":"Categoryaccountid"},"categoryAccountName":{"type":"string","title":"Categoryaccountname"},"amount":{"type":"number","title":"Amount"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["categoryAccountId","categoryAccountName","amount"],"title":"BankTransactionCategoryAllocation","description":"Read projection for one explicit manual category split line."},"BankTransactionCategorySuggestion":{"properties":{"categoryAccountId":{"type":"string","title":"Categoryaccountid"},"categoryAccountName":{"type":"string","title":"Categoryaccountname"},"basis":{"items":{"type":"string"},"type":"array","title":"Basis"},"reason":{"type":"string","title":"Reason"},"ruleIds":{"items":{"type":"string"},"type":"array","title":"Ruleids"},"sameCounterpartyHistoryCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Samecounterpartyhistorycount"},"latestSameCounterpartyHistoryDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latestsamecounterpartyhistorydate"},"sameAmountHistoryTransactionIds":{"items":{"type":"string"},"type":"array","title":"Sameamounthistorytransactionids"}},"type":"object","required":["categoryAccountId","categoryAccountName","basis","reason"],"title":"BankTransactionCategorySuggestion","description":"Read-only category suggestion shown on review rows."},"BankTransactionCategorySuggestionItem":{"properties":{"transactionId":{"type":"string","title":"Transactionid"},"found":{"type":"boolean","title":"Found"},"suggestions":{"items":{"$ref":"#/components/schemas/BankTransactionCategorySuggestion"},"type":"array","title":"Suggestions"}},"type":"object","required":["transactionId","found","suggestions"],"title":"BankTransactionCategorySuggestionItem","description":"Suggestion payload for one requested transaction."},"BankTransactionCategorySuggestionsRequest":{"properties":{"transactionIds":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Transactionids"}},"type":"object","required":["transactionIds"],"title":"BankTransactionCategorySuggestionsRequest","description":"Request read-only category suggestions for visible review rows."},"BankTransactionCategorySuggestionsResponse":{"properties":{"requestedCount":{"type":"integer","title":"Requestedcount"},"foundCount":{"type":"integer","title":"Foundcount"},"missingTransactionIds":{"items":{"type":"string"},"type":"array","title":"Missingtransactionids"},"transactions":{"items":{"$ref":"#/components/schemas/BankTransactionCategorySuggestionItem"},"type":"array","title":"Transactions"}},"type":"object","required":["requestedCount","foundCount","missingTransactionIds","transactions"],"title":"BankTransactionCategorySuggestionsResponse","description":"Response for read-only category suggestions."},"BankTransactionImportPreview":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/ParsedBankTransaction"},"type":"array","title":"Transactions"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"stats":{"$ref":"#/components/schemas/BankTransactionImportStats"},"sourceFormat":{"type":"string","title":"Sourceformat"},"filename":{"type":"string","title":"Filename"},"detectedAccounts":{"items":{"$ref":"#/components/schemas/DetectedAccount"},"type":"array","title":"Detectedaccounts","default":[]},"formatDetected":{"type":"boolean","title":"Formatdetected","default":true},"fileColumns":{"items":{"type":"string"},"type":"array","title":"Filecolumns","default":[]},"needsColumnMapping":{"type":"boolean","title":"Needscolumnmapping","default":false},"unmappedColumns":{"items":{"type":"string"},"type":"array","title":"Unmappedcolumns","default":[]},"missingRequired":{"items":{"type":"string"},"type":"array","title":"Missingrequired","default":[]},"detectedMapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Detectedmapping","default":{}}},"type":"object","required":["transactions","errors","warnings","stats","sourceFormat","filename"],"title":"BankTransactionImportPreview","description":"Result of parsing a bank transaction CSV/Excel file."},"BankTransactionImportStats":{"properties":{"totalRows":{"type":"integer","title":"Totalrows","default":0},"depositCount":{"type":"integer","title":"Depositcount","default":0},"withdrawalCount":{"type":"integer","title":"Withdrawalcount","default":0},"validCount":{"type":"integer","title":"Validcount","default":0},"errorCount":{"type":"integer","title":"Errorcount","default":0},"warningCount":{"type":"integer","title":"Warningcount","default":0},"duplicateCount":{"type":"integer","title":"Duplicatecount","default":0},"excludedCount":{"type":"integer","title":"Excludedcount","default":0},"netNewCount":{"type":"integer","title":"Netnewcount","default":0},"qboOverlapCount":{"type":"integer","title":"Qbooverlapcount","default":0},"porterDuplicateCount":{"type":"integer","title":"Porterduplicatecount","default":0},"fileDuplicateCount":{"type":"integer","title":"Fileduplicatecount","default":0},"totalDeposits":{"type":"number","title":"Totaldeposits","default":0.0},"totalWithdrawals":{"type":"number","title":"Totalwithdrawals","default":0.0},"netAmount":{"type":"number","title":"Netamount","default":0.0}},"type":"object","title":"BankTransactionImportStats","description":"Statistics for the import preview."},"BankTransactionReadModel":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"date":{"type":"string","title":"Date"},"description":{"type":"string","title":"Description","default":""},"amount":{"type":"number","title":"Amount"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"classId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classid"},"className":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classname"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"cardholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardholder"},"processingFeeAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Processingfeeamount"},"processingFeeAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processingfeeaccountid"},"proposedAction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaction"},"proposedMatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchid"},"aiReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aireasoning"},"reviewNotes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewnotes"},"transactionType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transactiontype"},"flags":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Flags"},"proposedMatchIds":{"items":{"type":"string"},"type":"array","title":"Proposedmatchids","default":[]},"proposedMatchUrls":{"items":{"type":"string"},"type":"array","title":"Proposedmatchurls","default":[]},"proposedMatchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchtype"},"proposedMatchLines":{"items":{"type":"string"},"type":"array","title":"Proposedmatchlines","default":[]},"status":{"type":"string","title":"Status","default":"needs_review"},"qboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountid"},"qboId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboid"},"qboMatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbomatchid"},"qboType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbotype"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncedat"},"isInternalMovement":{"type":"boolean","title":"Isinternalmovement","default":false},"linkedTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedtransactionid"},"internalMovementNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internalmovementnote"},"exclusionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclusionreason"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"importBatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importbatchid"},"pipelineTrace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pipelinetrace"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"createdAt":{"type":"string","title":"Createdat","default":""},"updatedAt":{"type":"string","title":"Updatedat","default":""},"accountName":{"type":"string","title":"Accountname","default":""},"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"categoryAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountname"},"categoryAccountIds":{"items":{"type":"string"},"type":"array","title":"Categoryaccountids"},"categoryAccountNames":{"items":{"type":"string"},"type":"array","title":"Categoryaccountnames"},"categoryAllocations":{"items":{"$ref":"#/components/schemas/BankTransactionCategoryAllocation"},"type":"array","title":"Categoryallocations"},"categoryAccountType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccounttype"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"partyType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partytype"},"partyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partyname"},"matchedPaymentIds":{"items":{"type":"string"},"type":"array","title":"Matchedpaymentids","default":[]},"matchedProcessorSettlementId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedprocessorsettlementid"},"hasPolicyFlags":{"type":"boolean","title":"Haspolicyflags","default":false},"flagLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flaglabel"},"rowId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rowid"},"bankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionid"},"rowSource":{"type":"string","title":"Rowsource","default":"bank_transaction"},"nativeEntityType":{"type":"string","title":"Nativeentitytype","default":"bank_transaction"},"nativeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nativeentityid"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/TransactionProvenance"},{"type":"null"}]},"readOnly":{"type":"boolean","title":"Readonly","default":false},"readOnlyReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Readonlyreason"},"allowedActions":{"$ref":"#/components/schemas/BankTransactionAllowedActions"},"qboEntityType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboentitytype"},"qboEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboentityid"},"qboUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbourl"},"movementClassification":{"type":"string","enum":["deposit","spend","settlement"],"title":"Movementclassification","default":"spend"}},"type":"object","required":["id","companyId","date","amount"],"title":"BankTransactionReadModel","description":"Bank transaction read/display projection with joined and computed fields."},"BankTransactionReconItem":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","title":"Date"},"description":{"type":"string","title":"Description"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"amount":{"type":"number","title":"Amount"},"isCleared":{"type":"boolean","title":"Iscleared"}},"type":"object","required":["id","date","description","vendorName","amount","isCleared"],"title":"BankTransactionReconItem","description":"A bank transaction with its cleared status for the reconciliation view."},"BankTransactionStats":{"properties":{"total":{"type":"integer","title":"Total","default":0},"deposits":{"type":"integer","title":"Deposits","default":0},"withdrawals":{"type":"integer","title":"Withdrawals","default":0},"settlements":{"type":"integer","title":"Settlements","default":0},"needsReview":{"type":"integer","title":"Needsreview","default":0},"ready":{"type":"integer","title":"Ready","default":0},"posted":{"type":"integer","title":"Posted","default":0},"matched":{"type":"integer","title":"Matched","default":0},"excluded":{"type":"integer","title":"Excluded","default":0},"flagged":{"type":"integer","title":"Flagged","default":0},"totalDepositsAmount":{"type":"number","title":"Totaldepositsamount","default":0.0},"totalWithdrawalsAmount":{"type":"number","title":"Totalwithdrawalsamount","default":0.0},"totalSettlementsAmount":{"type":"number","title":"Totalsettlementsamount","default":0.0},"aiCategorizationInProgress":{"type":"boolean","title":"Aicategorizationinprogress","default":false},"aiCategorizationPercent":{"type":"integer","title":"Aicategorizationpercent","default":0},"aiCategorizationPhase":{"type":"string","title":"Aicategorizationphase","default":""}},"type":"object","title":"BankTransactionStats","description":"Bank transaction statistics response.\n\nReason: Field names match frontend/src/shared/transactions-types.ts BankTransactionStats."},"BankTransactionStatus":{"type":"string","enum":["all","needs_review","ready","posted","matched","excluded"],"title":"BankTransactionStatus","description":"Valid status values for bank transactions.\n\nReason: POR-1026 — ready is the approved state. One-click post still runs\nneeds_review → ready before posted so approval side effects are preserved."},"BankTransactionType":{"type":"string","enum":["deposit","withdrawal","spend","settlement","customer_payment","processor_deposit","refund","transfer_in","vendor_payment","payroll","bank_fee","transfer_out","loan_payment","owner_distribution","other"],"title":"BankTransactionType","description":"Valid transaction type values.\n\nReason: POR-27/28 require granular type detection beyond simple deposit/withdrawal.\nThese types drive the QBO posting logic (POR-30) and table display (POR-27)."},"BankTransactionsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BankTransactionReadModel"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"BankTransactionsListResponse","description":"Response for list of bank transactions.\n\nReason: Use 'items' to match standardized pagination format expected by frontend."},"BatchPaymentError":{"properties":{"rowIndex":{"type":"integer","title":"Rowindex"},"errorCode":{"type":"string","title":"Errorcode"},"message":{"type":"string","title":"Message"}},"type":"object","required":["rowIndex","errorCode","message"],"title":"BatchPaymentError","description":"Per-row error in customer-cash settlement creation."},"BatchPaymentOptions":{"properties":{"autoApplyToInvoices":{"type":"boolean","title":"Autoapplytoinvoices","default":true},"skipDuplicates":{"type":"boolean","title":"Skipduplicates","default":true},"createMissingCustomers":{"type":"boolean","title":"Createmissingcustomers","default":true}},"type":"object","title":"BatchPaymentOptions","description":"Options for batch payment creation."},"BatchPaymentRequest":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/BatchPaymentRow"},"type":"array","title":"Rows"},"options":{"$ref":"#/components/schemas/BatchPaymentOptions","default":{"autoApplyToInvoices":true,"skipDuplicates":true,"createMissingCustomers":true}}},"type":"object","required":["rows"],"title":"BatchPaymentRequest","description":"Request body for POST /payments/{company_id}/batch."},"BatchPaymentResponse":{"properties":{"created":{"type":"integer","title":"Created"},"updated":{"type":"integer","title":"Updated","default":0},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"$ref":"#/components/schemas/BatchPaymentError"},"type":"array","title":"Errors"},"paymentApplicationCount":{"type":"integer","title":"Paymentapplicationcount"}},"type":"object","required":["created","skipped","errors","paymentApplicationCount"],"title":"BatchPaymentResponse","description":"Response from POST /payments/{company_id}/batch."},"BatchPaymentRow":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"amount":{"type":"number","title":"Amount"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"payerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payername"},"payerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payeremail"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customeremail"},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoiceid"},"externalInvoiceReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalinvoicereference"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"feeAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Feeamount"},"netAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Netamount"},"stripeTxnId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripetxnid"},"payoutId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payoutid"},"availableDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availabledate"},"cashAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountid"},"cashAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountname"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"payerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payerid"},"importFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importfilename"}},"additionalProperties":true,"type":"object","required":["amount"],"title":"BatchPaymentRow","description":"Single pre-resolved payment row for customer-cash settlement."},"BatchUndoResponse":{"properties":{"deletedCount":{"type":"integer","title":"Deletedcount","default":0}},"type":"object","title":"BatchUndoResponse","description":"Response for batch undo import."},"BillApplyVendorCreditRequest":{"properties":{"vendorCreditBillId":{"type":"string","title":"Vendorcreditbillid"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"effectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectivedate"}},"type":"object","required":["vendorCreditBillId"],"title":"BillApplyVendorCreditRequest","description":"Request body for applying an existing vendor credit to a bill."},"BillCreate":{"properties":{"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"billDate":{"type":"string","title":"Billdate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"type":"number","title":"Amount"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"lineItems":{"anyOf":[{"items":{"$ref":"#/components/schemas/BillLineItem"},"type":"array"},{"type":"null"}],"title":"Lineitems"}},"type":"object","required":["billDate","amount"],"title":"BillCreate","description":"Request body for creating a bill."},"BillDocumentResponse":{"properties":{"id":{"type":"string","title":"Id"},"filename":{"type":"string","title":"Filename"},"fileType":{"type":"string","title":"Filetype"},"fileSize":{"type":"integer","title":"Filesize"},"category":{"type":"string","title":"Category"},"uploadedAt":{"type":"string","title":"Uploadedat"},"uploadedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploadedby"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","filename","fileType","fileSize","category","uploadedAt","url"],"title":"BillDocumentResponse","description":"A source document attached to a bill, shaped for the detail drawer."},"BillGlAccountUpdate":{"properties":{"accountId":{"type":"string","title":"Accountid"}},"type":"object","required":["accountId"],"title":"BillGlAccountUpdate","description":"Request body for recoding one bill's debit-side GL account."},"BillLineItem":{"properties":{"expenseAccountId":{"type":"string","title":"Expenseaccountid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["expenseAccountId","amount"],"title":"BillLineItem","description":"One Porter-authored AP expense/asset line."},"BillLineItemRecord":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"expenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expenseaccountid"},"expenseAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expenseaccountname"},"needsReview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needsreview"},"aiReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aireasoning"},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity"},"unitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unitprice"},"dimensions":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Dimensions"}},"additionalProperties":true,"type":"object","title":"BillLineItemRecord","description":"One editable Porter AP working line selected from bill raw data.\n\nReason (POR-2638): this exists so `lineItems` serializes with camelCase\nLEAVES on the HTTP wire. The field used to be `list[dict[str, Any]]`, and\nPydantic's `to_camel` alias generator only renames model fields — never keys\ninside an opaque dict — so the API emitted `lineItems[0].expense_account_id`\nwhile `apps/frontend/src/shared/bill-types.ts` and every reader in\n`pages/bills/new.tsx` / `components/transactions/bills/bill-posting.ts` ask\nfor `expenseAccountId`. A reopened draft therefore showed \"No account\" and\nMove to Open was refused even though the row still held the account.\n\nTwo constraints shape this model and must survive any edit here:\n\n1. **Do NOT add a `@field_serializer` that camelizes keys.** POR-638 pinned\n   the AI/MCP read path to `by_alias=False`\n   (`app/services/porter_ai/tools/query.py`) so stashed rows match the\n   ontology PropertyDefs in snake_case, and records that `by_alias=True`\n   silently broke data_ref aggregation chains. Aliases respect `by_alias`;\n   a field serializer would fire regardless and re-break that. The whole\n   point of declaring real fields is that the SAME model gives camelCase to\n   HTTP (`by_alias=True`) and snake_case to the AI (`by_alias=False`).\n2. **Storage stays snake_case.** `bills/commands.py::_bill_line_items_for_raw_data`\n   writes snake_case Porter working lines into `raw_data._porter_line_items`\n   for new command-created rows; the reader falls back to legacy/PDF\n   `raw_data.line_items`. `populate_by_name=True` is what lets those stored\n   keys validate here. Provider `raw_data.line_items` stays immutable evidence.\n\n`extra=\"allow\"` is a safety net, not a licence: an undeclared key survives a\nread round-trip instead of being silently dropped. Every key a Porter writer\nactually emits is declared below, and\n`tests/repositories/test_bills.py::test_bill_line_item_record_declares_every_writer_key`\nfails if a writer grows one that is not."},"BillLinkedSchedule":{"properties":{"id":{"type":"string","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"scheduleType":{"type":"string","title":"Scheduletype"},"status":{"type":"string","title":"Status"},"totalAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalamount"}},"type":"object","required":["id","scheduleType","status"],"title":"BillLinkedSchedule","description":"Schedule linked to a bill by source_transaction_id for read projections."},"BillListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BillReadModel"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"BillListResponse","description":"Paginated bill list response."},"BillPaymentApplicationReadModel":{"properties":{"id":{"type":"string","title":"Id"},"billPaymentId":{"type":"string","title":"Billpaymentid"},"billId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billid"},"targetType":{"type":"string","title":"Targettype","default":"bill"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetid"},"amount":{"type":"number","title":"Amount"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"billDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billdate"}},"type":"object","required":["id","billPaymentId","amount"],"title":"BillPaymentApplicationReadModel","description":"Bill-payment application read projection with joined bill display fields."},"BillPaymentDebitCandidateResponse":{"properties":{"bankTransactionId":{"type":"string","title":"Banktransactionid"},"date":{"type":"string","title":"Date"},"amount":{"type":"number","title":"Amount"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"bankAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"dateGapDays":{"type":"integer","title":"Dategapdays"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"}},"type":"object","required":["bankTransactionId","date","amount","dateGapDays","reasons"],"title":"BillPaymentDebitCandidateResponse","description":"A candidate bank debit for AP payment matching."},"BillPaymentDebitMatchRequest":{"properties":{"bankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionid"},"dateWindowDays":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Datewindowdays","default":7},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"}},"type":"object","title":"BillPaymentDebitMatchRequest","description":"Request body for matching a recorded bill payment to a synced bank debit."},"BillPaymentDebitMatchResponse":{"properties":{"status":{"type":"string","title":"Status"},"billPaymentId":{"type":"string","title":"Billpaymentid"},"matchedBankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedbanktransactionid"},"matchedAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Matchedamount"},"candidates":{"items":{"$ref":"#/components/schemas/BillPaymentDebitCandidateResponse"},"type":"array","title":"Candidates"}},"type":"object","required":["status","billPaymentId"],"title":"BillPaymentDebitMatchResponse","description":"Response from AP payment bank-debit matching."},"BillPaymentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BillPaymentReadModel"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"BillPaymentListResponse","description":"Bill payment list response with pagination info."},"BillPaymentReadModel":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"amount":{"type":"number","title":"Amount"},"paymentDate":{"type":"string","title":"Paymentdate"},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"bankAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"qboBillPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbobillpaymentid"},"rampBillPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rampbillpaymentid"},"billComBillPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billcombillpaymentid"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"proposedAction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaction"},"proposedMatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchid"},"proposedMatchIds":{"items":{"type":"string"},"type":"array","title":"Proposedmatchids","default":[]},"proposedMatchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchtype"},"aiReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aireasoning"},"settlementAllocationSourceFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlementallocationsourcefingerprint"},"settlementAllocationAppliedFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlementallocationappliedfingerprint"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"appliedToBills":{"items":{"$ref":"#/components/schemas/BillPaymentApplicationReadModel"},"type":"array","title":"Appliedtobills","default":[]},"appliedAmount":{"type":"number","title":"Appliedamount","default":0},"unappliedAmount":{"type":"number","title":"Unappliedamount","default":0}},"type":"object","required":["id","companyId","amount","paymentDate"],"title":"BillPaymentReadModel","description":"Bill-payment read/display projection with application settlement fields."},"BillReadModel":{"properties":{"id":{"type":"string","title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"billDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billdate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"postingDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postingdate"},"amount":{"type":"number","title":"Amount"},"status":{"type":"string","title":"Status","default":"pending"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"qboBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbobillid"},"rampBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rampbillid"},"billComBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billcombillid"},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transactionid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"isVendorCredit":{"type":"boolean","title":"Isvendorcredit","default":false},"isVoided":{"type":"boolean","title":"Isvoided","default":false},"voidedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedat"},"voidedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedreason"},"isWrittenOff":{"type":"boolean","title":"Iswrittenoff","default":false},"writtenOffAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffat"},"writtenOffReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffreason"},"writtenOffAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Writtenoffamount"},"writeOffVendorCreditBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writeoffvendorcreditbillid"},"amountPaid":{"type":"number","title":"Amountpaid","default":0.0},"amountDue":{"type":"number","title":"Amountdue","default":0.0},"unsettledPaymentAmount":{"type":"number","title":"Unsettledpaymentamount","default":0.0},"provenance":{"anyOf":[{"$ref":"#/components/schemas/TransactionProvenance"},{"type":"null"}]},"lineItems":{"items":{"$ref":"#/components/schemas/BillLineItemRecord"},"type":"array","title":"Lineitems"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"glAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glaccountid"},"glAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glaccountname"},"glAccountCount":{"type":"integer","title":"Glaccountcount","default":0},"glAccountIsPosted":{"type":"boolean","title":"Glaccountisposted","default":false},"attachmentCount":{"type":"integer","title":"Attachmentcount","default":0},"scheduleFlag":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scheduleflag"},"linkedSchedule":{"anyOf":[{"$ref":"#/components/schemas/BillLinkedSchedule"},{"type":"null"}]},"sourceAmendmentFlag":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sourceamendmentflag"},"needsReview":{"type":"boolean","title":"Needsreview","readOnly":true}},"type":"object","required":["id","amount","needsReview"],"title":"BillReadModel","description":"Bill read/display projection with computed settlement and display fields."},"BillSortField":{"type":"string","enum":["date","dueDate","amount","vendor","vendorName","status"],"title":"BillSortField","description":"Allowed sort fields for bill listing.\nReason: Restricts sort fields to prevent SQL injection and invalid queries."},"BillStatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"pending":{"type":"integer","title":"Pending"},"approved":{"type":"integer","title":"Approved"},"paid":{"type":"integer","title":"Paid"},"totalAmountDue":{"type":"number","title":"Totalamountdue"}},"type":"object","required":["total","pending","approved","paid","totalAmountDue"],"title":"BillStatsResponse","description":"Bill statistics summary.\nReason: Maps to BillStats dataclass from the repo. The repo's SQL aggregation\nonly computes total, pending, approved, paid, and total_amount_due — no draft,\nunpaid, or overdue counts (those would require date-based logic not yet in the repo)."},"BillStatus":{"type":"string","enum":["pending","draft","pending_approval","open","approved","unpaid","partial","paid","overdue","voided","written_off"],"title":"BillStatus","description":"Bill status values representing the bill lifecycle.\nReason: Enum ensures type safety and documents the approval/payment workflow."},"BillUpdate":{"properties":{"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"billDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billdate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"status":{"anyOf":[{"$ref":"#/components/schemas/BillStatus"},{"type":"null"}]},"lineItems":{"anyOf":[{"items":{"$ref":"#/components/schemas/BillLineItem"},"type":"array"},{"type":"null"}],"title":"Lineitems"}},"type":"object","title":"BillUpdate","description":"Request body for updating a bill.\nReason: All fields optional to support partial updates via PATCH.\nReason: Account-coded line edits are command input; bill_initial_gl is\nrewritten only when the lifecycle state allows it."},"BillWriteOffRequest":{"properties":{"reversalAccountId":{"type":"string","title":"Reversalaccountid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"effectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectivedate"}},"type":"object","required":["reversalAccountId"],"title":"BillWriteOffRequest","description":"Request body for writing off the remaining open bill balance."},"BillingContactCreate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Name"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"kind":{"type":"string","maxLength":40,"title":"Kind","default":"billing"},"isDefault":{"type":"boolean","title":"Isdefault","default":false},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"}},"type":"object","required":["email"],"title":"BillingContactCreate","description":"Create a billing contact for a customer."},"BillingContactResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"customerId":{"type":"string","title":"Customerid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"},"kind":{"type":"string","title":"Kind","default":"billing"},"isDefault":{"type":"boolean","title":"Isdefault","default":false},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","customerId","email"],"title":"BillingContactResponse","description":"Billing contact for a customer."},"BillingContactUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":320,"minLength":3},{"type":"null"}],"title":"Email"},"kind":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Kind"},"isDefault":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isdefault"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"}},"type":"object","title":"BillingContactUpdate","description":"Patch a billing contact."},"BillingOfferResponse":{"properties":{"source":{"type":"string","title":"Source"},"amountCents":{"type":"integer","title":"Amountcents"},"currency":{"type":"string","title":"Currency"},"billingInterval":{"type":"string","title":"Billinginterval"},"trialDays":{"type":"integer","title":"Trialdays"},"billingStartAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Billingstartat"},"requiresHostedCheckout":{"type":"boolean","title":"Requireshostedcheckout"},"stripePriceLinked":{"type":"boolean","title":"Stripepricelinked"}},"type":"object","required":["source","amountCents","currency","billingInterval","trialDays","requiresHostedCheckout","stripePriceLinked"],"title":"BillingOfferResponse"},"BillingPortalSessionResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","url"],"title":"BillingPortalSessionResponse"},"BillingSubscriptionResponse":{"properties":{"status":{"type":"string","title":"Status"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"stripeCustomerLinked":{"type":"boolean","title":"Stripecustomerlinked"},"stripeSubscriptionLinked":{"type":"boolean","title":"Stripesubscriptionlinked"},"stripeStatusAvailable":{"type":"boolean","title":"Stripestatusavailable","default":true},"stripeStatusError":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripestatuserror"},"cancelAtPeriodEnd":{"type":"boolean","title":"Cancelatperiodend"},"currentPeriodEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Currentperiodend"},"trialEndsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trialendsat"},"cancellationFeedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancellationfeedback"},"cancellationComment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancellationcomment"},"billingOffer":{"anyOf":[{"$ref":"#/components/schemas/BillingOfferResponse"},{"type":"null"}]}},"type":"object","required":["status","stripeCustomerLinked","stripeSubscriptionLinked","cancelAtPeriodEnd"],"title":"BillingSubscriptionResponse"},"Body_create_chat_run_api_chat__company_id__runs_post":{"properties":{"content":{"type":"string","title":"Content"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"screen_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screen Context"},"user_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Timezone"},"surface_context":{"anyOf":[{"type":"string","enum":["artifact_sidebar","monthly_close_item","goal_item"]},{"type":"null"}],"title":"Surface Context"},"surface_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface Metadata"},"conversation_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Objective"},"screenshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot"},"screenshot_as_model_input":{"type":"boolean","title":"Screenshot As Model Input","default":false},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]},"hidden_user_message":{"type":"boolean","title":"Hidden User Message","default":false},"continuation_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Purpose"},"continuation_receipt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Receipt Id"},"continuation_proposal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Proposal Id"},"continuation_source_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Source Run Id"}},"type":"object","required":["content"],"title":"Body_create_chat_run_api_chat__company_id__runs_post"},"Body_preview_bank_transactions_batch_api_bank_transactions__company_id__preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_preview_bank_transactions_batch_api_bank_transactions__company_id__preview_post"},"Body_preview_credit_card_transactions_api_credit_card_transactions__company_id__preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_preview_credit_card_transactions_api_credit_card_transactions__company_id__preview_post"},"Body_preview_invoices_api_invoices__company_id__preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_preview_invoices_api_invoices__company_id__preview_post"},"Body_preview_payment_batch_api_payments__company_id__preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_preview_payment_batch_api_payments__company_id__preview_post"},"Body_preview_subscriptions_api_subscriptions__company_id__preview_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_preview_subscriptions_api_subscriptions__company_id__preview_post"},"Body_send_message_api_chat__company_id__messages_post":{"properties":{"content":{"type":"string","title":"Content"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"screen_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screen Context"},"user_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Timezone"},"surface_context":{"anyOf":[{"type":"string","enum":["artifact_sidebar","monthly_close_item","goal_item"]},{"type":"null"}],"title":"Surface Context"},"surface_metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface Metadata"},"conversation_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Objective"},"screenshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot"},"screenshot_as_model_input":{"type":"boolean","title":"Screenshot As Model Input","default":false},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]},"hidden_user_message":{"type":"boolean","title":"Hidden User Message","default":false},"continuation_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Purpose"},"continuation_receipt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Receipt Id"},"continuation_proposal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Proposal Id"},"continuation_source_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuation Source Run Id"}},"type":"object","required":["content"],"title":"Body_send_message_api_chat__company_id__messages_post"},"Body_twilio_inbound_sms_api_webhooks_sms_inbound_post":{"properties":{"From":{"type":"string","title":"From","default":""},"Body":{"type":"string","title":"Body","default":""}},"type":"object","title":"Body_twilio_inbound_sms_api_webhooks_sms_inbound_post"},"Body_twilio_inbound_whatsapp_api_webhooks_whatsapp_inbound_post":{"properties":{"From":{"type":"string","title":"From","default":""},"Body":{"type":"string","title":"Body","default":""}},"type":"object","title":"Body_twilio_inbound_whatsapp_api_webhooks_whatsapp_inbound_post"},"Body_upload_bill_api_bills__company_id__upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"createDraft":{"type":"boolean","title":"Createdraft","default":false},"billId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billid"}},"type":"object","required":["file"],"title":"Body_upload_bill_api_bills__company_id__upload_post"},"Body_upload_bulk_schedules_api_schedules__company_id__upload_bulk_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"column_mapping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column Mapping"}},"type":"object","required":["file"],"title":"Body_upload_bulk_schedules_api_schedules__company_id__upload_bulk_post"},"Body_upload_company_invoice_logo_api_companies__company_id__branding_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_company_invoice_logo_api_companies__company_id__branding_logo_post"},"Body_upload_document_api_documents__company_id__documents_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"category":{"type":"string","title":"Category","default":"other"},"description":{"type":"string","title":"Description","default":""},"source":{"type":"string","title":"Source","default":"ui"}},"type":"object","required":["file"],"title":"Body_upload_document_api_documents__company_id__documents_upload_post"},"Body_upload_folder_document_api_investor_folders__company_id___folder_id__documents_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_folder_document_api_investor_folders__company_id___folder_id__documents_upload_post"},"Body_upload_invoice_for_schedule_api_schedules__company_id__upload_invoice_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_invoice_for_schedule_api_schedules__company_id__upload_invoice_post"},"Body_upload_invoice_logo_api_invoice_settings__company_id__logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_invoice_logo_api_invoice_settings__company_id__logo_post"},"Body_upload_reconciliation_statement_api_close_periods__company_id___period__reconciliations__account_id__statement_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_reconciliation_statement_api_close_periods__company_id___period__reconciliations__account_id__statement_post"},"Body_upload_subscriptions_api_schedules__company_id__upload_subscriptions_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_subscriptions_api_schedules__company_id__upload_subscriptions_post"},"BsAccountNode":{"properties":{"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"acctNum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acctnum"},"amount":{"type":"number","title":"Amount","default":0.0},"subtotal":{"type":"number","title":"Subtotal","default":0.0},"depth":{"type":"integer","title":"Depth","default":0},"hasDirectPostings":{"type":"boolean","title":"Hasdirectpostings","default":false},"children":{"items":{"$ref":"#/components/schemas/BsAccountNode"},"type":"array","title":"Children","default":[]}},"type":"object","required":["accountId","accountName"],"title":"BsAccountNode"},"BsSection":{"properties":{"name":{"type":"string","title":"Name"},"accounts":{"items":{"$ref":"#/components/schemas/BsAccountNode"},"type":"array","title":"Accounts"},"total":{"type":"number","title":"Total"}},"type":"object","required":["name","accounts","total"],"title":"BsSection"},"BulkApplyResponse":{"properties":{"payment":{"$ref":"#/components/schemas/PaymentReadModel"},"appliedCount":{"type":"integer","title":"Appliedcount"},"totalApplied":{"type":"number","title":"Totalapplied"}},"type":"object","required":["payment","appliedCount","totalApplied"],"title":"BulkApplyResponse","description":"Response after bulk applying payment."},"BulkClearRequest":{"properties":{"cleared":{"type":"boolean","title":"Cleared"}},"type":"object","required":["cleared"],"title":"BulkClearRequest","description":"Request body for bulk-clear endpoint."},"BulkConfirmMatchRequest":{"properties":{"transactionIds":{"items":{"type":"string"},"type":"array","title":"Transactionids"}},"type":"object","required":["transactionIds"],"title":"BulkConfirmMatchRequest","description":"Request to bulk confirm match candidates.\n\nReason: POR-27 requires bulk confirm match action for match_candidate transactions."},"BulkConfirmMatchResponse":{"properties":{"confirmed":{"type":"integer","title":"Confirmed"},"message":{"type":"string","title":"Message"}},"type":"object","required":["confirmed","message"],"title":"BulkConfirmMatchResponse","description":"Response for bulk confirm match.\n\nReason: Matched rows already exist in the posted ledger evidence, so\nconfirm-match excludes transactions (sets status='excluded',\nexclusion_reason='qbo_match') and prevents a later approve/post path from\nduplicating them."},"BulkDeleteRequest":{"properties":{"rule_ids":{"items":{"type":"string"},"type":"array","title":"Rule Ids"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["rule_ids"],"title":"BulkDeleteRequest"},"BulkPeriodDetailItem":{"properties":{"period":{"type":"string","title":"Period"},"subscriptions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Subscriptions"},"total":{"type":"number","title":"Total"},"beginningBalance":{"type":"number","title":"Beginningbalance","default":0.0},"endingBalance":{"type":"number","title":"Endingbalance","default":0.0},"scheduleRevenueTotal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Schedulerevenuetotal"},"nonScheduleRevenueTotal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nonschedulerevenuetotal"}},"type":"object","required":["period","subscriptions","total"],"title":"BulkPeriodDetailItem","description":"Single period's detail data in a bulk response."},"BulkPeriodDetailRequest":{"properties":{"accountType":{"type":"string","title":"Accounttype"},"periods":{"items":{"type":"string"},"type":"array","title":"Periods"}},"type":"object","required":["accountType","periods"],"title":"BulkPeriodDetailRequest","description":"Request body for bulk period detail fetch."},"BulkPeriodDetailResponse":{"properties":{"results":{"additionalProperties":{"$ref":"#/components/schemas/BulkPeriodDetailItem"},"type":"object","title":"Results"}},"type":"object","required":["results"],"title":"BulkPeriodDetailResponse","description":"Bulk response with data for multiple periods."},"BulkPostBillErrorResponse":{"properties":{"billId":{"type":"string","title":"Billid"},"error":{"type":"string","title":"Error"},"code":{"type":"string","title":"Code"},"details":{"items":{"type":"string"},"type":"array","title":"Details"}},"type":"object","required":["billId","error","code"],"title":"BulkPostBillErrorResponse","description":"One failed bill row from a bulk AP posting request."},"BulkPostBillsRequest":{"properties":{"billIds":{"items":{"type":"string"},"type":"array","title":"Billids"}},"type":"object","title":"BulkPostBillsRequest","description":"Request to post selected draft bills into open AP."},"BulkPostBillsResponse":{"properties":{"posted":{"type":"integer","title":"Posted"},"failed":{"type":"integer","title":"Failed"},"bills":{"items":{"$ref":"#/components/schemas/BillReadModel"},"type":"array","title":"Bills"},"errors":{"items":{"$ref":"#/components/schemas/BulkPostBillErrorResponse"},"type":"array","title":"Errors"}},"type":"object","required":["posted","failed","bills","errors"],"title":"BulkPostBillsResponse","description":"Response after posting selected draft bills."},"BulkPostInvoicesToQBORequest":{"properties":{"invoiceIds":{"items":{"type":"string"},"type":"array","title":"Invoiceids"}},"type":"object","required":["invoiceIds"],"title":"BulkPostInvoicesToQBORequest","description":"Request to post selected Porter invoices."},"BulkPostInvoicesToQBOResponse":{"properties":{"posted":{"type":"integer","title":"Posted"},"failed":{"type":"integer","title":"Failed"},"postedInvoices":{"items":{"$ref":"#/components/schemas/PostInvoiceToQBOResponse"},"type":"array","title":"Postedinvoices"},"errors":{"items":{"$ref":"#/components/schemas/PostInvoiceToQBOErrorResponse"},"type":"array","title":"Errors"}},"type":"object","required":["posted","failed","postedInvoices","errors"],"title":"BulkPostInvoicesToQBOResponse","description":"Response after posting selected Porter invoices."},"BulkPostPaymentsToQBORequest":{"properties":{"paymentIds":{"items":{"type":"string"},"type":"array","title":"Paymentids"}},"type":"object","required":["paymentIds"],"title":"BulkPostPaymentsToQBORequest","description":"Request to post selected Porter payments to QuickBooks."},"BulkPostPaymentsToQBOResponse":{"properties":{"posted":{"type":"integer","title":"Posted"},"failed":{"type":"integer","title":"Failed"},"postedPayments":{"items":{"$ref":"#/components/schemas/PostPaymentToQBOResponse"},"type":"array","title":"Postedpayments"},"errors":{"items":{"$ref":"#/components/schemas/PostPaymentToQBOErrorResponse"},"type":"array","title":"Errors"}},"type":"object","required":["posted","failed","postedPayments","errors"],"title":"BulkPostPaymentsToQBOResponse","description":"Response after posting selected Porter payments to QuickBooks."},"BulkPostResponse":{"properties":{"posted":{"type":"integer","title":"Posted"},"failed":{"type":"integer","title":"Failed"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"batchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batchid"}},"type":"object","required":["posted","failed"],"title":"BulkPostResponse","description":"Response for bulk post to QBO."},"BulkRuleExceptionRequest":{"properties":{"ruleId":{"type":"string","format":"uuid","title":"Ruleid"},"ruleRevision":{"type":"integer","exclusiveMinimum":0.0,"title":"Rulerevision"},"transactionId":{"type":"string","format":"uuid","title":"Transactionid"}},"additionalProperties":false,"type":"object","required":["ruleId","ruleRevision","transactionId"],"title":"BulkRuleExceptionRequest"},"BulkScheduleCreateRequest":{"properties":{"schedules":{"items":{"$ref":"#/components/schemas/ScheduleCreate"},"type":"array","title":"Schedules"},"importFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importfilename"}},"type":"object","required":["schedules"],"title":"BulkScheduleCreateRequest","description":"Request to create multiple schedules from bulk upload."},"BulkScheduleCreateResponse":{"properties":{"created":{"items":{"$ref":"#/components/schemas/ScheduleResponse"},"type":"array","title":"Created"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["created","errors"],"title":"BulkScheduleCreateResponse","description":"Response from bulk schedule creation."},"BulkToggleRequest":{"properties":{"rule_ids":{"items":{"type":"string"},"type":"array","title":"Rule Ids"},"is_active":{"type":"boolean","title":"Is Active"},"expected_revisions":{"anyOf":[{"additionalProperties":{"type":"integer","exclusiveMinimum":0.0},"type":"object"},{"type":"null"}],"title":"Expected Revisions"}},"type":"object","required":["rule_ids","is_active"],"title":"BulkToggleRequest"},"CachedInsightsResponse":{"properties":{"status":{"type":"string","enum":["generating","ready","failed","pending_sync"],"title":"Status"},"payload":{"anyOf":[{"$ref":"#/components/schemas/InsightsResponse"},{"type":"null"}]},"computedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computedat"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"syncStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncstartedat"},"syncRecordsSynced":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Syncrecordssynced"}},"type":"object","required":["status"],"title":"CachedInsightsResponse","description":"Envelope returned by the onboarding insights panel.\n\nReason: POR-819 — the panel reads from `company_insights` cache instead of\nre-running the AI on every mount. The `status` field tells the frontend\nwhether to render findings, show the \"waiting for data to be fully\ningested\" loader, or stop polling."},"CancelBillingSubscriptionRequest":{"properties":{"cancellationFeedback":{"type":"string","enum":["customer_service","low_quality","missing_features","other","switched_service","too_complex","too_expensive","unused"],"title":"Cancellationfeedback"},"cancellationComment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancellationcomment"}},"type":"object","required":["cancellationFeedback"],"title":"CancelBillingSubscriptionRequest"},"CapSoftwareAccountCreate":{"properties":{"accountId":{"type":"string","title":"Accountid"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"defaultProductivityPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Defaultproductivitypct"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"displayOrder":{"type":"integer","title":"Displayorder","default":0}},"type":"object","required":["accountId"],"title":"CapSoftwareAccountCreate","description":"Create a cap software eligible account.\n\nReason: POR-75 — identifies which expense accounts are eligible for\ncapitalized software treatment. Transactions in these accounts are\ncandidates for capitalization based on policy thresholds.\nCamelCase aliases for frontend compatibility."},"CapSoftwareAccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"accountName":{"type":"string","title":"Accountname"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"glAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glaccountid"},"isActive":{"type":"boolean","title":"Isactive","default":true},"displayOrder":{"type":"integer","title":"Displayorder","default":0},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","accountName"],"title":"CapSoftwareAccountResponse","description":"Capitalized software eligible account configuration."},"CapSoftwareAccountUpdate":{"properties":{"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"defaultProductivityPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Defaultproductivitypct"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"displayOrder":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Displayorder"}},"type":"object","title":"CapSoftwareAccountUpdate","description":"Partial update for a cap software eligible account.\n\nReason: All fields optional for PATCH semantics."},"CaptureAuditEmailRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"firstName":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Firstname"}},"type":"object","required":["email"],"title":"CaptureAuditEmailRequest"},"CashFlowItem":{"properties":{"name":{"type":"string","title":"Name"},"amount":{"type":"number","title":"Amount"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Accountids"}},"type":"object","required":["name","amount"],"title":"CashFlowItem"},"CashFlowOperating":{"properties":{"netIncome":{"type":"number","title":"Netincome"},"nonCashAdjustments":{"items":{"$ref":"#/components/schemas/CashFlowItem"},"type":"array","title":"Noncashadjustments"},"totalNonCash":{"type":"number","title":"Totalnoncash"},"workingCapitalChanges":{"items":{"$ref":"#/components/schemas/CashFlowItem"},"type":"array","title":"Workingcapitalchanges"},"totalWorkingCapital":{"type":"number","title":"Totalworkingcapital"},"netCashOperating":{"type":"number","title":"Netcashoperating"}},"type":"object","required":["netIncome","nonCashAdjustments","totalNonCash","workingCapitalChanges","totalWorkingCapital","netCashOperating"],"title":"CashFlowOperating"},"CashFlowResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"operating":{"$ref":"#/components/schemas/CashFlowOperating"},"investing":{"$ref":"#/components/schemas/CashFlowSection"},"financing":{"$ref":"#/components/schemas/CashFlowSection"},"netChangeInCash":{"type":"number","title":"Netchangeincash"},"beginningCash":{"type":"number","title":"Beginningcash"},"endingCash":{"type":"number","title":"Endingcash"},"computedEndingCash":{"type":"number","title":"Computedendingcash"},"isReconciled":{"type":"boolean","title":"Isreconciled"},"reconciliationGap":{"type":"number","title":"Reconciliationgap","default":0.0}},"type":"object","required":["companyId","startDate","endDate","operating","investing","financing","netChangeInCash","beginningCash","endingCash","computedEndingCash","isReconciled"],"title":"CashFlowResponse"},"CashFlowSection":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CashFlowItem"},"type":"array","title":"Items"},"netCashInvesting":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Netcashinvesting"},"netCashFinancing":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Netcashfinancing"}},"type":"object","required":["items"],"title":"CashFlowSection"},"CashMovementDetailItem":{"properties":{"id":{"type":"string","title":"Id"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["id","accountName","amount"],"title":"CashMovementDetailItem"},"CashMovementDetailResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"direction":{"type":"string","enum":["cash_in","cash_out"],"title":"Direction"},"category":{"type":"string","title":"Category"},"items":{"items":{"$ref":"#/components/schemas/CashMovementDetailItem"},"type":"array","title":"Items"},"total":{"type":"number","title":"Total"}},"type":"object","required":["companyId","startDate","endDate","direction","category","items","total"],"title":"CashMovementDetailResponse"},"CashMovementItem":{"properties":{"name":{"type":"string","title":"Name"},"amount":{"type":"number","title":"Amount"},"accountIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Accountids"}},"type":"object","required":["name","amount"],"title":"CashMovementItem"},"CashMovementSection":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CashMovementItem"},"type":"array","title":"Items"},"total":{"type":"number","title":"Total"}},"type":"object","required":["items","total"],"title":"CashMovementSection"},"CashMovementsResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"cashIn":{"$ref":"#/components/schemas/CashMovementSection"},"cashOut":{"$ref":"#/components/schemas/CashMovementSection"},"netCashMovement":{"type":"number","title":"Netcashmovement"},"beginningCash":{"type":"number","title":"Beginningcash"},"endingCash":{"type":"number","title":"Endingcash"},"computedEndingCash":{"type":"number","title":"Computedendingcash"},"isReconciled":{"type":"boolean","title":"Isreconciled"}},"type":"object","required":["companyId","startDate","endDate","cashIn","cashOut","netCashMovement","beginningCash","endingCash","computedEndingCash","isReconciled"],"title":"CashMovementsResponse"},"CategorizeRequest":{"properties":{"ruleExceptions":{"items":{"$ref":"#/components/schemas/RuleExceptionRequest"},"type":"array","title":"Ruleexceptions"},"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"allocations":{"anyOf":[{"items":{"$ref":"#/components/schemas/CategoryAllocationRequest"},"type":"array"},{"type":"null"}],"title":"Allocations"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"transactionType":{"anyOf":[{"$ref":"#/components/schemas/BankTransactionType"},{"type":"null"}]}},"type":"object","title":"CategorizeRequest","description":"Request to categorize a transaction."},"CategoryAllocationRequest":{"properties":{"categoryAccountId":{"type":"string","title":"Categoryaccountid"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["categoryAccountId","amount"],"title":"CategoryAllocationRequest","description":"One explicit account allocation in a manual bank split."},"CellLineageResponse":{"properties":{"scenarioId":{"type":"string","title":"Scenarioid"},"runId":{"type":"string","title":"Runid"},"lineKey":{"type":"string","title":"Linekey"},"lineLabel":{"type":"string","title":"Linelabel"},"periodIndex":{"type":"integer","title":"Periodindex"},"periodLabel":{"type":"string","title":"Periodlabel"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"status":{"type":"string","title":"Status"},"availability":{"type":"string","title":"Availability"},"derivation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Derivation"}},"type":"object","required":["scenarioId","runId","lineKey","lineLabel","periodIndex","periodLabel","value","status","availability"],"title":"CellLineageResponse"},"CellLineageSourcePageResponse":{"properties":{"scenarioId":{"type":"string","title":"Scenarioid"},"runId":{"type":"string","title":"Runid"},"lineKey":{"type":"string","title":"Linekey"},"periodIndex":{"type":"integer","title":"Periodindex"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"},"total":{"type":"integer","title":"Total"},"complete":{"type":"boolean","title":"Complete"},"sourceTotal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetotal"},"forecastValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecastvalue"},"difference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difference"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"}},"type":"object","required":["scenarioId","runId","lineKey","periodIndex","offset","limit","total","complete","rows"],"title":"CellLineageSourcePageResponse"},"ChannelPreferencesResponse":{"properties":{"slackEnabled":{"type":"boolean","title":"Slackenabled"},"emailEnabled":{"type":"boolean","title":"Emailenabled"},"smsEnabled":{"type":"boolean","title":"Smsenabled"},"whatsappEnabled":{"type":"boolean","title":"Whatsappenabled"}},"type":"object","required":["slackEnabled","emailEnabled","smsEnabled","whatsappEnabled"],"title":"ChannelPreferencesResponse","description":"A user's per-company notification channel preferences (POR-1723)."},"ChartBlock-Input":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"chart","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"chartType":{"type":"string","enum":["bar","line","pie"],"title":"Charttype"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"x":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"X","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"height":{"anyOf":[{"type":"string","enum":["content","compact","standard","tall","viewport-half"]},{"type":"null"}],"title":"Height","description":"Optional chart-owned display height. Use it when chart panels need to align with other bounded display blocks in the same layout row."},"yAxis":{"anyOf":[{"$ref":"#/components/schemas/ChartYAxisConfig"},{"type":"null"}],"description":"Optional y-axis bounds for line and bar charts. Default when omitted: the renderer calculates the y-axis domain automatically from chart data; line charts keep automatic padding so flat lines remain visible. Set only min or only max to pin one side and leave the other automatic. Do not use yAxis on pie charts."},"series":{"items":{"$ref":"#/components/schemas/ChartSeries-Input"},"type":"array","maxItems":6,"title":"Series"},"derivedSeries":{"anyOf":[{"$ref":"#/components/schemas/ChartDerivedSeries"},{"type":"null"}],"description":"Optional complete-pivot series mode. Exclude the x/dimension fields; every remaining field returned by the complete data result renders as one series. Mutually exclusive with explicit series and valid only for bar or line charts."},"stacked":{"type":"boolean","title":"Stacked","description":"Render bar-series values stacked on the same x-axis bucket. Only valid for bar charts.","default":false},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Input"},{"type":"null"}],"description":"Optional chart point interaction. The click evaluates expressions against the clicked row, sets artifact-local context, and can open a configured detail surface."},"tooltipFields":{"items":{"$ref":"#/components/schemas/ChartTooltipField-Input"},"type":"array","maxItems":4,"title":"Tooltipfields"},"selectionFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactSelectionFilter"},{"type":"null"}]},"rowFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},{"type":"null"}]},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},"type":"array","maxItems":12,"title":"Rowfilters"},"requireComplete":{"type":"boolean","title":"Requirecomplete","default":false}},"additionalProperties":false,"type":"object","required":["type","id","chartType","dataRef","x"],"title":"ChartBlock"},"ChartBlock-Output":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"chart","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"chartType":{"type":"string","enum":["bar","line","pie"],"title":"Charttype"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"x":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"X","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"height":{"anyOf":[{"type":"string","enum":["content","compact","standard","tall","viewport-half"]},{"type":"null"}],"title":"Height","description":"Optional chart-owned display height. Use it when chart panels need to align with other bounded display blocks in the same layout row."},"yAxis":{"anyOf":[{"$ref":"#/components/schemas/ChartYAxisConfig"},{"type":"null"}],"description":"Optional y-axis bounds for line and bar charts. Default when omitted: the renderer calculates the y-axis domain automatically from chart data; line charts keep automatic padding so flat lines remain visible. Set only min or only max to pin one side and leave the other automatic. Do not use yAxis on pie charts."},"series":{"items":{"$ref":"#/components/schemas/ChartSeries-Output"},"type":"array","maxItems":6,"title":"Series"},"derivedSeries":{"anyOf":[{"$ref":"#/components/schemas/ChartDerivedSeries"},{"type":"null"}],"description":"Optional complete-pivot series mode. Exclude the x/dimension fields; every remaining field returned by the complete data result renders as one series. Mutually exclusive with explicit series and valid only for bar or line charts."},"stacked":{"type":"boolean","title":"Stacked","description":"Render bar-series values stacked on the same x-axis bucket. Only valid for bar charts.","default":false},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Output"},{"type":"null"}],"description":"Optional chart point interaction. The click evaluates expressions against the clicked row, sets artifact-local context, and can open a configured detail surface."},"tooltipFields":{"items":{"$ref":"#/components/schemas/ChartTooltipField-Output"},"type":"array","maxItems":4,"title":"Tooltipfields"},"selectionFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactSelectionFilter"},{"type":"null"}]},"rowFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},{"type":"null"}]},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},"type":"array","maxItems":12,"title":"Rowfilters"},"requireComplete":{"type":"boolean","title":"Requirecomplete","default":false}},"additionalProperties":false,"type":"object","required":["type","id","chartType","dataRef","x"],"title":"ChartBlock"},"ChartDerivedSeries":{"properties":{"excludeFields":{"items":{"type":"string"},"type":"array","maxItems":30,"minItems":1,"title":"Excludefields","description":"Fields on each wide result row that are dimensions or supporting values, not numeric chart series. Every other field present in the complete data result becomes one series in first-seen field order."},"format":{"type":"string","enum":["money","number","percent"],"title":"Format","description":"Axis and tooltip format shared by every derived series."}},"additionalProperties":false,"type":"object","required":["excludeFields","format"],"title":"ChartDerivedSeries","description":"Declare chart series from the complete set of wide result fields."},"ChartOfAccountsResponse":{"properties":{"accounts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Accounts"}},"type":"object","required":["accounts"],"title":"ChartOfAccountsResponse"},"ChartSeries-Input":{"properties":{"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"key":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Key","description":"Optional durable series identity supplied by the author. It is distinct from the display label and is exposed as series.key during chart clicks; when omitted it resolves to null rather than a generated or label-derived value."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Metadata","description":"Optional authored scalar context exposed as series.metadata.<key> during chart clicks. Keys start with an ASCII letter or underscore and contain only ASCII letters, digits, or underscores. Missing keys resolve to null; metadata is click-local and does not alter source rows."},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"tone":{"type":"string","enum":["neutral","green","warning","error"],"title":"Tone","default":"neutral"},"format":{"type":"string","enum":["money","number","percent"],"title":"Format","description":"Axis and tooltip format. All series in one chart must match.","default":"number"}},"additionalProperties":false,"type":"object","required":["label","value","format"],"title":"ChartSeries"},"ChartSeries-Output":{"properties":{"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"key":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Key","description":"Optional durable series identity supplied by the author. It is distinct from the display label and is exposed as series.key during chart clicks; when omitted it resolves to null rather than a generated or label-derived value."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Metadata","description":"Optional authored scalar context exposed as series.metadata.<key> during chart clicks. Keys start with an ASCII letter or underscore and contain only ASCII letters, digits, or underscores. Missing keys resolve to null; metadata is click-local and does not alter source rows."},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"tone":{"type":"string","enum":["neutral","green","warning","error"],"title":"Tone","default":"neutral"},"format":{"type":"string","enum":["money","number","percent"],"title":"Format","description":"Axis and tooltip format. All series in one chart must match.","default":"number"}},"additionalProperties":false,"type":"object","required":["label","value","format"],"title":"ChartSeries"},"ChartTooltipField-Input":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format"}},"additionalProperties":false,"type":"object","required":["label","value","format"],"title":"ChartTooltipField"},"ChartTooltipField-Output":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format"}},"additionalProperties":false,"type":"object","required":["label","value","format"],"title":"ChartTooltipField"},"ChartYAxisConfig":{"properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min","description":"Optional lower y-axis bound. Default when omitted: the renderer calculates the lower bound automatically from chart data."},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max","description":"Optional upper y-axis bound. Default when omitted: the renderer calculates the upper bound automatically from chart data."}},"additionalProperties":false,"type":"object","title":"ChartYAxisConfig"},"CheckboxControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"checkbox","title":"Type"},"defaultValue":{"type":"boolean","title":"Defaultvalue","default":false}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"CheckboxControlSpec"},"ClaimedFinancialAuditReport":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"path":{"anyOf":[{"$ref":"#/components/schemas/AuditPath"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/AuditStatus"},"report":{"anyOf":[{"$ref":"#/components/schemas/AuditReport"},{"type":"null"}]}},"type":"object","required":["id","path","status","report"],"title":"ClaimedFinancialAuditReport","description":"The immutable audit artifact; company workspace state is intentionally absent."},"ClosePeriodResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"companyId":{"type":"string","title":"Companyid"},"period":{"type":"string","title":"Period"},"status":{"type":"string","title":"Status"},"periodExists":{"type":"boolean","title":"Periodexists","default":true},"totalTasks":{"type":"integer","title":"Totaltasks","default":0},"completedTasks":{"type":"integer","title":"Completedtasks","default":0},"skippedTasks":{"type":"integer","title":"Skippedtasks","default":0},"attentionCount":{"type":"integer","title":"Attentioncount","default":0},"closedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closedby"},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closedat"},"reopenedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reopenedby"},"reopenedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reopenedat"},"activeSnapshotId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activesnapshotid"},"scheduleReview":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schedulereview"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","period","status"],"title":"ClosePeriodResponse","description":"Close period response with camelCase."},"ClosePromptItem":{"properties":{"category":{"type":"string","title":"Category"},"title":{"type":"string","title":"Title"},"count":{"type":"integer","title":"Count"},"status":{"type":"string","title":"Status"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["category","title","count","status"],"title":"ClosePromptItem","description":"Single item in the monthly close checklist."},"CoalesceExpr-Input":{"properties":{"op":{"type":"string","const":"coalesce","title":"Op"},"args":{"items":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"type":"array","maxItems":20,"minItems":1,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"CoalesceExpr"},"CoalesceExpr-Output":{"properties":{"op":{"type":"string","const":"coalesce","title":"Op"},"args":{"items":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"type":"array","maxItems":20,"minItems":1,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"CoalesceExpr"},"CommerceFeeComponent":{"properties":{"kind":{"type":"string","enum":["initial","adjustment"],"title":"Kind"},"amount_minor":{"type":"integer","title":"Amount Minor"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"effective_at":{"type":"string","format":"date-time","title":"Effective At"}},"additionalProperties":false,"type":"object","required":["kind","amount_minor","currency","effective_at"],"title":"CommerceFeeComponent","description":"A provider-authored fee component; its timestamp is not the Payment timestamp."},"CommerceFeeEvidence":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version","default":1},"state":{"type":"string","enum":["unknown","known_initial","unsupported","not_applicable"],"title":"State"},"components":{"items":{"$ref":"#/components/schemas/CommerceFeeComponent"},"type":"array","title":"Components","default":[]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Content Hash"}},"additionalProperties":false,"type":"object","required":["state","content_hash"],"title":"CommerceFeeEvidence","description":"Immutable facts for one provider revision, with an independently verified hash."},"CommercePostingRootOutcomeResponse":{"properties":{"rootKind":{"type":"string","enum":["sale","refund"],"title":"Rootkind"},"rootId":{"type":"string","title":"Rootid"},"status":{"type":"string","enum":["posted_current","already_posted_current","missing","ineligible_review_blocked","failed"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"holdReasons":{"items":{"type":"string"},"type":"array","title":"Holdreasons"}},"type":"object","required":["rootKind","rootId","status"],"title":"CommercePostingRootOutcomeResponse","description":"One safe terminal outcome for one exact requested commerce root."},"CommerceTenderObservationRecord":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"provider":{"type":"string","title":"Provider"},"merchantId":{"type":"string","title":"Merchantid"},"externalPaymentId":{"type":"string","title":"Externalpaymentid"},"providerRevision":{"type":"string","title":"Providerrevision"},"sourceObservedAt":{"type":"string","format":"date-time","title":"Sourceobservedat"},"sourceEffectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sourceeffectiveat"},"businessDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Businessdate"},"status":{"type":"string","title":"Status"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"tipAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tipamount","default":"0"},"feeAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Feeamount"},"feeEvidence":{"anyOf":[{"$ref":"#/components/schemas/CommerceFeeEvidence"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"locationExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locationexternalid"},"externalOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalorderid"},"sourceTenderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetenderid"},"commerceOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commerceorderid"},"commerceOrderTenderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commerceordertenderid"},"destinationKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destinationkind"},"destinationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destinationaccountid"},"payoutEligible":{"type":"boolean","title":"Payouteligible","default":false},"evidenceFingerprint":{"type":"string","title":"Evidencefingerprint"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","companyId","provider","merchantId","externalPaymentId","providerRevision","sourceObservedAt","status","evidenceFingerprint","createdAt"],"title":"CommerceTenderObservationRecord","description":"One immutable provider revision of customer consideration evidence."},"CommissionDealTypeCreate":{"properties":{"dealTypeName":{"type":"string","title":"Dealtypename"},"commissionRatePct":{"type":"number","title":"Commissionratepct","default":0},"amortizationMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amortizationmonths"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"displayOrder":{"type":"integer","title":"Displayorder","default":0}},"type":"object","required":["dealTypeName"],"title":"CommissionDealTypeCreate","description":"Create a new commission deal type.\n\nReason: POR-71 — different deal types (new business, renewal, expansion)\ncan have different commission rates and amortization periods.\nCamelCase aliases for frontend compatibility."},"CommissionDealTypeResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"dealTypeName":{"type":"string","title":"Dealtypename"},"commissionRatePct":{"type":"number","title":"Commissionratepct","default":0},"amortizationPeriodMonths":{"type":"integer","title":"Amortizationperiodmonths","default":0},"isActive":{"type":"boolean","title":"Isactive","default":true},"displayOrder":{"type":"integer","title":"Displayorder","default":0},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","dealTypeName"],"title":"CommissionDealTypeResponse","description":"Commission deal type configuration."},"CommissionDealTypeUpdate":{"properties":{"dealTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dealtypename"},"commissionRatePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commissionratepct"},"amortizationMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amortizationmonths"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"displayOrder":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Displayorder"}},"type":"object","title":"CommissionDealTypeUpdate","description":"Partial update for a commission deal type.\n\nReason: All fields optional for PATCH semantics."},"CompanyAccountSettingsResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"paymentClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentclearingaccountid"},"processingFeesAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processingfeesaccountid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId"],"title":"CompanyAccountSettingsResponse","description":"Company account settings response with camelCase."},"CompanyAccountSettingsUpdate":{"properties":{"paymentClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentclearingaccountid"},"processingFeesAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processingfeesaccountid"}},"type":"object","title":"CompanyAccountSettingsUpdate","description":"Update request for company account settings."},"CompanyBrandingAddress":{"properties":{"line1":{"type":"string","title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"city":{"type":"string","title":"City"},"region":{"type":"string","title":"Region"},"postalCode":{"type":"string","title":"Postalcode"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["line1","city","region","postalCode"],"title":"CompanyBrandingAddress","description":"Structured address shape consumed by the POR-925 frontend."},"CompanyBrandingResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logourl"},"logoSizePx":{"type":"integer","title":"Logosizepx","default":80},"accentColor":{"type":"string","title":"Accentcolor","default":"#2D6A4F"},"address":{"anyOf":[{"$ref":"#/components/schemas/CompanyBrandingAddress"},{"type":"null"}]},"defaultMemo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultmemo"},"paymentInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentinstructions"},"emailFooterText":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailfootertext"},"senderDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Senderdisplayname"},"senderReplyToEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Senderreplytoemail"},"invoiceSenderEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicesenderemail"}},"type":"object","required":["companyId"],"title":"CompanyBrandingResponse","description":"Frontend-compatible branding settings."},"CompanyBrandingUpdate":{"properties":{"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logourl"},"logoSizePx":{"anyOf":[{"type":"integer","maximum":104.0,"minimum":56.0},{"type":"null"}],"title":"Logosizepx"},"accentColor":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Accentcolor"},"address":{"anyOf":[{"$ref":"#/components/schemas/CompanyBrandingAddress"},{"type":"null"}]},"defaultMemo":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Defaultmemo"},"paymentInstructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Paymentinstructions"},"emailFooterText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Emailfootertext"},"senderDisplayName":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Senderdisplayname"},"senderReplyToEmail":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Senderreplytoemail"}},"type":"object","title":"CompanyBrandingUpdate","description":"Patch payload for frontend-compatible branding settings."},"CompanyCreate":{"properties":{"name":{"type":"string","title":"Name"},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname"},"entityType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitytype"},"stateOfIncorp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stateofincorp"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}},"type":"object","required":["name"],"title":"CompanyCreate"},"CompanyInviteResponse":{"properties":{"id":{"type":"string","title":"Id"},"invitedEmail":{"type":"string","title":"Invitedemail"},"role":{"type":"string","title":"Role"},"roleId":{"type":"string","title":"Roleid"},"roleDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roledisplayname"},"roleIsSystem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Roleissystem"},"status":{"type":"string","title":"Status"},"invitedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitedbyemail"},"firm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firm"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","invitedEmail","role","roleId","status"],"title":"CompanyInviteResponse","description":"An email-based invitation to a company."},"CompanyMemberResponse":{"properties":{"userId":{"type":"string","title":"Userid"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"role":{"type":"string","title":"Role"},"roleId":{"type":"string","title":"Roleid"},"roleDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roledisplayname"},"roleIsSystem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Roleissystem"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["userId","role","roleId"],"title":"CompanyMemberResponse","description":"A user's membership in a company."},"CompanyMemoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"type":"string","title":"Content"},"importance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importance"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","content"],"title":"CompanyMemoryResponse","description":"Flattened company-memory shape used by the documents UI."},"CompanyNavigationVisibilityResponse":{"properties":{"hiddenItemIds":{"items":{"type":"string"},"type":"array","title":"Hiddenitemids"}},"type":"object","title":"CompanyNavigationVisibilityResponse","description":"Company navigation visibility response."},"CompanyNavigationVisibilityUpdate":{"properties":{"hiddenItemIds":{"items":{"type":"string"},"type":"array","title":"Hiddenitemids"}},"type":"object","title":"CompanyNavigationVisibilityUpdate","description":"Update request for company navigation visibility."},"CompanyProfileUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"businessTypeDetail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Businesstypedetail"},"fundingStage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fundingstage"},"keyMetrics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keymetrics"},"reportPreferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reportpreferences"}},"type":"object","title":"CompanyProfileUpdate","description":"Request model for updating company profile enrichment fields."},"CompanyScheduledJobsResponse":{"properties":{"scheduledJobsEnabled":{"type":"boolean","title":"Scheduledjobsenabled"}},"type":"object","required":["scheduledJobsEnabled"],"title":"CompanyScheduledJobsResponse","description":"Response model for the company-level recurring job gate."},"CompanyScheduledJobsUpdate":{"properties":{"scheduledJobsEnabled":{"type":"boolean","title":"Scheduledjobsenabled"}},"type":"object","required":["scheduledJobsEnabled"],"title":"CompanyScheduledJobsUpdate","description":"Request model for the company-level recurring job gate."},"ComparativeAccountNode":{"properties":{"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"acctNum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acctnum"},"values":{"items":{"type":"number"},"type":"array","title":"Values"},"subtotalValues":{"items":{"type":"number"},"type":"array","title":"Subtotalvalues","default":[]},"depth":{"type":"integer","title":"Depth","default":0},"hasDirectPostings":{"type":"boolean","title":"Hasdirectpostings","default":false},"children":{"items":{"$ref":"#/components/schemas/ComparativeAccountNode"},"type":"array","title":"Children","default":[]},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change"},"changePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Changepct"},"favorable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Favorable"},"subtotalChange":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Subtotalchange"},"subtotalChangePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Subtotalchangepct"},"subtotalFavorable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Subtotalfavorable"}},"type":"object","required":["values"],"title":"ComparativeAccountNode"},"ComparativeBsResponse":{"properties":{"dates":{"items":{"type":"string"},"type":"array","title":"Dates"},"sections":{"items":{"$ref":"#/components/schemas/ComparativeSection"},"type":"array","title":"Sections"},"totalAssetsValues":{"items":{"type":"number"},"type":"array","title":"Totalassetsvalues"},"totalLeValues":{"items":{"type":"number"},"type":"array","title":"Totallevalues"},"reliabilityValues":{"items":{"$ref":"#/components/schemas/StatementReliabilityModel"},"type":"array","title":"Reliabilityvalues","default":[]}},"type":"object","required":["dates","sections","totalAssetsValues","totalLeValues"],"title":"ComparativeBsResponse"},"ComparativePnlResponse":{"properties":{"periods":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Periods"},"sections":{"items":{"$ref":"#/components/schemas/ComparativeSection"},"type":"array","title":"Sections"},"netIncomeValues":{"items":{"type":"number"},"type":"array","title":"Netincomevalues"}},"type":"object","required":["periods","sections","netIncomeValues"],"title":"ComparativePnlResponse"},"ComparativeSection":{"properties":{"name":{"type":"string","title":"Name"},"accounts":{"items":{"$ref":"#/components/schemas/ComparativeAccountNode"},"type":"array","title":"Accounts"},"isSubtotal":{"type":"boolean","title":"Issubtotal","default":false},"values":{"items":{"type":"number"},"type":"array","title":"Values"},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change"},"changePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Changepct"},"favorable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Favorable"}},"type":"object","required":["name","accounts","values"],"title":"ComparativeSection"},"ConcatExpr-Input":{"properties":{"op":{"type":"string","const":"concat","title":"Op"},"args":{"items":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"type":"array","maxItems":20,"minItems":1,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"ConcatExpr"},"ConcatExpr-Output":{"properties":{"op":{"type":"string","const":"concat","title":"Op"},"args":{"items":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"type":"array","maxItems":20,"minItems":1,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"ConcatExpr"},"ConfirmMatchRequest":{"properties":{"proposedMatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchid"}},"type":"object","title":"ConfirmMatchRequest","description":"Request to confirm a match candidate.\n\nReason: POR-26 match candidate flow — user confirms proposed QBO match."},"ConfirmOnboardingCheckoutSessionRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"ConfirmOnboardingCheckoutSessionRequest"},"ConfirmPhoneNumberRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"ConfirmPhoneNumberRequest"},"ConnectedEvidenceCompleteness":{"properties":{"selection":{"type":"string","const":"exact_target_ids","title":"Selection"},"complete":{"type":"boolean","const":true,"title":"Complete"},"targetIds":{"items":{"type":"string"},"type":"array","title":"Targetids"}},"additionalProperties":false,"type":"object","required":["selection","complete","targetIds"],"title":"ConnectedEvidenceCompleteness"},"ConnectionHistoryEntry":{"properties":{"status":{"type":"string","title":"Status"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectedat"}},"type":"object","required":["status"],"title":"ConnectionHistoryEntry"},"ConsolidatedJournalEntry":{"properties":{"year":{"type":"integer","title":"Year"},"month":{"type":"integer","title":"Month"},"lines":{"items":{"$ref":"#/components/schemas/JournalEntryLine"},"type":"array","title":"Lines"},"totalDebits":{"type":"number","title":"Totaldebits"},"totalCredits":{"type":"number","title":"Totalcredits"},"isBalanced":{"type":"boolean","title":"Isbalanced"},"scheduleCount":{"type":"integer","title":"Schedulecount"}},"type":"object","required":["year","month","lines","totalDebits","totalCredits","isBalanced","scheduleCount"],"title":"ConsolidatedJournalEntry","description":"Consolidated journal entry for a month."},"ConsolidationBalanceSheetAccountLine":{"properties":{"masterAccountId":{"type":"string","title":"Masteraccountid"},"accountName":{"type":"string","title":"Accountname"},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountnumber"},"accountType":{"type":"string","title":"Accounttype"},"sourceAmount":{"type":"number","title":"Sourceamount"},"adjustmentAmount":{"type":"number","title":"Adjustmentamount"},"consolidatedAmount":{"type":"number","title":"Consolidatedamount"}},"type":"object","required":["masterAccountId","accountName","accountType","sourceAmount","adjustmentAmount","consolidatedAmount"],"title":"ConsolidationBalanceSheetAccountLine","description":"One parent master-account balance-sheet line."},"ConsolidationBalanceSheetBreakdownAccountLine":{"properties":{"masterAccountId":{"type":"string","title":"Masteraccountid"},"accountName":{"type":"string","title":"Accountname"},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountnumber"},"accountType":{"type":"string","title":"Accounttype"},"memberAmounts":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMemberAmount"},"type":"array","title":"Memberamounts"},"adjustmentAmount":{"type":"number","title":"Adjustmentamount"},"consolidatedAmount":{"type":"number","title":"Consolidatedamount"}},"type":"object","required":["masterAccountId","accountName","accountType","adjustmentAmount","consolidatedAmount"],"title":"ConsolidationBalanceSheetBreakdownAccountLine","description":"One parent master-account Balance Sheet line split by child company."},"ConsolidationBalanceSheetBreakdownReport":{"properties":{"companyId":{"type":"string","title":"Companyid"},"asOfDate":{"type":"string","title":"Asofdate"},"readiness":{"$ref":"#/components/schemas/ConsolidationReadiness"},"members":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMember"},"type":"array","title":"Members"},"sections":{"items":{"$ref":"#/components/schemas/ConsolidationBalanceSheetBreakdownSection"},"type":"array","title":"Sections"},"totalAssets":{"type":"number","title":"Totalassets"},"totalAssetsMemberAmounts":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMemberAmount"},"type":"array","title":"Totalassetsmemberamounts"},"totalAssetsAdjustmentAmount":{"type":"number","title":"Totalassetsadjustmentamount"},"totalLiabilities":{"type":"number","title":"Totalliabilities"},"totalEquity":{"type":"number","title":"Totalequity"},"totalLiabilitiesAndEquity":{"type":"number","title":"Totalliabilitiesandequity"},"totalLiabilitiesAndEquityMemberAmounts":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMemberAmount"},"type":"array","title":"Totalliabilitiesandequitymemberamounts"},"totalLiabilitiesAndEquityAdjustmentAmount":{"type":"number","title":"Totalliabilitiesandequityadjustmentamount"},"isBalanced":{"type":"boolean","title":"Isbalanced"}},"type":"object","required":["companyId","asOfDate","readiness","members","sections","totalAssets","totalAssetsMemberAmounts","totalAssetsAdjustmentAmount","totalLiabilities","totalEquity","totalLiabilitiesAndEquity","totalLiabilitiesAndEquityMemberAmounts","totalLiabilitiesAndEquityAdjustmentAmount","isBalanced"],"title":"ConsolidationBalanceSheetBreakdownReport","description":"Consolidated Balance Sheet with child-company source columns plus adjustments."},"ConsolidationBalanceSheetBreakdownSection":{"properties":{"sectionOrder":{"type":"integer","title":"Sectionorder"},"name":{"type":"string","title":"Name"},"accounts":{"items":{"$ref":"#/components/schemas/ConsolidationBalanceSheetBreakdownAccountLine"},"type":"array","title":"Accounts"},"memberAmounts":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMemberAmount"},"type":"array","title":"Memberamounts"},"adjustmentAmount":{"type":"number","title":"Adjustmentamount"},"total":{"type":"number","title":"Total"}},"type":"object","required":["sectionOrder","name","adjustmentAmount","total"],"title":"ConsolidationBalanceSheetBreakdownSection","description":"One consolidated Balance Sheet section split by child company."},"ConsolidationBalanceSheetReport":{"properties":{"companyId":{"type":"string","title":"Companyid"},"asOfDate":{"type":"string","title":"Asofdate"},"readiness":{"$ref":"#/components/schemas/ConsolidationReadiness"},"sections":{"items":{"$ref":"#/components/schemas/ConsolidationBalanceSheetSection"},"type":"array","title":"Sections"},"totalAssets":{"type":"number","title":"Totalassets"},"totalLiabilities":{"type":"number","title":"Totalliabilities"},"totalEquity":{"type":"number","title":"Totalequity"},"totalLiabilitiesAndEquity":{"type":"number","title":"Totalliabilitiesandequity"},"isBalanced":{"type":"boolean","title":"Isbalanced"}},"type":"object","required":["companyId","asOfDate","readiness","sections","totalAssets","totalLiabilities","totalEquity","totalLiabilitiesAndEquity","isBalanced"],"title":"ConsolidationBalanceSheetReport","description":"Consolidated Balance Sheet compiled from mapped/passthrough member books."},"ConsolidationBalanceSheetSection":{"properties":{"sectionOrder":{"type":"integer","title":"Sectionorder"},"name":{"type":"string","title":"Name"},"accounts":{"items":{"$ref":"#/components/schemas/ConsolidationBalanceSheetAccountLine"},"type":"array","title":"Accounts"},"total":{"type":"number","title":"Total"}},"type":"object","required":["sectionOrder","name","total"],"title":"ConsolidationBalanceSheetSection","description":"One section in a consolidated Balance Sheet."},"ConsolidationBlocker":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"memberCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Membercompanyid"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"}},"type":"object","required":["code","message"],"title":"ConsolidationBlocker","description":"A specific reason a consolidation run is not defensible yet."},"ConsolidationBreakdownMember":{"properties":{"memberCompanyId":{"type":"string","title":"Membercompanyid"},"memberCompanyName":{"type":"string","title":"Membercompanyname"}},"type":"object","required":["memberCompanyId","memberCompanyName"],"title":"ConsolidationBreakdownMember","description":"One direct child-company column in a consolidated statement breakdown."},"ConsolidationBreakdownMemberAmount":{"properties":{"memberCompanyId":{"type":"string","title":"Membercompanyid"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["memberCompanyId","amount"],"title":"ConsolidationBreakdownMemberAmount","description":"One amount for a child-company column."},"ConsolidationEliminationCandidateReport":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"summary":{"$ref":"#/components/schemas/ConsolidationEliminationCandidateSummary"},"exactPnlPairs":{"items":{"$ref":"#/components/schemas/ConsolidationExactPnlEliminationCandidate"},"type":"array","title":"Exactpnlpairs"},"intercompanyAccounts":{"items":{"$ref":"#/components/schemas/ConsolidationIntercompanyAccountSummary"},"type":"array","title":"Intercompanyaccounts"}},"type":"object","required":["companyId","startDate","endDate","summary","exactPnlPairs","intercompanyAccounts"],"title":"ConsolidationEliminationCandidateReport","description":"Read-only elimination candidates for review before adjustment approval."},"ConsolidationEliminationCandidateSide":{"properties":{"reportLineId":{"type":"string","title":"Reportlineid"},"memberCompanyId":{"type":"string","title":"Membercompanyid"},"memberCompanyName":{"type":"string","title":"Membercompanyname"},"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"accountType":{"type":"string","title":"Accounttype"},"postingType":{"type":"string","title":"Postingtype"},"amount":{"type":"number","title":"Amount"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["reportLineId","memberCompanyId","memberCompanyName","accountId","accountName","accountType","postingType","amount"],"title":"ConsolidationEliminationCandidateSide","description":"One side of a possible intercompany elimination candidate."},"ConsolidationEliminationCandidateSummary":{"properties":{"exactPnlPairCount":{"type":"integer","title":"Exactpnlpaircount","default":0},"exactPnlPairAmountTotal":{"type":"number","title":"Exactpnlpairamounttotal","default":0.0},"returnedExactPnlPairCount":{"type":"integer","title":"Returnedexactpnlpaircount","default":0},"returnedExactPnlPairAmountTotal":{"type":"number","title":"Returnedexactpnlpairamounttotal","default":0.0},"intercompanyAccountCount":{"type":"integer","title":"Intercompanyaccountcount","default":0},"intercompanyAbsNetAmountTotal":{"type":"number","title":"Intercompanyabsnetamounttotal","default":0.0},"intercompanyPnlAbsNetAmountTotal":{"type":"number","title":"Intercompanypnlabsnetamounttotal","default":0.0}},"type":"object","title":"ConsolidationEliminationCandidateSummary","description":"Roll-up totals for the read-only elimination evidence set."},"ConsolidationEntityStatus":{"properties":{"memberCompanyId":{"type":"string","title":"Membercompanyid"},"memberCompanyName":{"type":"string","title":"Membercompanyname"},"latestLedgerDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latestledgerdate"},"activePnlAccountCount":{"type":"integer","title":"Activepnlaccountcount","default":0},"unmappedPnlAccountCount":{"type":"integer","title":"Unmappedpnlaccountcount","default":0},"activeAccountCount":{"type":"integer","title":"Activeaccountcount","default":0},"unmappedAccountCount":{"type":"integer","title":"Unmappedaccountcount","default":0},"includedLineByLine":{"type":"boolean","title":"Includedlinebyline","default":false},"blockers":{"items":{"$ref":"#/components/schemas/ConsolidationBlocker"},"type":"array","title":"Blockers"}},"type":"object","required":["memberCompanyId","memberCompanyName"],"title":"ConsolidationEntityStatus","description":"Readiness status for one group member."},"ConsolidationExactPnlEliminationCandidate":{"properties":{"candidateType":{"type":"string","title":"Candidatetype"},"effectiveDate":{"type":"string","title":"Effectivedate"},"amount":{"type":"number","title":"Amount"},"revenueSide":{"$ref":"#/components/schemas/ConsolidationEliminationCandidateSide"},"expenseSide":{"$ref":"#/components/schemas/ConsolidationEliminationCandidateSide"},"rationale":{"type":"string","title":"Rationale"}},"type":"object","required":["candidateType","effectiveDate","amount","revenueSide","expenseSide","rationale"],"title":"ConsolidationExactPnlEliminationCandidate","description":"A same-date, same-amount P&L pair across two group members."},"ConsolidationIntercompanyAccountSummary":{"properties":{"memberCompanyId":{"type":"string","title":"Membercompanyid"},"memberCompanyName":{"type":"string","title":"Membercompanyname"},"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"accountType":{"type":"string","title":"Accounttype"},"totalDebit":{"type":"number","title":"Totaldebit"},"totalCredit":{"type":"number","title":"Totalcredit"},"netDebitAmount":{"type":"number","title":"Netdebitamount"}},"type":"object","required":["memberCompanyId","memberCompanyName","accountId","accountName","accountType","totalDebit","totalCredit","netDebitAmount"],"title":"ConsolidationIntercompanyAccountSummary","description":"Activity summary for accounts that look explicitly intercompany."},"ConsolidationPnlAccountLine":{"properties":{"masterAccountId":{"type":"string","title":"Masteraccountid"},"accountName":{"type":"string","title":"Accountname"},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountnumber"},"accountType":{"type":"string","title":"Accounttype"},"sourceAmount":{"type":"number","title":"Sourceamount"},"adjustmentAmount":{"type":"number","title":"Adjustmentamount"},"consolidatedAmount":{"type":"number","title":"Consolidatedamount"}},"type":"object","required":["masterAccountId","accountName","accountType","sourceAmount","adjustmentAmount","consolidatedAmount"],"title":"ConsolidationPnlAccountLine","description":"One master-COA P&L account line."},"ConsolidationPnlBreakdownAccountLine":{"properties":{"masterAccountId":{"type":"string","title":"Masteraccountid"},"accountName":{"type":"string","title":"Accountname"},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountnumber"},"accountType":{"type":"string","title":"Accounttype"},"memberAmounts":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMemberAmount"},"type":"array","title":"Memberamounts"},"adjustmentAmount":{"type":"number","title":"Adjustmentamount"},"consolidatedAmount":{"type":"number","title":"Consolidatedamount"}},"type":"object","required":["masterAccountId","accountName","accountType","adjustmentAmount","consolidatedAmount"],"title":"ConsolidationPnlBreakdownAccountLine","description":"One parent master-account P&L line split by child company."},"ConsolidationPnlBreakdownReport":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"readiness":{"$ref":"#/components/schemas/ConsolidationReadiness"},"members":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMember"},"type":"array","title":"Members"},"sections":{"items":{"$ref":"#/components/schemas/ConsolidationPnlBreakdownSection"},"type":"array","title":"Sections"},"grossProfit":{"type":"number","title":"Grossprofit"},"operatingIncome":{"type":"number","title":"Operatingincome"},"netIncome":{"type":"number","title":"Netincome"}},"type":"object","required":["companyId","startDate","endDate","readiness","members","sections","grossProfit","operatingIncome","netIncome"],"title":"ConsolidationPnlBreakdownReport","description":"Consolidated P&L with child-company source columns plus adjustments."},"ConsolidationPnlBreakdownSection":{"properties":{"sectionOrder":{"type":"integer","title":"Sectionorder"},"name":{"type":"string","title":"Name"},"accounts":{"items":{"$ref":"#/components/schemas/ConsolidationPnlBreakdownAccountLine"},"type":"array","title":"Accounts"},"memberAmounts":{"items":{"$ref":"#/components/schemas/ConsolidationBreakdownMemberAmount"},"type":"array","title":"Memberamounts"},"adjustmentAmount":{"type":"number","title":"Adjustmentamount"},"total":{"type":"number","title":"Total"},"isSubtotal":{"type":"boolean","title":"Issubtotal","default":false}},"type":"object","required":["sectionOrder","name","adjustmentAmount","total"],"title":"ConsolidationPnlBreakdownSection","description":"One consolidated P&L section split by child company."},"ConsolidationPnlReport":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"readiness":{"$ref":"#/components/schemas/ConsolidationReadiness"},"sections":{"items":{"$ref":"#/components/schemas/ConsolidationPnlSection"},"type":"array","title":"Sections"},"grossProfit":{"type":"number","title":"Grossprofit"},"operatingIncome":{"type":"number","title":"Operatingincome"},"netIncome":{"type":"number","title":"Netincome"}},"type":"object","required":["companyId","startDate","endDate","readiness","sections","grossProfit","operatingIncome","netIncome"],"title":"ConsolidationPnlReport","description":"Consolidated P&L compiled from mapped/passthrough member books and adjustments."},"ConsolidationPnlSection":{"properties":{"sectionOrder":{"type":"integer","title":"Sectionorder"},"name":{"type":"string","title":"Name"},"accounts":{"items":{"$ref":"#/components/schemas/ConsolidationPnlAccountLine"},"type":"array","title":"Accounts"},"total":{"type":"number","title":"Total"},"isSubtotal":{"type":"boolean","title":"Issubtotal","default":false}},"type":"object","required":["sectionOrder","name","total"],"title":"ConsolidationPnlSection","description":"One section in a consolidated P&L."},"ConsolidationReadiness":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"ready":{"type":"boolean","title":"Ready"},"blockers":{"items":{"$ref":"#/components/schemas/ConsolidationBlocker"},"type":"array","title":"Blockers"},"entities":{"items":{"$ref":"#/components/schemas/ConsolidationEntityStatus"},"type":"array","title":"Entities"}},"type":"object","required":["companyId","startDate","endDate","ready","blockers","entities"],"title":"ConsolidationReadiness","description":"Whether a group can compile a consolidated report for a period."},"ControlExpr":{"properties":{"op":{"type":"string","const":"control","title":"Op"},"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key","description":"Control key; in-place editor."}},"additionalProperties":false,"type":"object","required":["op","key"],"title":"ControlExpr"},"ControlOption":{"properties":{"value":{"type":"string","maxLength":120,"minLength":1,"title":"Value"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"}},"additionalProperties":false,"type":"object","required":["value","label"],"title":"ControlOption"},"ControlOptionsFrom":{"properties":{"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref","description":"Live dataRef whose current rows supply the choices."},"valueField":{"type":"string","maxLength":200,"minLength":1,"title":"Valuefield","description":"Row field path whose distinct non-blank values become option values. Use the same field a rowFilter bound to this control compares."},"labelField":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Labelfield","description":"Optional row field path for the visible option label; defaults to valueField."}},"additionalProperties":false,"type":"object","required":["dataRef","valueField"],"title":"ControlOptionsFrom"},"CorrectCommerceSaleRequest":{"properties":{"expectedSourceVersion":{"type":"integer","minimum":1.0,"title":"Expectedsourceversion"},"expectedHoldReasons":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Expectedholdreasons"},"correctionEffectiveDate":{"type":"string","format":"date","title":"Correctioneffectivedate"},"reason":{"type":"string","minLength":1,"title":"Reason"},"idempotencyKey":{"type":"string","minLength":1,"title":"Idempotencykey"}},"additionalProperties":false,"type":"object","required":["expectedSourceVersion","expectedHoldReasons","correctionEffectiveDate","reason","idempotencyKey"],"title":"CorrectCommerceSaleRequest","description":"Exact reviewed snapshot and intent for one append-only correction."},"CorrectCommerceSaleResponse":{"properties":{"correctionId":{"type":"string","title":"Correctionid"},"saleId":{"type":"string","title":"Saleid"},"previousCorrectionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previouscorrectionid"},"correctionSequence":{"type":"integer","title":"Correctionsequence"},"sourceVersion":{"type":"integer","title":"Sourceversion"},"ledgerEventId":{"type":"string","title":"Ledgereventid"},"postingOperationId":{"type":"string","title":"Postingoperationid"},"status":{"type":"string","enum":["corrected","unchanged"],"title":"Status"}},"type":"object","required":["correctionId","saleId","previousCorrectionId","correctionSequence","sourceVersion","ledgerEventId","postingOperationId","status"],"title":"CorrectCommerceSaleResponse","description":"Typed durable proof for one correction or idempotent replay."},"CostPoolAllocationResponse":{"properties":{"id":{"type":"string","title":"Id"},"costPoolId":{"type":"string","title":"Costpoolid"},"devPeriodId":{"type":"string","title":"Devperiodid"},"allocatedAmount":{"type":"number","title":"Allocatedamount","default":0},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","costPoolId","devPeriodId"],"title":"CostPoolAllocationResponse","description":"How a cost pool's capitalizable amount is split across dev periods."},"CostPoolCalculateRequest":{"properties":{"periodMonth":{"type":"string","title":"Periodmonth"}},"type":"object","required":["periodMonth"],"title":"CostPoolCalculateRequest","description":"Request body for cost pool calculation (POR-77).\n\nReason: Accepts month to calculate capitalizable software costs.\nEligible accounts and productivity % come from company configuration."},"CostPoolLineResponse":{"properties":{"id":{"type":"string","title":"Id"},"costPoolId":{"type":"string","title":"Costpoolid"},"accountName":{"type":"string","title":"Accountname"},"glAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glaccountid"},"expenseAmount":{"type":"number","title":"Expenseamount","default":0},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","costPoolId","accountName"],"title":"CostPoolLineResponse","description":"Detail line showing one eligible account's contribution to a cost pool."},"CostPoolListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CostPoolResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CostPoolListResponse","description":"Response for list of cost pools."},"CostPoolResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"periodMonth":{"type":"string","title":"Periodmonth"},"totalEligibleExpenses":{"type":"number","title":"Totaleligibleexpenses","default":0},"productivityPct":{"type":"number","title":"Productivitypct","default":80},"capitalizableAmount":{"type":"number","title":"Capitalizableamount","default":0},"allocationMethod":{"type":"string","title":"Allocationmethod","default":"equal"},"status":{"type":"string","title":"Status","default":"calculated"},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedat"},"reversedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reversedat"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"lines":{"items":{"$ref":"#/components/schemas/CostPoolLineResponse"},"type":"array","title":"Lines"},"allocations":{"items":{"$ref":"#/components/schemas/CostPoolAllocationResponse"},"type":"array","title":"Allocations"}},"type":"object","required":["id","companyId","periodMonth"],"title":"CostPoolResponse","description":"Cost pool header with optional nested lines and allocations."},"CountExpr-Input":{"properties":{"op":{"type":"string","const":"count","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"CountExpr"},"CountExpr-Output":{"properties":{"op":{"type":"string","const":"count","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"CountExpr"},"CreateAccountRequest":{"properties":{"name":{"type":"string","maxLength":256,"minLength":1,"title":"Name"},"accountType":{"type":"string","minLength":1,"title":"Accounttype"},"subType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"acctNum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acctnum"},"description":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Description"},"semanticRoles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Semanticroles"}},"type":"object","required":["name","accountType"],"title":"CreateAccountRequest","description":"Request body to create a new account."},"CreateClosePeriodRequest":{"properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","title":"Period"}},"type":"object","required":["period"],"title":"CreateClosePeriodRequest","description":"Request to create a new close period."},"CreateDepositRequest":{"properties":{"bankTransactionId":{"type":"string","title":"Banktransactionid"},"paymentIds":{"items":{"type":"string"},"type":"array","title":"Paymentids"},"processingFeeAmount":{"type":"number","title":"Processingfeeamount","default":0},"processingFeeAccountId":{"type":"string","title":"Processingfeeaccountid","default":""},"processingFeeAdjustmentAmount":{"type":"number","title":"Processingfeeadjustmentamount","default":0}},"type":"object","required":["bankTransactionId","paymentIds"],"title":"CreateDepositRequest","description":"Request to create a deposit match between a bank transaction and payments."},"CreateDepositResponse":{"properties":{"depositId":{"type":"string","title":"Depositid"},"matchedPayments":{"type":"integer","title":"Matchedpayments"},"processingFee":{"type":"number","title":"Processingfee"},"qboDepositId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbodepositid"}},"type":"object","required":["depositId","matchedPayments","processingFee"],"title":"CreateDepositResponse","description":"Response after creating a deposit."},"CreateInviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"roleId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roleid"},"firm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firm"}},"additionalProperties":false,"type":"object","required":["email"],"title":"CreateInviteRequest","description":"Request to invite a teammate with an optional exact role selection."},"CreateManualJERequest":{"properties":{"entryDate":{"type":"string","title":"Entrydate"},"memo":{"type":"string","title":"Memo"},"lines":{"items":{"$ref":"#/components/schemas/ManualJELineInput"},"type":"array","minItems":2,"title":"Lines"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"supportingDetails":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supportingdetails"},"referenceUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referenceurl"},"supportingDocumentIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supportingdocumentids"}},"additionalProperties":false,"type":"object","required":["entryDate","memo","lines"],"title":"CreateManualJERequest","description":"Request to create a manual journal entry."},"CreateManualJEResponse":{"properties":{"id":{"type":"string","title":"Id"},"memo":{"type":"string","title":"Memo"},"entryDate":{"type":"string","title":"Entrydate"},"status":{"type":"string","title":"Status"},"totalDebits":{"type":"number","title":"Totaldebits"},"totalCredits":{"type":"number","title":"Totalcredits"},"lineCount":{"type":"integer","title":"Linecount"},"supportingDocumentIds":{"items":{"type":"string"},"type":"array","title":"Supportingdocumentids"}},"type":"object","required":["id","memo","entryDate","status","totalDebits","totalCredits","lineCount"],"title":"CreateManualJEResponse","description":"Response after creating a manual journal entry."},"CreateRuleRequest":{"properties":{"ruleName":{"type":"string","title":"Rulename"},"description":{"type":"string","title":"Description"},"counterpartyId":{"type":"string","title":"Counterpartyid"},"counterpartyType":{"type":"string","title":"Counterpartytype"},"categoryAccountId":{"type":"string","title":"Categoryaccountid"},"gateConditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Gateconditions"},"priority":{"type":"integer","title":"Priority","default":100},"currentRuleId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currentruleid"},"acknowledgedExceptionTransactionIds":{"items":{"type":"string"},"type":"array","title":"Acknowledgedexceptiontransactionids"}},"type":"object","required":["ruleName","description","counterpartyId","counterpartyType","categoryAccountId"],"title":"CreateRuleRequest"},"CreateScheduleFromFlagRequest":{"properties":{"title":{"type":"string","title":"Title"},"totalAmount":{"type":"number","title":"Totalamount"},"capitalizeAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Capitalizeamount"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"usefulLifeMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usefullifemonths"},"salvageValue":{"type":"number","title":"Salvagevalue","default":0.0},"recognitionMethod":{"type":"string","title":"Recognitionmethod","default":"straight_line"},"debitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountid"},"debitAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountname"},"creditAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountid"},"creditAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["title","totalAmount","startDate"],"title":"CreateScheduleFromFlagRequest","description":"Request to create a schedule from a flag's suggested values.\n\nReason: POR-61 — user can override any suggested value before creating.\nFields not provided will use the flag's suggested_values as defaults."},"CreateScheduleFromFlagResponse":{"properties":{"scheduleId":{"type":"string","title":"Scheduleid"},"linesCreated":{"type":"integer","title":"Linescreated"},"flag":{"$ref":"#/components/schemas/TransactionFlagResponse"}},"type":"object","required":["scheduleId","linesCreated","flag"],"title":"CreateScheduleFromFlagResponse","description":"Response after creating a schedule from a flag."},"CreateScheduleResponse":{"properties":{"schedule":{"$ref":"#/components/schemas/ScheduleResponse"},"linesCreated":{"type":"integer","title":"Linescreated"}},"type":"object","required":["schedule","linesCreated"],"title":"CreateScheduleResponse","description":"Response after creating a schedule."},"CreditCardBatchOptions":{"properties":{"forceCreate":{"type":"boolean","title":"Forcecreate"},"skipDuplicates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skipduplicates"},"source":{"type":"string","title":"Source","default":"csv_import"}},"additionalProperties":false,"type":"object","required":["forceCreate"],"title":"CreditCardBatchOptions"},"CreditCardBatchRequest":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ResolvedCreditCardRow"},"type":"array","title":"Rows"},"options":{"$ref":"#/components/schemas/CreditCardBatchOptions"},"resolverAudit":{"additionalProperties":true,"type":"object","title":"Resolveraudit","default":{}}},"type":"object","required":["rows","options"],"title":"CreditCardBatchRequest"},"CreditCardImportPreview":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/ParsedCreditCardTransaction"},"type":"array","title":"Transactions"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"stats":{"$ref":"#/components/schemas/CreditCardImportStats"},"sourceFormat":{"type":"string","title":"Sourceformat"},"filename":{"type":"string","title":"Filename"},"cardholders":{"items":{"type":"string"},"type":"array","title":"Cardholders","default":[]},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"detectedAccounts":{"items":{"$ref":"#/components/schemas/DetectedAccount"},"type":"array","title":"Detectedaccounts","default":[]},"formatDetected":{"type":"boolean","title":"Formatdetected","default":true},"fileColumns":{"items":{"type":"string"},"type":"array","title":"Filecolumns","default":[]},"needsColumnMapping":{"type":"boolean","title":"Needscolumnmapping","default":false},"unmappedColumns":{"items":{"type":"string"},"type":"array","title":"Unmappedcolumns","default":[]},"missingRequired":{"items":{"type":"string"},"type":"array","title":"Missingrequired","default":[]},"detectedMapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Detectedmapping","default":{}}},"type":"object","required":["transactions","errors","warnings","stats","sourceFormat","filename"],"title":"CreditCardImportPreview","description":"Result of parsing a credit card CSV file."},"CreditCardImportStats":{"properties":{"totalRows":{"type":"integer","title":"Totalrows","default":0},"validCount":{"type":"integer","title":"Validcount","default":0},"errorCount":{"type":"integer","title":"Errorcount","default":0},"warningCount":{"type":"integer","title":"Warningcount","default":0},"duplicateCount":{"type":"integer","title":"Duplicatecount","default":0},"netNewCount":{"type":"integer","title":"Netnewcount","default":0},"qboOverlapCount":{"type":"integer","title":"Qbooverlapcount","default":0},"porterDuplicateCount":{"type":"integer","title":"Porterduplicatecount","default":0},"fileDuplicateCount":{"type":"integer","title":"Fileduplicatecount","default":0},"totalAmount":{"type":"number","title":"Totalamount","default":0.0},"totalFees":{"type":"number","title":"Totalfees","default":0.0},"cardholderCount":{"type":"integer","title":"Cardholdercount","default":0},"categoryCount":{"type":"integer","title":"Categorycount","default":0},"minDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mindate"},"maxDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maxdate"},"creditCount":{"type":"integer","title":"Creditcount","default":0}},"type":"object","title":"CreditCardImportStats","description":"Statistics for the import preview."},"CreditCardPreviewResponse":{"properties":{"parsed":{"$ref":"#/components/schemas/CreditCardImportPreview"},"resolution":{"$ref":"#/components/schemas/CreditCardResolveResult"}},"type":"object","required":["parsed","resolution"],"title":"CreditCardPreviewResponse","description":"Combined parse + resolve payload returned by /preview.\n\n# Reason: Single payload symmetric to dialog and AI. Dialog renders\n# parsed.transactions + per-row uncertainties + override pickers from\n# rows[]; AI tool returns identical JSON to the LLM."},"CreditCardResolveResult":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ResolvedCreditCardRow"},"type":"array","title":"Rows"},"mappedAccountCount":{"type":"integer","title":"Mappedaccountcount","default":0},"unmappedCategories":{"items":{"type":"string"},"type":"array","title":"Unmappedcategories","default":[]},"autoCreatedAccounts":{"items":{"type":"string"},"type":"array","title":"Autocreatedaccounts","default":[]}},"type":"object","required":["rows"],"title":"CreditCardResolveResult"},"CreditCardStats":{"properties":{"total":{"type":"integer","title":"Total","default":0},"needsReview":{"type":"integer","title":"Needsreview","default":0},"ready":{"type":"integer","title":"Ready","default":0},"posted":{"type":"integer","title":"Posted","default":0},"excluded":{"type":"integer","title":"Excluded","default":0},"aiCategorizationInProgress":{"type":"boolean","title":"Aicategorizationinprogress","default":false},"aiCategorizationPercent":{"type":"integer","title":"Aicategorizationpercent","default":0},"aiCategorizationPhase":{"type":"string","title":"Aicategorizationphase","default":""}},"type":"object","title":"CreditCardStats","description":"Credit card statistics response.\n\nReason: Field names match frontend CreditCardStats type."},"CreditCardTransactionResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"eventType":{"type":"string","title":"Eventtype","default":"credit_card"},"txnDate":{"type":"string","title":"Txndate"},"description":{"type":"string","title":"Description"},"originalDescription":{"type":"string","title":"Originaldescription","default":""},"amount":{"type":"number","title":"Amount"},"isDebit":{"type":"boolean","title":"Isdebit","default":true},"bankAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"},"bankAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountname"},"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"categoryAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountname"},"proposedAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaccountid"},"proposedAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaccountname"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"cardholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardholder"},"status":{"type":"string","title":"Status","default":"needs_review"},"exclusionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclusionreason"},"reviewNotes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewnotes"},"proposedAction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaction"},"proposedMatchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchtype"},"aiReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aireasoning"},"creditCardTransactionType":{"type":"string","title":"Creditcardtransactiontype","default":"charge"},"hasPolicyFlags":{"type":"boolean","title":"Haspolicyflags","default":false},"flagLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flaglabel"},"hasMatchCandidates":{"type":"boolean","title":"Hasmatchcandidates","default":false},"hasLinkedDocuments":{"type":"boolean","title":"Haslinkeddocuments","default":false},"qboTxnId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbotxnid"},"qboTxnType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbotxntype"},"pipelineTrace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pipelinetrace"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["id","companyId","txnDate","description","amount","createdAt","updatedAt"],"title":"CreditCardTransactionResponse","description":"Credit card transaction response matching frontend InboxItem type.\n\nReason: Credit cards tab uses InboxItem format, not BankTransaction."},"CreditCardTransactionsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreditCardTransactionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CreditCardTransactionsListResponse","description":"Response for list of credit card transactions."},"CreditCardWriteResult":{"properties":{"created":{"type":"integer","title":"Created","default":0},"merged":{"type":"integer","title":"Merged","default":0},"duplicates":{"type":"integer","title":"Duplicates","default":0},"errors":{"type":"integer","title":"Errors","default":0},"errorMessages":{"items":{"type":"string"},"type":"array","title":"Errormessages","default":[]},"importBatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importbatchid"},"skippedRows":{"items":{"$ref":"#/components/schemas/SkippedRowDetail"},"type":"array","title":"Skippedrows","default":[]},"unmappedCategories":{"items":{"type":"string"},"type":"array","title":"Unmappedcategories","default":[]},"mappedAccountCount":{"type":"integer","title":"Mappedaccountcount","default":0},"rowResults":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rowresults","default":[]}},"type":"object","title":"CreditCardWriteResult","description":"Symmetric audit returned to dialog and AI."},"CurrentStateScopeSelection":{"properties":{"kind":{"type":"string","const":"current_state","title":"Kind"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"CurrentStateScopeSelection"},"CustomerAgingBuckets":{"properties":{"current":{"type":"number","title":"Current","default":0.0},"days130":{"type":"number","title":"Days130","default":0.0},"days3160":{"type":"number","title":"Days3160","default":0.0},"days6190":{"type":"number","title":"Days6190","default":0.0},"days90Plus":{"type":"number","title":"Days90Plus","default":0.0}},"type":"object","title":"CustomerAgingBuckets","description":"Open A/R for this customer split by days past due."},"CustomerCounterpartyUpdate":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"defaultContactName":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Defaultcontactname"},"defaultContactEmail":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Defaultcontactemail"}},"type":"object","title":"CustomerCounterpartyUpdate","description":"Editable fields from the Counterparties cleanup drawer."},"CustomerCreate":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"defaultBillingContactName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultbillingcontactname"},"defaultBillingContactKind":{"type":"string","title":"Defaultbillingcontactkind","default":"billing"},"defaultBillingContactAddress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Defaultbillingcontactaddress"},"defaultPaymentTerms":{"type":"string","enum":["due_on_receipt","net_7","net_10","net_15","net_30","net_60","net_90","custom"],"title":"Defaultpaymentterms","default":"net_30"},"billingDeliveryMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingdeliverymethod"},"apPlatformName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applatformname"},"apPortalUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apportalurl"},"billingInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billinginstructions"},"qboCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocustomerid"},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomerid"},"externalIds":{"items":{"type":"string"},"type":"array","title":"Externalids"}},"type":"object","required":["name"],"title":"CustomerCreate","description":"Create customer request."},"CustomerDefaultContact":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"},"kind":{"type":"string","title":"Kind","default":"billing"}},"type":"object","required":["email"],"title":"CustomerDefaultContact","description":"Lightweight default-billing-contact summary embedded on a customer row.\n\nReason: Settings → Customers shows contact name/email/type per row; embedding\nthe default contact lets the table render without an N+1 fetch per customer."},"CustomerListResponse":{"properties":{"customers":{"items":{"$ref":"#/components/schemas/CustomerResponse"},"type":"array","title":"Customers"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["customers","total","offset","limit"],"title":"CustomerListResponse","description":"Customer list response with pagination info."},"CustomerMatch":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"confidence":{"type":"number","title":"Confidence","default":0.0},"matchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchtype"}},"type":"object","title":"CustomerMatch","description":"Potential customer match from the database."},"CustomerMerge":{"properties":{"sourceCustomerIds":{"items":{"type":"string"},"type":"array","title":"Sourcecustomerids"},"targetCustomerId":{"type":"string","title":"Targetcustomerid"},"deactivateQboSourceCustomers":{"type":"boolean","title":"Deactivateqbosourcecustomers","default":true}},"type":"object","required":["sourceCustomerIds","targetCustomerId"],"title":"CustomerMerge","description":"Merge customers request."},"CustomerMergeResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"qboCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocustomerid"},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomerid"},"externalIds":{"items":{"type":"string"},"type":"array","title":"Externalids"},"defaultPaymentTerms":{"type":"string","enum":["due_on_receipt","net_7","net_10","net_15","net_30","net_60","net_90","custom"],"title":"Defaultpaymentterms","default":"net_30"},"billingDeliveryMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingdeliverymethod"},"apPlatformName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applatformname"},"apPortalUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apportalurl"},"billingInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billinginstructions"},"defaultBillingContactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultbillingcontactid"},"defaultContact":{"anyOf":[{"$ref":"#/components/schemas/CustomerDefaultContact"},{"type":"null"}]},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"},"totalSubscriptions":{"type":"integer","title":"Totalsubscriptions","default":0},"activeSubscriptions":{"type":"integer","title":"Activesubscriptions","default":0},"totalContractValue":{"type":"number","title":"Totalcontractvalue","default":0},"totalCollected":{"type":"number","title":"Totalcollected","default":0},"qboCleanup":{"anyOf":[{"$ref":"#/components/schemas/QBOCleanupResult"},{"type":"null"}]}},"type":"object","required":["id","companyId","name","createdAt","updatedAt"],"title":"CustomerMergeResponse"},"CustomerRelationshipInvoice":{"properties":{"id":{"type":"string","title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"type":"number","title":"Amount","default":0.0},"amountDue":{"type":"number","title":"Amountdue","default":0.0},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["id"],"title":"CustomerRelationshipInvoice","description":"A single recent invoice row for the drawer activity list."},"CustomerRelationshipPayment":{"properties":{"id":{"type":"string","title":"Id"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"amount":{"type":"number","title":"Amount","default":0.0},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"depositStatus":{"type":"string","title":"Depositstatus","default":"undeposited"}},"type":"object","required":["id"],"title":"CustomerRelationshipPayment","description":"A single recent payment row for the drawer activity list."},"CustomerRelationshipSummary":{"properties":{"customerId":{"type":"string","title":"Customerid"},"customerName":{"type":"string","title":"Customername"},"totalInvoiced":{"type":"number","title":"Totalinvoiced","default":0.0},"totalCollected":{"type":"number","title":"Totalcollected","default":0.0},"totalOutstanding":{"type":"number","title":"Totaloutstanding","default":0.0},"invoiceCount":{"type":"integer","title":"Invoicecount","default":0},"openInvoiceCount":{"type":"integer","title":"Openinvoicecount","default":0},"paymentCount":{"type":"integer","title":"Paymentcount","default":0},"firstInvoiceDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstinvoicedate"},"lastActivityDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastactivitydate"},"aging":{"$ref":"#/components/schemas/CustomerAgingBuckets"},"recentInvoices":{"items":{"$ref":"#/components/schemas/CustomerRelationshipInvoice"},"type":"array","title":"Recentinvoices"},"recentPayments":{"items":{"$ref":"#/components/schemas/CustomerRelationshipPayment"},"type":"array","title":"Recentpayments"}},"type":"object","required":["customerId","customerName"],"title":"CustomerRelationshipSummary","description":"Relationship overview for one customer (headline money + recent activity)."},"CustomerResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"qboCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocustomerid"},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomerid"},"externalIds":{"items":{"type":"string"},"type":"array","title":"Externalids"},"defaultPaymentTerms":{"type":"string","enum":["due_on_receipt","net_7","net_10","net_15","net_30","net_60","net_90","custom"],"title":"Defaultpaymentterms","default":"net_30"},"billingDeliveryMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingdeliverymethod"},"apPlatformName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applatformname"},"apPortalUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apportalurl"},"billingInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billinginstructions"},"defaultBillingContactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultbillingcontactid"},"defaultContact":{"anyOf":[{"$ref":"#/components/schemas/CustomerDefaultContact"},{"type":"null"}]},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"},"totalSubscriptions":{"type":"integer","title":"Totalsubscriptions","default":0},"activeSubscriptions":{"type":"integer","title":"Activesubscriptions","default":0},"totalContractValue":{"type":"number","title":"Totalcontractvalue","default":0},"totalCollected":{"type":"number","title":"Totalcollected","default":0}},"type":"object","required":["id","companyId","name","createdAt","updatedAt"],"title":"CustomerResponse","description":"Customer response with camelCase aliases."},"CustomerStatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"withActiveSubscriptions":{"type":"integer","title":"Withactivesubscriptions"}},"type":"object","required":["total","withActiveSubscriptions"],"title":"CustomerStatsResponse","description":"Customer statistics for the company.\n\nReason: Field names match frontend CustomerStats interface:\n- total (not totalCustomers)\n- withActiveSubscriptions (not customersWithSubscriptions)"},"CustomerSuggestion":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"confidence":{"type":"string","title":"Confidence"},"matchType":{"type":"string","title":"Matchtype"}},"type":"object","required":["id","confidence","matchType"],"title":"CustomerSuggestion","description":"Customer matching suggestion."},"CustomerUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"qboCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocustomerid"},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripecustomerid"},"defaultPaymentTerms":{"anyOf":[{"type":"string","enum":["due_on_receipt","net_7","net_10","net_15","net_30","net_60","net_90","custom"]},{"type":"null"}],"title":"Defaultpaymentterms"},"billingDeliveryMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingdeliverymethod"},"apPlatformName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applatformname"},"apPortalUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apportalurl"},"billingInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billinginstructions"},"externalIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Externalids"}},"type":"object","title":"CustomerUpdate","description":"Update customer request."},"DateControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"date","title":"Type"},"defaultValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultvalue"}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"DateControlSpec"},"DeleteBatchResponse":{"properties":{"deletedCount":{"type":"integer","title":"Deletedcount"},"message":{"type":"string","title":"Message"}},"type":"object","required":["deletedCount","message"],"title":"DeleteBatchResponse","description":"Response for delete import batch."},"DeleteItemResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"DeleteItemResponse","description":"Response for item deletion."},"DeleteManualJEResponse":{"properties":{"id":{"type":"string","title":"Id"},"deletedLineCount":{"type":"integer","title":"Deletedlinecount"}},"type":"object","required":["id","deletedLineCount"],"title":"DeleteManualJEResponse","description":"Response after deleting a draft manual journal entry."},"DeleteRuleRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"DeleteRuleRequest"},"DeletedResponse":{"properties":{"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["deleted"],"title":"DeletedResponse","description":"Response indicating a resource was deleted."},"DepositMatchCandidateResponse":{"properties":{"paymentId":{"type":"string","title":"Paymentid"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"type":"string","title":"Customername"},"amount":{"type":"number","title":"Amount"},"settlementAmount":{"type":"number","title":"Settlementamount"},"feeAmount":{"type":"number","title":"Feeamount","default":0},"netAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Netamount"},"payoutFeeAdjustmentAmount":{"type":"number","title":"Payoutfeeadjustmentamount","default":0},"date":{"type":"string","title":"Date"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"invoiceNumbers":{"items":{"type":"string"},"type":"array","title":"Invoicenumbers"},"matchScore":{"type":"number","title":"Matchscore"},"matchReasons":{"items":{"type":"string"},"type":"array","title":"Matchreasons"}},"type":"object","required":["paymentId","customerName","amount","settlementAmount","date","invoiceNumbers","matchScore","matchReasons"],"title":"DepositMatchCandidateResponse","description":"A payment candidate for matching to a bank deposit."},"DetailedBreakdownItem":{"properties":{"subscriptionId":{"type":"string","title":"Subscriptionid"},"subscriptionName":{"type":"string","title":"Subscriptionname"},"customerName":{"type":"string","title":"Customername"},"contractAmount":{"type":"number","title":"Contractamount"},"subscriptionStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionstartdate"},"subscriptionEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionenddate"},"totalContractDays":{"type":"integer","title":"Totalcontractdays"},"dailyRate":{"type":"number","title":"Dailyrate"},"periodLabel":{"type":"string","title":"Periodlabel"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"overlapStart":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overlapstart"},"overlapEnd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overlapend"},"daysInPeriod":{"type":"integer","title":"Daysinperiod"},"amountRecognized":{"type":"number","title":"Amountrecognized"},"sourceAccount":{"type":"string","title":"Sourceaccount"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"jeStatus":{"type":"string","title":"Jestatus"}},"type":"object","required":["subscriptionId","subscriptionName","customerName","contractAmount","subscriptionStartDate","subscriptionEndDate","totalContractDays","dailyRate","periodLabel","periodStart","periodEnd","overlapStart","overlapEnd","daysInPeriod","amountRecognized","sourceAccount","jeStatus"],"title":"DetailedBreakdownItem","description":"Per-subscription breakdown for detailed view with reconciliation data.\n\nReason: Same reconciliation fields as JournalEntryDetailItem for consistency."},"DetailedBreakdownResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DetailedBreakdownItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"DetailedBreakdownResponse","description":"Detailed breakdown response for per-subscription view."},"DetectedAccount":{"properties":{"name":{"type":"string","title":"Name"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"accountType":{"type":"string","title":"Accounttype","default":"checking"},"transactionCount":{"type":"integer","title":"Transactioncount","default":0}},"type":"object","required":["name"],"title":"DetectedAccount","description":"Account detected from the import file."},"DevPeriodCreate":{"properties":{"projectName":{"type":"string","title":"Projectname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"productivityPct":{"type":"number","title":"Productivitypct","default":80}},"type":"object","required":["projectName","startDate"],"title":"DevPeriodCreate","description":"Create a new development period.\n\nReason: All required fields for development period setup.\nCamelCase aliases for frontend compatibility."},"DevPeriodResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"projectName":{"type":"string","title":"Projectname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"status":{"type":"string","title":"Status","default":"in_progress"},"totalCapitalized":{"type":"number","title":"Totalcapitalized","default":0},"productivityPct":{"type":"number","title":"Productivitypct","default":80},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completedat"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","projectName"],"title":"DevPeriodResponse","description":"Development period record for capitalized software development.\n\nReason: Tracks software projects through 'in_progress' and 'complete'\nstates. Only completed periods begin amortization per ASC 350-40."},"DevPeriodUpdate":{"properties":{"projectName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Projectname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"productivityPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Productivitypct"}},"type":"object","title":"DevPeriodUpdate","description":"Partial update for a development period.\n\nReason: All fields optional for PATCH semantics."},"DigItem":{"properties":{"title":{"type":"string","title":"Title"},"narrative":{"type":"string","title":"Narrative"}},"type":"object","required":["title","narrative"],"title":"DigItem"},"DisconnectBankAccountResponse":{"properties":{"bankAccountId":{"type":"string","title":"Bankaccountid"},"itemId":{"type":"string","title":"Itemid"},"alreadyDisconnected":{"type":"boolean","title":"Alreadydisconnected"},"itemDisconnected":{"type":"boolean","title":"Itemdisconnected"},"message":{"type":"string","title":"Message"}},"type":"object","required":["bankAccountId","itemId","alreadyDisconnected","itemDisconnected","message"],"title":"DisconnectBankAccountResponse","description":"Response for a single-account disconnect (POR-2690)."},"DisconnectPhoneNumberRequest":{"properties":{"phoneNumber":{"type":"string","title":"Phonenumber"}},"type":"object","required":["phoneNumber"],"title":"DisconnectPhoneNumberRequest"},"DisplayPriorityApplyRequest":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/DisplayPriorityAssignment"},"type":"array","title":"Assignments"},"source":{"type":"string","enum":["ai_suggested","manual"],"title":"Source","default":"manual"}},"type":"object","required":["assignments"],"title":"DisplayPriorityApplyRequest","description":"Request body for applying display-priority metadata."},"DisplayPriorityApplyResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/DisplayPriorityResult"},"type":"array","title":"Results"},"summary":{"$ref":"#/components/schemas/DisplayPrioritySummary"}},"type":"object","required":["results","summary"],"title":"DisplayPriorityApplyResponse","description":"Response for display-priority application."},"DisplayPriorityAssignment":{"properties":{"accountId":{"type":"string","title":"Accountid"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"}},"type":"object","required":["accountId","priority"],"title":"DisplayPriorityAssignment","description":"Display-order assignment for one account."},"DisplayPriorityResult":{"properties":{"accountId":{"type":"string","title":"Accountid"},"success":{"type":"boolean","title":"Success"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["accountId","success","priority","source"],"title":"DisplayPriorityResult","description":"Result for one display-priority assignment."},"DisplayPrioritySuggestRequest":{"properties":{"trailingDays":{"type":"integer","maximum":730.0,"minimum":1.0,"title":"Trailingdays","default":90}},"type":"object","title":"DisplayPrioritySuggestRequest","description":"Request body for smart display-priority suggestions."},"DisplayPrioritySuggestResponse":{"properties":{"suggestions":{"items":{"$ref":"#/components/schemas/DisplayPrioritySuggestionResponse"},"type":"array","title":"Suggestions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["suggestions","total"],"title":"DisplayPrioritySuggestResponse","description":"Suggested display priorities for review before apply."},"DisplayPrioritySuggestionResponse":{"properties":{"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"currentPriority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Currentpriority"},"currentSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currentsource"},"suggestedPriority":{"type":"integer","title":"Suggestedpriority"},"parentQboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentqboaccountid"},"score":{"type":"number","title":"Score"},"recentTransactionCount":{"type":"integer","title":"Recenttransactioncount"},"recentAbsoluteAmount":{"type":"number","title":"Recentabsoluteamount"},"allTimeAbsoluteAmount":{"type":"number","title":"Alltimeabsoluteamount"},"lastActivityDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastactivitydate"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["accountId","accountName","currentPriority","currentSource","suggestedPriority","parentQboAccountId","score","recentTransactionCount","recentAbsoluteAmount","allTimeAbsoluteAmount","lastActivityDate","reason"],"title":"DisplayPrioritySuggestionResponse","description":"One suggested account display priority."},"DisplayPrioritySummary":{"properties":{"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["succeeded","failed"],"title":"DisplayPrioritySummary","description":"Summary counts for display-priority application."},"DivExpr-Input":{"properties":{"op":{"type":"string","const":"div","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"DivExpr"},"DivExpr-Output":{"properties":{"op":{"type":"string","const":"div","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"DivExpr"},"DocumentDetail":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"filename":{"type":"string","title":"Filename"},"originalFilename":{"type":"string","title":"Originalfilename"},"filetype":{"type":"string","title":"Filetype"},"filesize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filesize"},"storageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storageurl"},"openaiFileId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Openaifileid"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"textExtracted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Textextracted"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"source":{"type":"string","title":"Source","default":"ui"},"createdVia":{"type":"string","title":"Createdvia","default":"server_upload"},"status":{"type":"string","title":"Status"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"factsExtracted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Factsextracted"},"uploadedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploadedbyuserid"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"lastReviewedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastreviewedat"},"uploadedAt":{"type":"string","title":"Uploadedat"},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processedat"},"extractionSummary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extractionsummary"}},"type":"object","required":["id","companyId","filename","originalFilename","filetype","category","status","uploadedAt"],"title":"DocumentDetail","description":"Full document including text_extracted."},"DocumentDownloadResponse":{"properties":{"url":{"type":"string","title":"Url"},"expiresInSeconds":{"type":"integer","title":"Expiresinseconds"}},"type":"object","required":["url","expiresInSeconds"],"title":"DocumentDownloadResponse","description":"Signed URL payload for opening or downloading a document."},"DocumentListItem":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"filename":{"type":"string","title":"Filename"},"originalFilename":{"type":"string","title":"Originalfilename"},"filetype":{"type":"string","title":"Filetype"},"filesize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filesize"},"storageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storageurl"},"openaiFileId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Openaifileid"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source":{"type":"string","title":"Source","default":"ui"},"createdVia":{"type":"string","title":"Createdvia","default":"server_upload"},"status":{"type":"string","title":"Status"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"factsExtracted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Factsextracted"},"uploadedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploadedbyuserid"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"lastReviewedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastreviewedat"},"uploadedAt":{"type":"string","title":"Uploadedat"},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processedat"},"extractionSummary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extractionsummary"}},"type":"object","required":["id","companyId","filename","originalFilename","filetype","category","status","uploadedAt"],"title":"DocumentListItem","description":"Document summary without text_extracted (for list views)."},"DocumentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"DocumentListResponse"},"DocumentStatusResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processedat"},"extractionSummary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extractionsummary"}},"type":"object","required":["id","status"],"title":"DocumentStatusResponse","description":"Lightweight status check for extraction polling."},"DocumentTabRelevance":{"properties":{"internal":{"$ref":"#/components/schemas/NavigationSurfaceState"},"journal":{"$ref":"#/components/schemas/NavigationSurfaceState"},"investor":{"$ref":"#/components/schemas/NavigationSurfaceState"}},"type":"object","required":["internal","journal","investor"],"title":"DocumentTabRelevance","description":"Documents page tabs keyed by the frontend tab ids."},"EmailConnectionConnectRequest":{"properties":{"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectionid"}},"type":"object","title":"EmailConnectionConnectRequest"},"EmailConnectionConnectResponse":{"properties":{"authUrl":{"type":"string","title":"Authurl"},"state":{"type":"string","title":"State"}},"type":"object","required":["authUrl","state"],"title":"EmailConnectionConnectResponse"},"EmailConnectionPublic":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"emailAddress":{"type":"string","title":"Emailaddress"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"status":{"type":"string","title":"Status"},"connected":{"type":"boolean","title":"Connected"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncedat"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"authStatus":{"type":"string","title":"Authstatus"},"syncStatus":{"type":"string","title":"Syncstatus"},"syncErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncerrorcode"},"syncErrorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncerrormessage"},"gmailWatchStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gmailwatchstatus"},"credentialCleanupStatus":{"type":"string","title":"Credentialcleanupstatus"},"credentialCleanupErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentialcleanuperrorcode"},"credentialCleanupErrorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentialcleanuperrormessage"},"subscriptionCleanupStatus":{"type":"string","title":"Subscriptioncleanupstatus"},"subscriptionCleanupErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptioncleanuperrorcode"},"subscriptionCleanupErrorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptioncleanuperrormessage"},"microsoftSubscriptionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Microsoftsubscriptionstatus"},"microsoftSubscriptionExpiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Microsoftsubscriptionexpiresat"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","provider","emailAddress","status","connected","authStatus","syncStatus","credentialCleanupStatus","subscriptionCleanupStatus"],"title":"EmailConnectionPublic"},"EmailConnectionStatusResponse":{"properties":{"connectionHistory":{"items":{"$ref":"#/components/schemas/ConnectionHistoryEntry"},"type":"array","title":"Connectionhistory","default":[]},"provider":{"type":"string","title":"Provider"},"name":{"type":"string","title":"Name"},"connected":{"type":"boolean","title":"Connected"},"status":{"type":"string","title":"Status"},"connectAvailable":{"type":"boolean","title":"Connectavailable"},"connectUnavailableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectunavailablereason"},"connections":{"items":{"$ref":"#/components/schemas/EmailConnectionPublic"},"type":"array","title":"Connections"}},"type":"object","required":["provider","name","connected","status","connectAvailable","connections"],"title":"EmailConnectionStatusResponse"},"EmailRouteRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"EmailRouteRequest"},"EmailRouteResponse":{"properties":{"route":{"type":"string","title":"Route"}},"type":"object","required":["route"],"title":"EmailRouteResponse"},"EmptyStateBlock":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"emptyState","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Body"}},"additionalProperties":false,"type":"object","required":["type","id","title"],"title":"EmptyStateBlock"},"EnsureCloseItemGoalConversationRequest":{"properties":{"closeRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closerunid"}},"type":"object","title":"EnsureCloseItemGoalConversationRequest","description":"Request for opening a close-item goal conversation."},"EntityFieldChange":{"properties":{"id":{"type":"string","title":"Id"},"entityType":{"type":"string","title":"Entitytype"},"entityId":{"type":"string","title":"Entityid"},"fieldName":{"type":"string","title":"Fieldname"},"previousValue":{"anyOf":[{},{"type":"null"}],"title":"Previousvalue"},"newValue":{"anyOf":[{},{"type":"null"}],"title":"Newvalue"},"previousDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previousdisplayname"},"newDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newdisplayname"},"modifiedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modifiedby"},"modifiedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modifiedbyemail"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"source":{"type":"string","title":"Source"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","entityType","entityId","fieldName","modifiedAt","source"],"title":"EntityFieldChange","description":"Modification-shaped field-change item for existing drawer contracts."},"EntityFieldChangeHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EntityFieldChange"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"EntityFieldChangeHistoryResponse","description":"Paginated field-change history response."},"EstimatedCostGap":{"properties":{"source":{"type":"string","title":"Source"},"model":{"type":"string","title":"Model"},"serviceTier":{"type":"string","title":"Servicetier"},"inputTokens":{"type":"integer","title":"Inputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"latestAt":{"type":"string","title":"Latestat"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["source","model","serviceTier","inputTokens","outputTokens","latestAt","calls"],"title":"EstimatedCostGap"},"EvaluateRequest":{"properties":{"transactionIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transactionids"},"transactionType":{"type":"string","title":"Transactiontype","default":"bank_transaction"}},"type":"object","title":"EvaluateRequest","description":"Request to trigger flag evaluation on transactions.\n\nReason: transaction_ids is optional — if None, evaluates all pending transactions."},"EvaluateResponse":{"properties":{"flagsCreated":{"type":"integer","title":"Flagscreated"},"message":{"type":"string","title":"Message"}},"type":"object","required":["flagsCreated","message"],"title":"EvaluateResponse","description":"Response after flag evaluation."},"EvaluateScheduleFlagsRequest":{"properties":{"billIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Billids"}},"type":"object","title":"EvaluateScheduleFlagsRequest","description":"Request body for evaluating schedule flags on bills.\n\nReason: POR-238 — Optional list of bill IDs to evaluate. If omitted,\nevaluates the most recent 500 unflagged bills."},"EvaluateScheduleFlagsResponse":{"properties":{"flagsCreated":{"type":"integer","title":"Flagscreated"},"documentReviewBillCount":{"type":"integer","title":"Documentreviewbillcount","default":0},"documentReviewBatchesQueued":{"type":"integer","title":"Documentreviewbatchesqueued","default":0}},"type":"object","required":["flagsCreated"],"title":"EvaluateScheduleFlagsResponse","description":"Response from schedule flag evaluation.\n\nReason: POR-238 — Returns the count of new flags created so the frontend\ncan show a toast and refresh the bills list. POR-1561 adds queued\nsource-document review counts because attachment-backed prepaid detection is\nasynchronous and book-neutral."},"ExchangeTokenRequest":{"properties":{"publicToken":{"type":"string","title":"Publictoken"},"institutionId":{"type":"string","title":"Institutionid"},"institutionName":{"type":"string","title":"Institutionname"},"accounts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Accounts"},"syncStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncstartdate"}},"type":"object","required":["publicToken","institutionId","institutionName"],"title":"ExchangeTokenRequest","description":"Request body for public token exchange."},"ExchangeTokenResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"itemId":{"type":"string","title":"Itemid"},"accounts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Accounts"},"mappingResult":{"anyOf":[{"$ref":"#/components/schemas/BankAccountGlMappingResolutionResponse"},{"type":"null"}]}},"type":"object","required":["success","itemId","accounts"],"title":"ExchangeTokenResponse","description":"Response for successful token exchange."},"ExcludeResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"ExcludeResponse","description":"Response for exclude action."},"ExcludeUnifiedJERequest":{"properties":{"entryId":{"type":"string","title":"Entryid"},"expectedTotalDebits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Expectedtotaldebits"},"expectedTotalCredits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Expectedtotalcredits"},"expectedEntryCount":{"type":"integer","exclusiveMinimum":0.0,"title":"Expectedentrycount"},"reason":{"type":"string","minLength":1,"title":"Reason"}},"type":"object","required":["entryId","expectedTotalDebits","expectedTotalCredits","expectedEntryCount","reason"],"title":"ExcludeUnifiedJERequest","description":"Request to exclude a virtual computed period journal entry."},"ExcludeUnifiedJEResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"sourceType":{"type":"string","title":"Sourcetype"},"period":{"type":"string","title":"Period"},"exclusionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclusionid"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"totalDebits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totaldebits"},"totalCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalcredits"},"entryCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entrycount"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"},"errorDetails":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Errordetails"}},"type":"object","required":["success","sourceType","period"],"title":"ExcludeUnifiedJEResponse","description":"Response after excluding a virtual computed period journal entry."},"ExecuteProposalBatchItemResponse":{"properties":{"proposalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalid"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"success":{"type":"boolean","title":"Success"},"response":{"anyOf":[{"$ref":"#/components/schemas/ExecuteProposalResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ExecuteProposalBatchItemResponse","description":"Result for one proposal inside an approve-all batch."},"ExecuteProposalBatchRequest":{"properties":{"proposals":{"items":{"$ref":"#/components/schemas/ExecuteProposalRequest"},"type":"array","title":"Proposals"}},"type":"object","title":"ExecuteProposalBatchRequest","description":"Request body for executing a grouped approval plan."},"ExecuteProposalBatchResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"results":{"items":{"$ref":"#/components/schemas/ExecuteProposalBatchItemResponse"},"type":"array","title":"Results"},"continuationRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuationrunid"},"continuationRunPurpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuationrunpurpose"}},"type":"object","required":["success"],"title":"ExecuteProposalBatchResponse","description":"Response from executing a grouped approval plan."},"ExecuteProposalRequest":{"properties":{"action":{"type":"string","title":"Action"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotencykey"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"proposalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalid"},"proposalFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalfingerprint"},"proposalEntity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalentity"},"proposalMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalmessage"},"proposalSideEffects":{"items":{"type":"string"},"type":"array","title":"Proposalsideeffects"},"approvalExecution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Approvalexecution"},"approvalReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approvalreason"},"continueAfterApproval":{"type":"boolean","title":"Continueafterapproval","default":false}},"type":"object","required":["action","params"],"title":"ExecuteProposalRequest","description":"Request body for re-running an AI mutation after the user approves it.\n\nReason: The chat assistant returns a `needs_approval` envelope when a\nmutation tool is called in \"ask\" mode without `approved=true`. The\nfrontend renders an approval card and, on Approve, POSTs the original\n`action` and `params` here so the backend re-dispatches the same tool\nwith `approved=true`. The originating conversation/proposal fields make\nthe execution result part of the durable transcript; visible chat UI state\nmust be reconstructable from chat_messages history."},"ExecuteProposalResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"action":{"type":"string","title":"Action"},"result":{"anyOf":[{},{"type":"null"}],"title":"Result"},"verification":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Verification"},"receipt":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Receipt"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"stillRunning":{"type":"boolean","title":"Stillrunning","default":false},"conversationMessage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Conversationmessage"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imageurl"},"continuationRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuationrunid"},"continuationRunPurpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continuationrunpurpose"}},"type":"object","required":["success","action"],"title":"ExecuteProposalResponse","description":"Response from a successful approved-mutation dispatch."},"ExplorationCanvasBlock-Input":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"explorationCanvas","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"ariaLabel":{"type":"string","maxLength":160,"minLength":1,"title":"Arialabel"},"nodeDataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Nodedataref"},"node":{"$ref":"#/components/schemas/ExplorationNodeBinding-Input"},"edgeDataRef":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Edgedataref"},"edge":{"anyOf":[{"$ref":"#/components/schemas/ExplorationEdgeBinding-Input"},{"type":"null"}]},"height":{"type":"string","enum":["compact","standard","tall","fill"],"title":"Height","default":"standard"},"emptyState":{"anyOf":[{"$ref":"#/components/schemas/ExplorationCanvasEmptyStateSpec"},{"type":"null"}]},"showMiniMap":{"type":"boolean","title":"Showminimap","default":false},"initialZoom":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.25},{"type":"null"}],"title":"Initialzoom"},"focusNodeId":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Focusnodeid"},"focusTier":{"type":"string","enum":["context","detail"],"title":"Focustier","default":"context"}},"additionalProperties":false,"type":"object","required":["type","id","ariaLabel","nodeDataRef","node"],"title":"ExplorationCanvasBlock"},"ExplorationCanvasBlock-Output":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"explorationCanvas","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"ariaLabel":{"type":"string","maxLength":160,"minLength":1,"title":"Arialabel"},"nodeDataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Nodedataref"},"node":{"$ref":"#/components/schemas/ExplorationNodeBinding-Output"},"edgeDataRef":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Edgedataref"},"edge":{"anyOf":[{"$ref":"#/components/schemas/ExplorationEdgeBinding-Output"},{"type":"null"}]},"height":{"type":"string","enum":["compact","standard","tall","fill"],"title":"Height","default":"standard"},"emptyState":{"anyOf":[{"$ref":"#/components/schemas/ExplorationCanvasEmptyStateSpec"},{"type":"null"}]},"showMiniMap":{"type":"boolean","title":"Showminimap","default":false},"initialZoom":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.25},{"type":"null"}],"title":"Initialzoom"},"focusNodeId":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Focusnodeid"},"focusTier":{"type":"string","enum":["context","detail"],"title":"Focustier","default":"context"}},"additionalProperties":false,"type":"object","required":["type","id","ariaLabel","nodeDataRef","node"],"title":"ExplorationCanvasBlock"},"ExplorationCanvasEmptyStateSpec":{"properties":{"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"additionalProperties":false,"type":"object","required":["title"],"title":"ExplorationCanvasEmptyStateSpec"},"ExplorationEdgeBinding-Input":{"properties":{"id":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Id","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"source":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Source","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"target":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Target","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"label":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Label"},"tone":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Tone"},"directed":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Directed"}},"additionalProperties":false,"type":"object","required":["id","source","target"],"title":"ExplorationEdgeBinding"},"ExplorationEdgeBinding-Output":{"properties":{"id":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Id","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"source":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Source","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"target":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Target","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"label":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Label"},"tone":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Tone"},"directed":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Directed"}},"additionalProperties":false,"type":"object","required":["id","source","target"],"title":"ExplorationEdgeBinding"},"ExplorationNodeBinding-Input":{"properties":{"id":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Id","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"x":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"X","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"y":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Y","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"kicker":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Kicker"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Value"},"secondary":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Secondary"},"details":{"items":{"$ref":"#/components/schemas/ExplorationNodeDetailSpec-Input"},"type":"array","maxItems":8,"title":"Details"},"tone":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Tone"},"disabled":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Disabled"}},"additionalProperties":false,"type":"object","required":["id","x","y","label"],"title":"ExplorationNodeBinding"},"ExplorationNodeBinding-Output":{"properties":{"id":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Id","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"x":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"X","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"y":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Y","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"kicker":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Kicker"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Value"},"secondary":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Secondary"},"details":{"items":{"$ref":"#/components/schemas/ExplorationNodeDetailSpec-Output"},"type":"array","maxItems":8,"title":"Details"},"tone":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Tone"},"disabled":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Disabled"}},"additionalProperties":false,"type":"object","required":["id","x","y","label"],"title":"ExplorationNodeBinding"},"ExplorationNodeDetailSpec-Input":{"properties":{"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"tone":{"anyOf":[{"type":"string","enum":["neutral","green","warning","error"]},{"type":"null"}],"title":"Tone"}},"additionalProperties":false,"type":"object","required":["label","value"],"title":"ExplorationNodeDetailSpec"},"ExplorationNodeDetailSpec-Output":{"properties":{"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"tone":{"anyOf":[{"type":"string","enum":["neutral","green","warning","error"]},{"type":"null"}],"title":"Tone"}},"additionalProperties":false,"type":"object","required":["label","value"],"title":"ExplorationNodeDetailSpec"},"ExtractedLineItem":{"properties":{"description":{"type":"string","title":"Description"},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity"},"unitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unitprice"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["description","amount"],"title":"ExtractedLineItem","description":"Line item extracted from bill PDF."},"FieldExpr":{"properties":{"op":{"type":"string","const":"field","title":"Op"},"path":{"type":"string","maxLength":200,"minLength":1,"title":"Path"}},"additionalProperties":false,"type":"object","required":["op","path"],"title":"FieldExpr"},"FinalizeAuditDocumentUploadRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"contentType":{"type":"string","maxLength":255,"title":"Contenttype","default":"application/octet-stream"},"sizeBytes":{"type":"integer","minimum":0.0,"title":"Sizebytes"}},"type":"object","required":["filename","sizeBytes"],"title":"FinalizeAuditDocumentUploadRequest","description":"Metadata needed to deterministically recover the prepared Storage path."},"Finding":{"properties":{"metric":{"type":"string","title":"Metric"},"label":{"type":"string","title":"Label"},"narrative":{"type":"string","title":"Narrative"},"sentiment":{"type":"string","enum":["positive","neutral","caution","concerning"],"title":"Sentiment","default":"neutral"}},"type":"object","required":["metric","label","narrative"],"title":"Finding"},"FixedDateAnchor":{"properties":{"kind":{"type":"string","const":"fixed","title":"Kind"},"date":{"type":"string","format":"date","title":"Date"}},"additionalProperties":false,"type":"object","required":["kind","date"],"title":"FixedDateAnchor"},"FixedDateExpression":{"properties":{"kind":{"type":"string","const":"fixed","title":"Kind"},"date":{"type":"string","format":"date","title":"Date"}},"additionalProperties":false,"type":"object","required":["kind","date"],"title":"FixedDateExpression"},"FlagListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TransactionFlagResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"FlagListResponse","description":"Response for list of flags."},"FlatTableResponse":{"properties":{"accountType":{"type":"string","title":"Accounttype"},"period":{"type":"string","title":"Period"},"rows":{"items":{"$ref":"#/components/schemas/FlatTableRow"},"type":"array","title":"Rows"},"totals":{"$ref":"#/components/schemas/FlatTableRow"}},"type":"object","required":["accountType","period","rows","totals"],"title":"FlatTableResponse","description":"Flat table view of rollforward by subscription."},"FlatTableRow":{"properties":{"subscriptionId":{"type":"string","title":"Subscriptionid"},"customerName":{"type":"string","title":"Customername"},"contractAmount":{"type":"number","title":"Contractamount"},"recognitionMode":{"type":"string","title":"Recognitionmode"},"beginningBalance":{"type":"number","title":"Beginningbalance"},"additions":{"type":"number","title":"Additions"},"recognition":{"type":"number","title":"Recognition"},"endingBalance":{"type":"number","title":"Endingbalance"}},"type":"object","required":["subscriptionId","customerName","contractAmount","recognitionMode","beginningBalance","additions","recognition","endingBalance"],"title":"FlatTableRow","description":"A row in the flat rollforward table, per subscription."},"ForecastViewResponse":{"properties":{"state":{"type":"string","title":"State"},"scenarioId":{"type":"string","title":"Scenarioid"},"runId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runid"},"forecast":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Forecast"},"sections":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sections"},"legacyFallback":{"type":"boolean","title":"Legacyfallback"}},"type":"object","required":["state","scenarioId","sections","legacyFallback"],"title":"ForecastViewResponse"},"FormatExpr-Input":{"properties":{"op":{"type":"string","const":"format","title":"Op"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format","description":"Format value for text concat."}},"additionalProperties":false,"type":"object","required":["op","value","format"],"title":"FormatExpr"},"FormatExpr-Output":{"properties":{"op":{"type":"string","const":"format","title":"Op"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format","description":"Format value for text concat."}},"additionalProperties":false,"type":"object","required":["op","value","format"],"title":"FormatExpr"},"GeneralLedgerResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/GlAccountDetail"},"type":"array","title":"Accounts"}},"type":"object","required":["accounts"],"title":"GeneralLedgerResponse"},"GenerateFeeEntriesResponse":{"properties":{"generated":{"type":"integer","title":"Generated"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"type":"integer","title":"Errors"},"totalFeeAmount":{"type":"number","title":"Totalfeeamount"}},"type":"object","required":["generated","skipped","errors","totalFeeAmount"],"title":"GenerateFeeEntriesResponse","description":"Response from processing fee JE generation."},"GeneratedArtifactActivityEvent":{"properties":{"id":{"type":"string","title":"Id"},"occurredAt":{"type":"string","format":"date-time","title":"Occurredat"},"status":{"type":"string","title":"Status"},"summary":{"type":"string","title":"Summary"},"actorLabel":{"type":"string","title":"Actorlabel"},"actionSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actionsource"},"actionType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actiontype"},"entityType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitytype"},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entityid"},"entityLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitylabel"},"fieldChanges":{"items":{"$ref":"#/components/schemas/GeneratedArtifactActivityFieldChange"},"type":"array","title":"Fieldchanges"},"effectCount":{"type":"integer","title":"Effectcount","default":0},"sourceContext":{"anyOf":[{"$ref":"#/components/schemas/GeneratedArtifactActivitySourceContext"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"traceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Traceid"}},"type":"object","required":["id","occurredAt","status","summary","actorLabel"],"title":"GeneratedArtifactActivityEvent"},"GeneratedArtifactActivityFieldChange":{"properties":{"fieldName":{"type":"string","title":"Fieldname"},"previousValue":{"anyOf":[{},{"type":"null"}],"title":"Previousvalue"},"newValue":{"anyOf":[{},{"type":"null"}],"title":"Newvalue"}},"type":"object","required":["fieldName"],"title":"GeneratedArtifactActivityFieldChange"},"GeneratedArtifactActivityRequest":{"properties":{"sourceToken":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Sourcetoken"},"runtimeContext":{"additionalProperties":true,"type":"object","title":"Runtimecontext"},"selections":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}]},"type":"object","maxProperties":20,"title":"Selections"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":50},"summaryMode":{"type":"string","enum":["ai","system"],"title":"Summarymode","default":"ai"}},"additionalProperties":false,"type":"object","title":"GeneratedArtifactActivityRequest"},"GeneratedArtifactActivitySourceContext":{"properties":{"kind":{"type":"string","title":"Kind"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"triggerEvent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggerevent"},"emailFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailfrom"},"emailSubject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailsubject"},"mutationReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mutationreason"},"automationOutputSummary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Automationoutputsummary"},"sourceEventCount":{"type":"integer","title":"Sourceeventcount","default":0}},"type":"object","required":["kind"],"title":"GeneratedArtifactActivitySourceContext"},"GeneratedArtifactActivitySummary":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"sourceToken":{"type":"string","title":"Sourcetoken"},"windowStartedAt":{"type":"string","format":"date-time","title":"Windowstartedat"},"windowEndedAt":{"type":"string","format":"date-time","title":"Windowendedat"},"summary":{"type":"string","title":"Summary"},"highlights":{"items":{"type":"string"},"type":"array","title":"Highlights"},"summaryGeneratedBy":{"type":"string","enum":["ai","system"],"title":"Summarygeneratedby","default":"system"},"eventCount":{"type":"integer","title":"Eventcount","default":0},"scopedRecordCount":{"type":"integer","title":"Scopedrecordcount","default":0},"dataRefCount":{"type":"integer","title":"Datarefcount","default":0},"events":{"items":{"$ref":"#/components/schemas/GeneratedArtifactActivityEvent"},"type":"array","title":"Events"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["artifactId","sourceToken","windowStartedAt","windowEndedAt","summary"],"title":"GeneratedArtifactActivitySummary"},"GeneratedArtifactAuthorReport":{"properties":{"changeSummary":{"type":"string","maxLength":1000,"title":"Changesummary","description":"Brief summary for the calling assistant of what the authoring run changed or created. Keep this about the artifact work, not a message to the user.","default":""},"verificationNotes":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Verificationnotes","description":"Checks the authoring run performed or evidence it considered. Include only notes useful for the calling assistant's next decision."},"openIssues":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Openissues","description":"Unresolved issues, limitations, missing data, or visual risks the calling assistant should account for before responding."},"clarifyingQuestions":{"items":{"type":"string"},"type":"array","maxItems":5,"title":"Clarifyingquestions","description":"Questions that require user judgment or missing requirements. Leave empty when the artifact request is complete enough to proceed."}},"additionalProperties":false,"type":"object","title":"GeneratedArtifactAuthorReport"},"GeneratedArtifactAuthorSubmission":{"properties":{"artifactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifactid"},"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Artifact-level description rendered directly below the artifact title. Use this for artifact-wide context instead of a text-only element."},"summary":{"type":"string","maxLength":1000,"title":"Summary","default":""},"isDefault":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isdefault","description":"Optional company-level Artifact Canvas landing preference. Set true to make this artifact the default when no artifact route selection is present; omit to preserve the current preference; set false only to clear this artifact as default."},"investorVisible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Investorvisible","description":"Optional Investor Portal visibility flag for this artifact. Set true to make the published artifact visible to investor users; omit to preserve the current visibility; set false to hide it from investors. Multiple artifacts may be investor visible."},"spec":{"$ref":"#/components/schemas/ArtifactSpec-Input","description":"Complete controlled JSON spec for the artifact. Porter owns all rendered HTML, CSS, JavaScript, chart internals, table sizing, tooltips, control behavior, and state persistence. Use the controlled artifact contract with dataMode, an explicit layout tree, closed contract primitives including tabs, configured interaction details for metric and table drill-through, and presentation expressions only. Artifacts that read Porter data must use dataMode live, declare dataRefs, and bind display blocks to fields returned by matching ontologyDataSources. Manual/no-data artifacts must use dataMode standalone and must not declare dataRefs. Field expressions must bind to fields returned by their dataRefs. List blocks must declare display formats for secondary and badge expressions because lists do not inherit table-column kind metadata. Text concatenation must wrap aggregate or math expressions with the format expression before embedding them in copy. Table blocks must declare initialSort so row order is deterministic before users click sortable headers, and long row sets should declare a bounded table height so scrolling stays inside the table. Chart blocks may declare bounded display height when they need to align with adjacent bounded blocks. Metric and table detail configs may use drawer, modal, popover, and table-row inline presentations; do not author raw overlay HTML or JavaScript. Chart data-source programs must return from a final analyze.sort or analyze.top_n step so plotted order is explicit."},"ontologyDataSources":{"items":{"$ref":"#/components/schemas/ArtifactLiveDataProgram"},"type":"array","maxItems":20,"title":"Ontologydatasources","description":"Saved Porter data programs used by the artifact. Leave empty only when spec.dataMode is standalone, or on revisions when reuseCurrentDataSources is true. When spec.dataMode is live, every dataRef key must have a matching ontologyDataSources key whose program returns row objects shaped for the spec expressions. Programs must derive their rows from read-only Porter ontology query actions; hardcoded, static, or locally assembled row data is invalid. Row acquisition is controlled by ontology query params and Porter's complete-load rules, not a separate artifact source limit. Programs feeding charts must end at analyze.sort or analyze.top_n."},"reuseCurrentDataSources":{"type":"boolean","title":"Reusecurrentdatasources","description":"For revisions only, reuse the current artifact's saved ontologyDataSources instead of resubmitting program bodies. Set this only when artifactId is present, ontologyDataSources is empty, and the submitted spec's dataRefs intentionally reference the current saved data-source keys.","default":false},"ontologyActions":{"items":{"$ref":"#/components/schemas/ArtifactOntologyAction"},"type":"array","maxItems":20,"title":"Ontologyactions","description":"Saved ontology mutation descriptors for trusted artifact edit controls. Use when the artifact must edit Porter records through declared controls; each descriptor must reference mutation actions returned by ontology discovery. For editable table cells, the table column edit references a control and one action key, while the action binds record_id plus control_value into the mutation payload. Nullable override fields should display with a coalesce expression that falls back to the calculated value and should clear by writing explicit null. Use steps when one UI action must execute multiple mutations in order."},"authoringReport":{"$ref":"#/components/schemas/GeneratedArtifactAuthorReport","description":"Structured handoff for the calling assistant. Use this to report what changed, what was checked, unresolved issues, or user clarifications needed after the artifact submission."}},"additionalProperties":false,"type":"object","required":["title","spec"],"title":"GeneratedArtifactAuthorSubmission"},"GeneratedArtifactConfig":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"type":"string","enum":["draft","published"],"title":"Status","default":"published"},"sourceToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetoken"},"config":{"$ref":"#/components/schemas/GeneratedArtifactConfigPayload","description":"Current artifact scaffold/config without full element bodies. The layout references elements by id; call get_artifact_element for the requested bodies."},"elementIds":{"items":{"type":"string"},"type":"array","title":"Elementids"},"elements":{"items":{"$ref":"#/components/schemas/GeneratedArtifactElementSummary"},"type":"array","title":"Elements"},"ontologyDataSources":{"items":{"$ref":"#/components/schemas/ArtifactLiveDataProgramSummary"},"type":"array","title":"Ontologydatasources"},"ontologyActions":{"items":{"$ref":"#/components/schemas/ArtifactOntologyActionSummary"},"type":"array","title":"Ontologyactions"},"configHandlingNotes":{"items":{"type":"string"},"type":"array","title":"Confighandlingnotes"},"nextAction":{"type":"string","title":"Nextaction","default":"save_artifact_config_or_get_specific_element_bodies"}},"type":"object","required":["id","title","config"],"title":"GeneratedArtifactConfig"},"GeneratedArtifactConfigPayload":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"kind":{"type":"string","enum":["dashboard","planner","model"],"title":"Kind"},"dataMode":{"type":"string","enum":["live","standalone"],"title":"Datamode"},"enhancementPrompts":{"items":{"type":"string","maxLength":240,"minLength":1},"type":"array","maxItems":4,"minItems":4,"title":"Enhancementprompts"},"frame":{"$ref":"#/components/schemas/ArtifactRootFrame"},"dataRefs":{"items":{"$ref":"#/components/schemas/ArtifactDataRef"},"type":"array","title":"Datarefs"},"controls":{"items":{"oneOf":[{"$ref":"#/components/schemas/TextControlSpec"},{"$ref":"#/components/schemas/NumberControlSpec"},{"$ref":"#/components/schemas/MoneyControlSpec"},{"$ref":"#/components/schemas/PercentControlSpec"},{"$ref":"#/components/schemas/DateControlSpec"},{"$ref":"#/components/schemas/SelectControlSpec"},{"$ref":"#/components/schemas/SegmentedControlSpec"},{"$ref":"#/components/schemas/ToggleControlSpec"},{"$ref":"#/components/schemas/CheckboxControlSpec"},{"$ref":"#/components/schemas/SliderControlSpec"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CheckboxControlSpec","date":"#/components/schemas/DateControlSpec","money":"#/components/schemas/MoneyControlSpec","number":"#/components/schemas/NumberControlSpec","percent":"#/components/schemas/PercentControlSpec","segmented":"#/components/schemas/SegmentedControlSpec","select":"#/components/schemas/SelectControlSpec","slider":"#/components/schemas/SliderControlSpec","text":"#/components/schemas/TextControlSpec","toggle":"#/components/schemas/ToggleControlSpec"}}},"type":"array","title":"Controls"},"ontologyActions":{"items":{"$ref":"#/components/schemas/ArtifactOntologyAction"},"type":"array","title":"Ontologyactions"},"layout":{"oneOf":[{"$ref":"#/components/schemas/ArtifactLayoutBlockNode"},{"$ref":"#/components/schemas/ArtifactLayoutMetricGroupNode"},{"$ref":"#/components/schemas/ArtifactLayoutStackNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutGridNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSplitNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutTabsNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutPanelNode-Output"},{"$ref":"#/components/schemas/ArtifactLayoutSectionNode-Output"}],"title":"Layout","discriminator":{"propertyName":"type","mapping":{"block":"#/components/schemas/ArtifactLayoutBlockNode","grid":"#/components/schemas/ArtifactLayoutGridNode-Output","metricGroup":"#/components/schemas/ArtifactLayoutMetricGroupNode","panel":"#/components/schemas/ArtifactLayoutPanelNode-Output","section":"#/components/schemas/ArtifactLayoutSectionNode-Output","split":"#/components/schemas/ArtifactLayoutSplitNode-Output","stack":"#/components/schemas/ArtifactLayoutStackNode-Output","tabs":"#/components/schemas/ArtifactLayoutTabsNode-Output"}}}},"type":"object","required":["artifactId","title","kind","dataMode","enhancementPrompts","frame","layout"],"title":"GeneratedArtifactConfigPayload"},"GeneratedArtifactDefaultSelection":{"properties":{"artifactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifactid","description":"Current company-level Artifact Canvas default artifact id. Null means the shared Operating Review fallback is the default landing surface."}},"type":"object","title":"GeneratedArtifactDefaultSelection"},"GeneratedArtifactDefaultSelectionRequest":{"properties":{"artifactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifactid","description":"Generated artifact id to make the company default, or null to clear the saved default and use the shared Operating Review fallback."}},"additionalProperties":false,"type":"object","title":"GeneratedArtifactDefaultSelectionRequest"},"GeneratedArtifactDeleteResult":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"isArchived":{"type":"boolean","title":"Isarchived","default":true}},"type":"object","required":["id","title"],"title":"GeneratedArtifactDeleteResult"},"GeneratedArtifactDetail":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary","default":""},"originKey":{"anyOf":[{"type":"string","const":"default_operating_review"},{"type":"null"}],"title":"Originkey"},"isDefault":{"type":"boolean","title":"Isdefault","default":false},"investorVisible":{"type":"boolean","title":"Investorvisible","default":false},"source":{"$ref":"#/components/schemas/GeneratedArtifactVersion"},"liveDataSnapshots":{"items":{"$ref":"#/components/schemas/GeneratedArtifactLiveDataSnapshot"},"type":"array","title":"Livedatasnapshots"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuserid"},"createdVia":{"type":"string","const":"ai","title":"Createdvia","default":"ai"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","title","source"],"title":"GeneratedArtifactDetail"},"GeneratedArtifactElementSummary":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"dataRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataref"}},"type":"object","required":["id","type"],"title":"GeneratedArtifactElementSummary"},"GeneratedArtifactListItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary","default":""},"renderMode":{"type":"string","const":"controlled_spec","title":"Rendermode","default":"controlled_spec"},"originKey":{"anyOf":[{"type":"string","const":"default_operating_review"},{"type":"null"}],"title":"Originkey"},"isDefault":{"type":"boolean","title":"Isdefault","default":false},"investorVisible":{"type":"boolean","title":"Investorvisible","default":false},"draft":{"type":"boolean","title":"Draft","default":false},"liveDataProgramCount":{"type":"integer","title":"Livedataprogramcount","default":0},"ontologyActionCount":{"type":"integer","title":"Ontologyactioncount","default":0},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuserid"},"createdVia":{"type":"string","const":"ai","title":"Createdvia","default":"ai"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","title"],"title":"GeneratedArtifactListItem"},"GeneratedArtifactListResponse":{"properties":{"artifacts":{"items":{"$ref":"#/components/schemas/GeneratedArtifactListItem"},"type":"array","title":"Artifacts"}},"type":"object","required":["artifacts"],"title":"GeneratedArtifactListResponse"},"GeneratedArtifactLiveDataSnapshot":{"properties":{"programKey":{"type":"string","title":"Programkey"},"sourceToken":{"type":"string","title":"Sourcetoken"},"runtimeContext":{"additionalProperties":true,"type":"object","title":"Runtimecontext"},"response":{"additionalProperties":true,"type":"object","title":"Response"},"admissionReceipt":{"anyOf":[{"$ref":"#/components/schemas/ArtifactProgramAdmissionReceipt"},{"type":"null"}]},"cashSettlementContractVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashsettlementcontractversion"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["programKey","sourceToken"],"title":"GeneratedArtifactLiveDataSnapshot"},"GeneratedArtifactReadme":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"sourceToken":{"type":"string","title":"Sourcetoken"},"status":{"type":"string","enum":["missing","pending","ready","failed"],"title":"Status","default":"missing"},"generatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generatedat"},"generatedBy":{"anyOf":[{"type":"string","enum":["ai","system"]},{"type":"null"}],"title":"Generatedby"},"summary":{"type":"string","maxLength":1200,"title":"Summary","default":""},"sections":{"items":{"$ref":"#/components/schemas/GeneratedArtifactReadmeSection"},"type":"array","maxItems":8,"title":"Sections"},"eventCount":{"type":"integer","title":"Eventcount","default":0},"scopedRecordCount":{"type":"integer","title":"Scopedrecordcount","default":0},"dataRefCount":{"type":"integer","title":"Datarefcount","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["artifactId","sourceToken"],"title":"GeneratedArtifactReadme"},"GeneratedArtifactReadmeRequest":{"properties":{"sourceToken":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Sourcetoken"}},"additionalProperties":false,"type":"object","title":"GeneratedArtifactReadmeRequest"},"GeneratedArtifactReadmeSection":{"properties":{"title":{"type":"string","maxLength":80,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":900,"minLength":1,"title":"Body"},"bullets":{"items":{"type":"string"},"type":"array","maxItems":6,"title":"Bullets"}},"type":"object","required":["title","body"],"title":"GeneratedArtifactReadmeSection"},"GeneratedArtifactRenderPayload":{"properties":{"companyId":{"type":"string","title":"Companyid"},"artifact":{"$ref":"#/components/schemas/GeneratedArtifactDetail"},"state":{"anyOf":[{"$ref":"#/components/schemas/GeneratedArtifactState"},{"type":"null"}]}},"type":"object","required":["companyId","artifact"],"title":"GeneratedArtifactRenderPayload"},"GeneratedArtifactRenderProgramBatchRunRequest":{"properties":{"programs":{"items":{"$ref":"#/components/schemas/ArtifactProgramBatchRunRequestItem"},"type":"array","maxItems":20,"minItems":1,"title":"Programs"},"token":{"type":"string","minLength":1,"title":"Token"}},"additionalProperties":false,"type":"object","required":["programs","token"],"title":"GeneratedArtifactRenderProgramBatchRunRequest"},"GeneratedArtifactRenderProgramRunRequest":{"properties":{"runtimeContext":{"additionalProperties":true,"type":"object","title":"Runtimecontext"},"temporalOverrides":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PointScopeSelection"},{"$ref":"#/components/schemas/RangeScopeSelection"},{"$ref":"#/components/schemas/PeriodScopeSelection"},{"$ref":"#/components/schemas/LastClosedPeriodScopeSelection"},{"$ref":"#/components/schemas/PreviousPeriodScopeSelection"},{"$ref":"#/components/schemas/AllDatesScopeSelection"},{"$ref":"#/components/schemas/CurrentStateScopeSelection"},{"$ref":"#/components/schemas/UndatedScopeSelection"}],"discriminator":{"propertyName":"kind","mapping":{"all_dates":"#/components/schemas/AllDatesScopeSelection","current_state":"#/components/schemas/CurrentStateScopeSelection","last_closed_period":"#/components/schemas/LastClosedPeriodScopeSelection","period":"#/components/schemas/PeriodScopeSelection","point":"#/components/schemas/PointScopeSelection","previous_period":"#/components/schemas/PreviousPeriodScopeSelection","range":"#/components/schemas/RangeScopeSelection","undated":"#/components/schemas/UndatedScopeSelection"}}},"type":"object","title":"Temporaloverrides"},"acceptedTemporalVersions":{"items":{"type":"integer"},"type":"array","title":"Acceptedtemporalversions"},"originScopeIdentity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originscopeidentity"},"selection":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Selection"},"limit":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Limit"},"compactRows":{"type":"boolean","title":"Compactrows","default":false},"compactExecutionBindings":{"type":"boolean","title":"Compactexecutionbindings","default":false},"token":{"type":"string","minLength":1,"title":"Token"}},"additionalProperties":false,"type":"object","required":["token"],"title":"GeneratedArtifactRenderProgramRunRequest"},"GeneratedArtifactScreenshotCapture":{"properties":{"sourceToken":{"type":"string","minLength":1,"title":"Sourcetoken"},"imageDataUrl":{"type":"string","minLength":1,"title":"Imagedataurl","description":"PNG data URL captured from the controlled artifact canvas."},"diagnostics":{"additionalProperties":true,"type":"object","title":"Diagnostics","description":"Optional render diagnostics captured by the artifact viewer, such as viewport size or visible overflow signals."}},"additionalProperties":false,"type":"object","required":["sourceToken","imageDataUrl"],"title":"GeneratedArtifactScreenshotCapture"},"GeneratedArtifactScreenshotMetadata":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"sourceToken":{"type":"string","title":"Sourcetoken"},"capturedAt":{"type":"number","title":"Capturedat"},"diagnostics":{"additionalProperties":true,"type":"object","title":"Diagnostics"}},"type":"object","required":["artifactId","sourceToken","capturedAt"],"title":"GeneratedArtifactScreenshotMetadata"},"GeneratedArtifactSidebarAiContext":{"properties":{"surfaceContext":{"type":"string","const":"artifact_sidebar","title":"Surfacecontext","default":"artifact_sidebar"},"artifactId":{"type":"string","title":"Artifactid"},"sourceToken":{"type":"string","title":"Sourcetoken"},"status":{"type":"string","enum":["draft","published"],"title":"Status"},"preloadedGetArtifactConfig":{"additionalProperties":true,"type":"object","title":"Preloadedgetartifactconfig"},"preloadedListComponents":{"additionalProperties":true,"type":"object","title":"Preloadedlistcomponents"},"currentCanvasStateLayout":{"additionalProperties":true,"type":"object","title":"Currentcanvasstatelayout"}},"additionalProperties":false,"type":"object","required":["artifactId","sourceToken","status","preloadedGetArtifactConfig","preloadedListComponents","currentCanvasStateLayout"],"title":"GeneratedArtifactSidebarAiContext"},"GeneratedArtifactSpecError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"dataRefs":{"items":{"type":"string"},"type":"array","title":"Datarefs"},"blockIds":{"items":{"type":"string"},"type":"array","title":"Blockids"}},"type":"object","required":["code","message"],"title":"GeneratedArtifactSpecError","description":"One blocking defect in a draft artifact that is still shown to the user."},"GeneratedArtifactState":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuserid"},"updatedByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuseremail"},"state":{"additionalProperties":true,"type":"object","title":"State"},"sourceToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetoken"},"revision":{"type":"integer","title":"Revision","default":0},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"history":{"items":{"$ref":"#/components/schemas/GeneratedArtifactStateEvent"},"type":"array","title":"History"}},"type":"object","required":["artifactId"],"title":"GeneratedArtifactState"},"GeneratedArtifactStateEvent":{"properties":{"id":{"type":"string","title":"Id"},"artifactId":{"type":"string","title":"Artifactid"},"revision":{"type":"integer","title":"Revision"},"changedKeys":{"items":{"type":"string"},"type":"array","title":"Changedkeys"},"changedValues":{"additionalProperties":true,"type":"object","title":"Changedvalues"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuserid"},"createdByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuseremail"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","artifactId","revision"],"title":"GeneratedArtifactStateEvent"},"GeneratedArtifactStateSave":{"properties":{"state":{"additionalProperties":true,"type":"object","title":"State"},"sourceToken":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Sourcetoken"},"baseRevision":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Baserevision"}},"additionalProperties":false,"type":"object","title":"GeneratedArtifactStateSave"},"GeneratedArtifactVersion":{"properties":{"id":{"type":"string","title":"Id"},"artifactId":{"type":"string","title":"Artifactid"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"title":{"type":"string","title":"Title","default":""},"summary":{"type":"string","title":"Summary","default":""},"renderMode":{"type":"string","const":"controlled_spec","title":"Rendermode","default":"controlled_spec"},"spec":{"$ref":"#/components/schemas/ArtifactSpec-Output"},"specError":{"anyOf":[{"$ref":"#/components/schemas/GeneratedArtifactSpecError"},{"type":"null"}]},"rendererVersion":{"type":"string","title":"Rendererversion","default":"controlled-artifact-renderer"},"validationReport":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validationreport"},"liveDataPrograms":{"items":{"$ref":"#/components/schemas/ArtifactLiveDataProgramSummary"},"type":"array","title":"Livedataprograms"},"ontologyActions":{"items":{"$ref":"#/components/schemas/ArtifactOntologyActionSummary"},"type":"array","title":"Ontologyactions"},"status":{"type":"string","enum":["draft","active","retired","rejected"],"title":"Status","default":"active"},"revision":{"type":"integer","title":"Revision","default":0},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baseversionid"},"reviewStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewstatus"},"approvalContentHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approvalcontenthash"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuserid"},"createdVia":{"type":"string","const":"ai","title":"Createdvia","default":"ai"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","artifactId","spec"],"title":"GeneratedArtifactVersion"},"GeneratedArtifactVersionListResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/GeneratedArtifactVersionSummary"},"type":"array","title":"Versions"}},"type":"object","required":["versions"],"title":"GeneratedArtifactVersionListResponse"},"GeneratedArtifactVersionSummary":{"properties":{"id":{"type":"string","title":"Id"},"artifactId":{"type":"string","title":"Artifactid"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"title":{"type":"string","title":"Title","default":""},"summary":{"type":"string","title":"Summary","default":""},"isCurrent":{"type":"boolean","title":"Iscurrent","default":false},"status":{"type":"string","enum":["draft","active","retired","rejected"],"title":"Status","default":"active"},"revision":{"type":"integer","title":"Revision","default":0},"reviewStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewstatus"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuserid"},"createdVia":{"type":"string","const":"ai","title":"Createdvia","default":"ai"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","artifactId"],"title":"GeneratedArtifactVersionSummary"},"GlAccountDetail":{"properties":{"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"accountType":{"type":"string","title":"Accounttype"},"openingBalance":{"type":"number","title":"Openingbalance"},"transactions":{"items":{"$ref":"#/components/schemas/GlTransaction"},"type":"array","title":"Transactions"},"closingBalance":{"type":"number","title":"Closingbalance"},"totalDebits":{"type":"number","title":"Totaldebits"},"totalCredits":{"type":"number","title":"Totalcredits"},"page":{"type":"integer","title":"Page"},"pageSize":{"type":"integer","title":"Pagesize"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["accountId","accountName","accountType","openingBalance","transactions","closingBalance","totalDebits","totalCredits","page","pageSize","totalCount"],"title":"GlAccountDetail"},"GlTransaction":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"debit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Debit"},"credit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit"},"runningBalance":{"type":"number","title":"Runningbalance"}},"type":"object","required":["date","sourceType","sourceId","source","memo","debit","credit","runningBalance"],"title":"GlTransaction"},"GroupMemberOverview":{"properties":{"memberCompanyId":{"type":"string","title":"Membercompanyid"},"name":{"type":"string","title":"Name"},"qboCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocompanyname"},"qboConnected":{"type":"boolean","title":"Qboconnected"},"qboConnectedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboconnectedat"},"latestSyncStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latestsyncstatus"},"latestSyncType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latestsynctype"},"latestSyncCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latestsynccompletedat"},"latestLedgerDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latestledgerdate"}},"type":"object","required":["memberCompanyId","name","qboConnected"],"title":"GroupMemberOverview","description":"One group member with live connection/sync/book state (POR-1595)."},"GroupMembersAddResponse":{"properties":{"added":{"items":{"type":"string"},"type":"array","title":"Added"},"skippedExisting":{"items":{"type":"string"},"type":"array","title":"Skippedexisting"}},"type":"object","required":["added","skippedExisting"],"title":"GroupMembersAddResponse","description":"Typed result of an add-members mutation."},"GroupMembersRemoveResponse":{"properties":{"removed":{"items":{"type":"string"},"type":"array","title":"Removed"},"notMembers":{"items":{"type":"string"},"type":"array","title":"Notmembers"}},"type":"object","required":["removed","notMembers"],"title":"GroupMembersRemoveResponse","description":"Typed result of a remove-members mutation."},"GroupMembersRequest":{"properties":{"memberCompanyIds":{"items":{"type":"string"},"type":"array","title":"Membercompanyids"}},"type":"object","required":["memberCompanyIds"],"title":"GroupMembersRequest","description":"Request model for adding/removing group member companies (POR-1595)."},"GroupMembersResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/GroupMemberOverview"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"GroupMembersResponse","description":"Response model for the group members listing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HelcimConnectRequest":{"properties":{"apiToken":{"type":"string","minLength":1,"title":"Apitoken"},"cashAccountId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Cashaccountid"}},"type":"object","required":["apiToken"],"title":"HelcimConnectRequest"},"HelcimConnectResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"cashAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountid"},"cashAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountname"},"status":{"type":"string","title":"Status"},"intakeReady":{"type":"boolean","title":"Intakeready"},"reviewJobId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewjobid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["success","status","intakeReady"],"title":"HelcimConnectResponse"},"HelcimPartnerConnectRequest":{"properties":{"emailAddress":{"type":"string","maxLength":320,"minLength":3,"title":"Emailaddress"},"businessOperatingName":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Businessoperatingname"},"businessLegalName":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Businesslegalname"},"businessPhoneNumber":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Businessphonenumber"},"businessWebsite":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Businesswebsite"}},"additionalProperties":false,"type":"object","required":["emailAddress"],"title":"HelcimPartnerConnectRequest","description":"Optional business prefill for Helcim Connected Account Registration."},"HelcimPartnerConnectResponse":{"properties":{"processorId":{"type":"string","title":"Processorid"},"connectedAccountId":{"type":"string","title":"Connectedaccountid"},"signupUrl":{"type":"string","title":"Signupurl"},"connection":{"$ref":"#/components/schemas/PaymentProcessorConnectionResponse"}},"type":"object","required":["processorId","connectedAccountId","signupUrl","connection"],"title":"HelcimPartnerConnectResponse","description":"Connect-start response with the merchant signup URL Porter must redirect to."},"HelcimProcessorLink":{"properties":{"displayName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Displayname"},"makeDefault":{"type":"boolean","title":"Makedefault","default":true}},"additionalProperties":false,"type":"object","title":"HelcimProcessorLink","description":"Link an existing Helcim sync connection into invoice processor selection."},"HelcimStatusResponse":{"properties":{"connectionHistory":{"items":{"$ref":"#/components/schemas/ConnectionHistoryEntry"},"type":"array","title":"Connectionhistory","default":[]},"connected":{"type":"boolean","title":"Connected"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"cashAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountid"},"cashAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountname"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncedat"},"lastTransactionSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lasttransactionsyncedat"},"lastBatchSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastbatchsyncedat"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"myhelcimSubdomain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Myhelcimsubdomain"}},"type":"object","required":["connected"],"title":"HelcimStatusResponse"},"HelcimSubdomainRequest":{"properties":{"myhelcimSubdomain":{"type":"string","maxLength":255,"minLength":1,"title":"Myhelcimsubdomain"}},"additionalProperties":false,"type":"object","required":["myhelcimSubdomain"],"title":"HelcimSubdomainRequest"},"InitialBillingContact":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"kind":{"type":"string","title":"Kind","default":"billing"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"}},"type":"object","required":["email"],"title":"InitialBillingContact","description":"First billing contact created alongside a new customer."},"InitialFeeCoverageReceipt":{"properties":{"source":{"type":"string","title":"Source"},"dateFrom":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Datefrom"},"dateTo":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dateto"},"assessedAt":{"type":"string","format":"date-time","title":"Assessedat"},"classifiedTenderCount":{"type":"integer","title":"Classifiedtendercount"},"classificationDigest":{"type":"string","title":"Classificationdigest"},"totals":{"$ref":"#/components/schemas/InitialFeeTotals"}},"type":"object","required":["source","assessedAt","classifiedTenderCount","classificationDigest"],"title":"InitialFeeCoverageReceipt","description":"Immutable point-in-time classification of one commerce source scope."},"InitialFeeReadiness":{"properties":{"tenderId":{"type":"string","title":"Tenderid"},"status":{"type":"string","enum":["pending","recorded","known_zero","not_applicable","review_required"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"currency":{"type":"string","title":"Currency"},"postingOperationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postingoperationid"},"recordedAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Recordedamount"},"recordedCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordedcurrency"},"auditStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auditstatus"},"reviewRequired":{"type":"boolean","title":"Reviewrequired","default":false}},"type":"object","required":["tenderId","status","currency"],"title":"InitialFeeReadiness"},"InitialFeeTotals":{"properties":{"pendingCount":{"type":"integer","title":"Pendingcount","default":0},"recordedCount":{"type":"integer","title":"Recordedcount","default":0},"knownZeroCount":{"type":"integer","title":"Knownzerocount","default":0},"notApplicableCount":{"type":"integer","title":"Notapplicablecount","default":0},"reviewRequiredCount":{"type":"integer","title":"Reviewrequiredcount","default":0},"recordedAmountByCurrency":{"additionalProperties":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},"type":"object","title":"Recordedamountbycurrency"}},"type":"object","title":"InitialFeeTotals"},"InsightsResponse":{"properties":{"findings":{"items":{"$ref":"#/components/schemas/Finding"},"type":"array","title":"Findings"},"thingsToDigInto":{"items":{"$ref":"#/components/schemas/DigItem"},"type":"array","title":"Thingstodiginto"}},"type":"object","title":"InsightsResponse"},"IntangibleClassCreate":{"properties":{"class_name":{"type":"string","title":"Class Name"},"capitalization_threshold":{"type":"number","title":"Capitalization Threshold","default":2000},"useful_life_months":{"type":"integer","title":"Useful Life Months","default":120},"asset_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Id"},"asset_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Name"},"accumulated_amortization_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Amortization Account Id"},"accumulated_amortization_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Amortization Account Name"},"expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Id"},"expense_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Name"},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["class_name"],"title":"IntangibleClassCreate","description":"Create a new intangible class."},"IntangibleClassResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"className":{"type":"string","title":"Classname"},"capitalizationThreshold":{"type":"number","title":"Capitalizationthreshold","default":2000},"usefulLifeMonths":{"type":"integer","title":"Usefullifemonths","default":120},"assetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assetaccountid"},"assetAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assetaccountname"},"accumulatedAmortizationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulatedamortizationaccountid"},"accumulatedAmortizationAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulatedamortizationaccountname"},"expenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expenseaccountid"},"expenseAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expenseaccountname"},"displayOrder":{"type":"integer","title":"Displayorder","default":0}},"type":"object","required":["id","companyId","className"],"title":"IntangibleClassResponse","description":"Intangible asset class configuration."},"IntangibleClassUpdate":{"properties":{"class_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class Name"},"capitalization_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Capitalization Threshold"},"useful_life_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Useful Life Months"},"asset_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Id"},"asset_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Account Name"},"accumulated_amortization_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Amortization Account Id"},"accumulated_amortization_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accumulated Amortization Account Name"},"expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Id"},"expense_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expense Account Name"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"}},"type":"object","title":"IntangibleClassUpdate","description":"Partial update for an intangible class."},"IntegrationAccountCoverage":{"properties":{"providerAccountId":{"type":"string","title":"Provideraccountid"},"name":{"type":"string","title":"Name"},"accountType":{"type":"string","title":"Accounttype"},"route":{"type":"string","enum":["provider","bank_connection","not_covered"],"title":"Route"},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoncode"},"coveredByBankAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coveredbybankaccountid"},"coveredByBankAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coveredbybankaccountname"}},"type":"object","required":["providerAccountId","name","accountType","route"],"title":"IntegrationAccountCoverage","description":"One provider account and the source Porter will use for its activity."},"IntegrationAttentionItem":{"properties":{"kind":{"type":"string","enum":["order","payout","dispute"],"title":"Kind"},"providerId":{"type":"string","title":"Providerid"},"providerState":{"type":"string","title":"Providerstate"},"providerVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Providerversion"},"occurredOn":{"type":"string","title":"Occurredon"},"status":{"type":"string","enum":["held","blocked_closed_period","unresolved","variance"],"title":"Status"},"reasonCodes":{"items":{"type":"string"},"type":"array","title":"Reasoncodes"},"resolution":{"type":"string","title":"Resolution"},"actionLabel":{"type":"string","title":"Actionlabel"}},"type":"object","required":["kind","providerId","providerState","occurredOn","status","reasonCodes","resolution","actionLabel"],"title":"IntegrationAttentionItem","description":"One current provider record whose accounting still needs owner action."},"IntegrationCapabilityAction":{"properties":{"kind":{"type":"string","enum":["connect","reconnect","set_clearing_account","set_processing_fee_account","set_tender_accounts","map_revenue_segments","retry_sync","none"],"title":"Kind"},"label":{"type":"string","title":"Label"}},"type":"object","required":["kind","label"],"title":"IntegrationCapabilityAction","description":"Safe Settings action metadata that never contains provider secrets."},"IntegrationCapabilityStatus":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"status":{"type":"string","enum":["supported","setup_blocked","failed","unsupported","unavailable"],"title":"Status"},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoncode"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"action":{"$ref":"#/components/schemas/IntegrationCapabilityAction"}},"type":"object","required":["key","label","description","status","action"],"title":"IntegrationCapabilityStatus","description":"One declared provider capability plus its current readiness."},"IntegrationCompletenessResponse":{"properties":{"provider":{"type":"string","title":"Provider"},"connected":{"type":"boolean","title":"Connected"},"initialFees":{"anyOf":[{"$ref":"#/components/schemas/InitialFeeTotals"},{"type":"null"}]},"initialFeeCoverage":{"anyOf":[{"$ref":"#/components/schemas/InitialFeeCoverageReceipt"},{"type":"null"}]},"setup":{"$ref":"#/components/schemas/IntegrationCompletenessSetup"},"capabilities":{"items":{"$ref":"#/components/schemas/IntegrationCapabilityStatus"},"type":"array","title":"Capabilities"},"syncs":{"items":{"$ref":"#/components/schemas/IntegrationCompletenessSync"},"type":"array","title":"Syncs"},"accountCoverageStatus":{"type":"string","enum":["not_applicable","available","unavailable"],"title":"Accountcoveragestatus","default":"not_applicable"},"accountCoverage":{"items":{"$ref":"#/components/schemas/IntegrationAccountCoverage"},"type":"array","title":"Accountcoverage"},"blockingJob":{"anyOf":[{"$ref":"#/components/schemas/SyncJobPublicResponse"},{"type":"null"}]},"attentionItems":{"items":{"$ref":"#/components/schemas/IntegrationAttentionItem"},"type":"array","title":"Attentionitems"},"attentionTotal":{"type":"integer","title":"Attentiontotal","default":0}},"type":"object","required":["provider","connected","setup","capabilities","syncs"],"title":"IntegrationCompletenessResponse","description":"Source-neutral Settings read model for one provider."},"IntegrationCompletenessSetup":{"properties":{"clearingAccountConfigured":{"type":"boolean","title":"Clearingaccountconfigured"},"processingFeeAccountConfigured":{"type":"boolean","title":"Processingfeeaccountconfigured","default":false},"configuredTenderAccounts":{"items":{"type":"string"},"type":"array","title":"Configuredtenderaccounts"},"missingTenderAccounts":{"items":{"type":"string"},"type":"array","title":"Missingtenderaccounts"},"unmappedRevenueSegmentCount":{"type":"integer","title":"Unmappedrevenuesegmentcount"},"unmappedRevenueSegments":{"items":{"type":"string"},"type":"array","title":"Unmappedrevenuesegments"},"webhookConfigured":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Webhookconfigured"}},"type":"object","required":["clearingAccountConfigured","unmappedRevenueSegmentCount","unmappedRevenueSegments"],"title":"IntegrationCompletenessSetup","description":"Current reusable setup facts consumed by capability readiness."},"IntegrationCompletenessSync":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"job":{"anyOf":[{"$ref":"#/components/schemas/SyncJobPublicResponse"},{"type":"null"}]},"currentJob":{"anyOf":[{"$ref":"#/components/schemas/SyncJobPublicResponse"},{"type":"null"}]},"lastTerminalJob":{"anyOf":[{"$ref":"#/components/schemas/SyncJobPublicResponse"},{"type":"null"}]}},"type":"object","required":["key","label"],"title":"IntegrationCompletenessSync","description":"Latest public sync state for one provider capability lane."},"IntegrationConnectResponse":{"properties":{"authUrl":{"type":"string","title":"Authurl"},"state":{"type":"string","title":"State"}},"type":"object","required":["authUrl","state"],"title":"IntegrationConnectResponse"},"IntegrationStatusResponse":{"properties":{"connectionHistory":{"items":{"$ref":"#/components/schemas/ConnectionHistoryEntry"},"type":"array","title":"Connectionhistory","default":[]},"provider":{"type":"string","enum":["stripe","ramp","brex","rippling_spend","hubspot","helcim","mercury","square","shopify","bill_com"],"title":"Provider"},"name":{"type":"string","title":"Name"},"connected":{"type":"boolean","title":"Connected"},"status":{"type":"string","title":"Status"},"connectAvailable":{"type":"boolean","title":"Connectavailable"},"connectUnavailableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectunavailablereason"},"syncAvailable":{"type":"boolean","title":"Syncavailable"},"syncUnavailableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncunavailablereason"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalaccountid"},"bankAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"livemode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Livemode"},"providerApiEnvironment":{"type":"string","title":"Providerapienvironment","default":"unverified"},"environmentEvidenceKind":{"type":"string","title":"Environmentevidencekind","default":"not_available"},"environmentReasonCode":{"type":"string","title":"Environmentreasoncode","default":"provider_environment_not_classified"},"syncStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncstartdate"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncedat"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"requiresReauthentication":{"type":"boolean","title":"Requiresreauthentication","default":false},"apiKeyConnectAvailable":{"type":"boolean","title":"Apikeyconnectavailable","default":false},"capabilities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Capabilities"},"writerGeneration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Writergeneration"},"pinnedApiVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinnedapiversion"},"grantedScopes":{"items":{"type":"string"},"type":"array","title":"Grantedscopes"},"pausedCapabilities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pausedcapabilities"},"sourceWatermarks":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sourcewatermarks"},"sourceManifestStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcemanifeststatus"},"sourceManifestDigest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcemanifestdigest"}},"type":"object","required":["provider","name","connected","status","connectAvailable","syncAvailable"],"title":"IntegrationStatusResponse"},"IntegrationSyncJobStartResponse":{"properties":{"syncJobId":{"type":"string","title":"Syncjobid"},"syncType":{"type":"string","title":"Synctype"},"status":{"type":"string","title":"Status"},"provider":{"type":"string","enum":["ramp","brex","helcim","mercury","stripe","square","hubspot","bill_com"],"title":"Provider"},"queueDisposition":{"type":"string","enum":["created","reused","busy"],"title":"Queuedisposition"},"requestAccepted":{"type":"boolean","title":"Requestaccepted"}},"type":"object","required":["syncJobId","syncType","status","provider","queueDisposition","requestAccepted"],"title":"IntegrationSyncJobStartResponse","description":"Provider sync enqueue receipt with an explicit collision disposition."},"IntegrationSyncStartDateRequest":{"properties":{"syncStartDate":{"type":"string","title":"Syncstartdate"},"clientToday":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clienttoday"},"initializeIfNull":{"type":"boolean","title":"Initializeifnull","default":false}},"type":"object","required":["syncStartDate"],"title":"IntegrationSyncStartDateRequest"},"InteractionExpr":{"properties":{"op":{"type":"string","const":"interaction","title":"Op"},"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key","description":"Artifact-local interaction context key set by a clicked metric, table row, chart point, or list row. Use coalesce when a default is needed before any interaction has run."}},"additionalProperties":false,"type":"object","required":["op","key"],"title":"InteractionExpr"},"InvestorDocumentDownloadResponse":{"properties":{"url":{"type":"string","title":"Url"},"expiresInSeconds":{"type":"integer","title":"Expiresinseconds"}},"type":"object","required":["url","expiresInSeconds"],"title":"InvestorDocumentDownloadResponse"},"InvestorDocumentListResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/InvestorDocumentResponse"},"type":"array","title":"Documents"}},"type":"object","required":["documents"],"title":"InvestorDocumentListResponse"},"InvestorDocumentResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"folderId":{"type":"string","title":"Folderid"},"name":{"type":"string","title":"Name"},"source":{"type":"string","enum":["uploaded","snapshot"],"title":"Source"},"type":{"type":"string","enum":["pl","balance_sheet","cash_flow","investor_letter","other"],"title":"Type"},"storageRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storageref"},"snapshotId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshotid"},"meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","companyId","folderId","name","source","type"],"title":"InvestorDocumentResponse"},"InvestorDocumentUploadCreate":{"properties":{"folderId":{"type":"string","title":"Folderid"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"type":{"type":"string","enum":["pl","balance_sheet","cash_flow","investor_letter","other"],"title":"Type","default":"other"},"storageRef":{"type":"string","maxLength":500,"minLength":1,"title":"Storageref"},"meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size"}},"type":"object","required":["folderId","name","storageRef"],"title":"InvestorDocumentUploadCreate","description":"Create an uploaded-blob document (NOT a snapshot — those go through\ninvestor_snapshots.capture_snapshot which writes both rows together)."},"InvestorFolderCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"periodType":{"type":"string","enum":["annual","quarterly","monthly","one_off"],"title":"Periodtype"},"period":{"anyOf":[{"type":"string","maxLength":20,"minLength":1},{"type":"null"}],"title":"Period"},"description":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Description"},"visibility":{"type":"string","enum":["published","draft","archived"],"title":"Visibility","default":"draft"}},"type":"object","required":["name","periodType"],"title":"InvestorFolderCreate"},"InvestorFolderListResponse":{"properties":{"folders":{"items":{"$ref":"#/components/schemas/InvestorFolderResponse"},"type":"array","title":"Folders"}},"type":"object","required":["folders"],"title":"InvestorFolderListResponse"},"InvestorFolderResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"name":{"type":"string","title":"Name"},"periodType":{"type":"string","enum":["annual","quarterly","monthly","one_off"],"title":"Periodtype"},"period":{"type":"string","title":"Period"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"visibility":{"type":"string","enum":["published","draft","archived"],"title":"Visibility"},"documentCount":{"type":"integer","title":"Documentcount","default":0},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuserid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","name","periodType","period","visibility"],"title":"InvestorFolderResponse"},"InvestorFolderUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"periodType":{"anyOf":[{"type":"string","enum":["annual","quarterly","monthly","one_off"]},{"type":"null"}],"title":"Periodtype"},"period":{"anyOf":[{"type":"string","maxLength":20,"minLength":1},{"type":"null"}],"title":"Period"},"description":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Description"},"visibility":{"anyOf":[{"type":"string","enum":["published","draft","archived"]},{"type":"null"}],"title":"Visibility"}},"type":"object","title":"InvestorFolderUpdate"},"InvestorListResponse":{"properties":{"investors":{"items":{"$ref":"#/components/schemas/InvestorResponse"},"type":"array","title":"Investors"}},"type":"object","required":["investors"],"title":"InvestorListResponse"},"InvestorResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid"},"email":{"type":"string","title":"Email"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"firm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firm"},"invitedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitedbyuserid"},"invitedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invitedat"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["id","companyId","email"],"title":"InvestorResponse"},"InvestorSnapshotCapture":{"properties":{"folderId":{"type":"string","title":"Folderid"},"reportType":{"type":"string","enum":["profit_and_loss","balance_sheet","cash_flow"],"title":"Reporttype"},"periodLabel":{"type":"string","maxLength":120,"minLength":1,"title":"Periodlabel"},"periodStartDate":{"type":"string","format":"date","title":"Periodstartdate"},"periodEndDate":{"type":"string","format":"date","title":"Periodenddate"},"accountingBasis":{"type":"string","enum":["accrual","cash"],"title":"Accountingbasis","default":"accrual"},"documentName":{"type":"string","maxLength":200,"minLength":1,"title":"Documentname"},"documentMeta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentmeta"},"documentType":{"anyOf":[{"type":"string","enum":["pl","balance_sheet","cash_flow","investor_letter","other"]},{"type":"null"}],"title":"Documenttype"}},"type":"object","required":["folderId","reportType","periodLabel","periodStartDate","periodEndDate","documentName"],"title":"InvestorSnapshotCapture","description":"What a founder asks Porter to freeze into an investor folder.\n\nReason (POR-2080): there is deliberately no ``payload`` field. The numbers\nare rendered by the server at capture time; a client-sent payload is exactly\nthe untrusted input POR-2215 retired. Older clients that still send\n``payload``/``grouping`` have those keys ignored, never persisted."},"InvestorSnapshotView":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"folderId":{"type":"string","title":"Folderid"},"reportType":{"type":"string","enum":["profit_and_loss","balance_sheet","cash_flow"],"title":"Reporttype"},"periodLabel":{"type":"string","title":"Periodlabel"},"periodStartDate":{"type":"string","format":"date","title":"Periodstartdate"},"periodEndDate":{"type":"string","format":"date","title":"Periodenddate"},"accountingBasis":{"type":"string","enum":["accrual","cash"],"title":"Accountingbasis"},"grouping":{"type":"string","enum":["by_month","by_quarter","by_year","total_only"],"title":"Grouping"},"capturedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedat"},"capturedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedbyuserid"},"cashSettlementContractVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashsettlementcontractversion"},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid"},"capturedByName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedbyname"},"companyName":{"type":"string","title":"Companyname"},"statement":{"$ref":"#/components/schemas/SnapshotStatementResponse"}},"type":"object","required":["id","companyId","folderId","reportType","periodLabel","periodStartDate","periodEndDate","accountingBasis","grouping","companyName","statement"],"title":"InvestorSnapshotView","description":"One readable investor snapshot: audit metadata plus the frozen statement."},"InvoiceAdjustmentRequest":{"properties":{"amountDelta":{"type":"number","title":"Amountdelta","description":"Change in amount (negative for reductions, positive for increases)"},"effectiveDate":{"type":"string","title":"Effectivedate","description":"When this adjustment applies for rev rec (YYYY-MM-DD)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description for the adjustment"}},"type":"object","required":["amountDelta","effectiveDate"],"title":"InvoiceAdjustmentRequest","description":"Request to adjust an invoice amount.\n\nReason: Line items removed - adjustments now update invoice amount directly\nand create GL entries in transaction_lines for audit trail."},"InvoiceApPortalSubmissionResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"invoiceId":{"type":"string","title":"Invoiceid"},"customerId":{"type":"string","title":"Customerid"},"channel":{"type":"string","title":"Channel","default":"ap_portal"},"status":{"type":"string","title":"Status","default":"submitted"},"submittedAt":{"type":"string","title":"Submittedat"},"recordedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordedat"},"recordedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordedbyuserid"},"recordedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordedbyemail"},"externalReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalreference"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"customerNameSnapshot":{"type":"string","title":"Customernamesnapshot"},"billingDeliveryMethodSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingdeliverymethodsnapshot"},"apPlatformNameSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applatformnamesnapshot"},"apPortalUrlSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apportalurlsnapshot"},"billingInstructionsSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billinginstructionssnapshot"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","invoiceId","customerId","submittedAt","customerNameSnapshot"],"title":"InvoiceApPortalSubmissionResponse","description":"Manual AP-portal submission evidence for one invoice."},"InvoiceAuthoringLineItem":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"qty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Qty"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"libraryItemId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libraryitemid"}},"type":"object","title":"InvoiceAuthoringLineItem","description":"One prefill line for the invoice edit form."},"InvoiceAuthoringResponse":{"properties":{"invoiceId":{"type":"string","title":"Invoiceid"},"isEditable":{"type":"boolean","title":"Iseditable"},"notEditableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Noteditablereason"},"customerId":{"type":"string","title":"Customerid"},"billingContactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingcontactid"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"invoiceDate":{"type":"string","title":"Invoicedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"taxAmount":{"type":"number","title":"Taxamount","default":0.0},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentterms"},"paymentInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentinstructions"},"ccEmails":{"items":{"type":"string"},"type":"array","title":"Ccemails"},"lineItems":{"items":{"$ref":"#/components/schemas/InvoiceAuthoringLineItem"},"type":"array","title":"Lineitems"}},"type":"object","required":["invoiceId","isEditable","customerId","invoiceDate"],"title":"InvoiceAuthoringResponse","description":"Full authoring payload to prefill the invoice edit page (POR-1603).\n\nReason: The invoice detail response deliberately omits line items / tax /\npayment instructions (they live in raw_data, excluded from the API). The\nedit page needs them all to reconstruct the authoring form, plus an\neditability flag so the UI can block editing a posted invoice."},"InvoiceBatchError":{"properties":{"rowNumber":{"type":"integer","title":"Rownumber"},"message":{"type":"string","title":"Message"},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"}},"type":"object","required":["rowNumber","message"],"title":"InvoiceBatchError","description":"One per-row error returned by the batch endpoint."},"InvoiceBatchOptions":{"properties":{"createMissingCustomers":{"type":"boolean","title":"Createmissingcustomers","default":true},"skipDuplicates":{"type":"boolean","title":"Skipduplicates","default":true}},"type":"object","title":"InvoiceBatchOptions","description":"Options for the invoices batch endpoint."},"InvoiceBatchRequest":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"options":{"$ref":"#/components/schemas/InvoiceBatchOptions"},"importFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importfilename"}},"type":"object","required":["rows"],"title":"InvoiceBatchRequest","description":"Request body for POST /api/invoices/{company_id}/batch."},"InvoiceBatchResult":{"properties":{"created":{"type":"integer","title":"Created"},"updated":{"type":"integer","title":"Updated"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"$ref":"#/components/schemas/InvoiceBatchError"},"type":"array","title":"Errors"}},"type":"object","required":["created","updated","skipped","errors"],"title":"InvoiceBatchResult","description":"BatchResult returned by POST /api/invoices/{company_id}/batch."},"InvoiceBrandingSettingsResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"companyId":{"type":"string","title":"Companyid"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname"},"addressLine1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addressline1"},"addressLine2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addressline2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postalcode"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"accentColor":{"type":"string","title":"Accentcolor","default":"#2D6A4F"},"paymentInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentinstructions"},"defaultMemo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultmemo"},"footerText":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footertext"},"emailFooterText":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailfootertext"},"logoStoragePath":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logostoragepath"},"senderDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Senderdisplayname"},"senderReplyToEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Senderreplytoemail"},"logoSizePx":{"type":"integer","title":"Logosizepx","default":80},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["companyId"],"title":"InvoiceBrandingSettingsResponse","description":"Company invoice branding settings with camelCase aliases."},"InvoiceBrandingSettingsUpdate":{"properties":{"displayName":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Displayname"},"legalName":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Legalname"},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Addressline1"},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Addressline2"},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Region"},"postalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Postalcode"},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Country"},"accentColor":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Accentcolor"},"paymentInstructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Paymentinstructions"},"defaultMemo":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Defaultmemo"},"footerText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Footertext"},"emailFooterText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Emailfootertext"},"senderDisplayName":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Senderdisplayname"},"senderReplyToEmail":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Senderreplytoemail"},"logoSizePx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Logosizepx"}},"type":"object","title":"InvoiceBrandingSettingsUpdate","description":"Partial update payload for invoice branding settings."},"InvoiceCreate":{"properties":{"customerId":{"type":"string","title":"Customerid"},"invoiceDate":{"type":"string","title":"Invoicedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount"},"taxAmount":{"type":"number","minimum":0.0,"title":"Taxamount","default":0.0},"billingContactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingcontactid"},"ccEmails":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Ccemails"},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentterms"},"paymentProcessorConnectionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentprocessorconnectionid"},"paymentInstructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Paymentinstructions"},"linkedContractId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedcontractid"},"lineItems":{"items":{"$ref":"#/components/schemas/InvoiceLineItemCreate"},"type":"array","minItems":1,"title":"Lineitems"}},"type":"object","required":["customerId","invoiceDate","lineItems"],"title":"InvoiceCreate","description":"Request body for creating an invoice.\n\nReason: POR-1378 — invoice total is derived from line_items; callers do not\nauthor an independent header amount."},"InvoiceCustomerCreate":{"properties":{"displayName":{"type":"string","maxLength":200,"minLength":1,"title":"Displayname"},"defaultPaymentTerms":{"type":"string","enum":["due_on_receipt","net_7","net_10","net_15","net_30","net_60","net_90","custom"],"title":"Defaultpaymentterms","default":"net_30"},"initialContact":{"$ref":"#/components/schemas/InitialBillingContact"}},"type":"object","required":["displayName","initialContact"],"title":"InvoiceCustomerCreate","description":"Create a customer plus its first billing contact."},"InvoiceCustomerCreateResponse":{"properties":{"customer":{"$ref":"#/components/schemas/InvoiceCustomerResponse"},"contact":{"$ref":"#/components/schemas/BillingContactResponse"}},"type":"object","required":["customer","contact"],"title":"InvoiceCustomerCreateResponse","description":"Result for create customer + contact."},"InvoiceCustomerDeliveryProfile":{"properties":{"customerId":{"type":"string","title":"Customerid"},"customerName":{"type":"string","title":"Customername"},"billingDeliveryMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingdeliverymethod"},"apPlatformName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applatformname"},"apPortalUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apportalurl"},"billingInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billinginstructions"},"requiresApPortal":{"type":"boolean","title":"Requiresapportal","default":false}},"type":"object","required":["customerId","customerName"],"title":"InvoiceCustomerDeliveryProfile","description":"Customer billing profile relevant to invoice delivery."},"InvoiceCustomerResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"displayName":{"type":"string","title":"Displayname"},"defaultBillingContactId":{"type":"string","title":"Defaultbillingcontactid"},"defaultPaymentTerms":{"type":"string","enum":["due_on_receipt","net_7","net_10","net_15","net_30","net_60","net_90","custom"],"title":"Defaultpaymentterms","default":"net_30"}},"type":"object","required":["id","companyId","displayName","defaultBillingContactId"],"title":"InvoiceCustomerResponse","description":"Customer option shape used by invoice creation surfaces."},"InvoiceDeliveryOverviewResponse":{"properties":{"latestDocument":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDocumentResponse"},{"type":"null"}]},"latestDelivery":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDeliveryResponse"},{"type":"null"}]},"defaultEmailBody":{"type":"string","title":"Defaultemailbody"},"latestDocumentIsCurrent":{"type":"boolean","title":"Latestdocumentiscurrent","default":false},"customerDeliveryProfile":{"anyOf":[{"$ref":"#/components/schemas/InvoiceCustomerDeliveryProfile"},{"type":"null"}]},"latestApPortalSubmission":{"anyOf":[{"$ref":"#/components/schemas/InvoiceApPortalSubmissionResponse"},{"type":"null"}]},"sendEvidence":{"items":{"$ref":"#/components/schemas/InvoiceSendEvidenceResponse"},"type":"array","title":"Sendevidence","default":[]}},"type":"object","required":["defaultEmailBody"],"title":"InvoiceDeliveryOverviewResponse","description":"Latest document and delivery status for the invoice drawer."},"InvoiceDeliveryResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"invoiceId":{"type":"string","title":"Invoiceid"},"invoiceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicedocumentid"},"status":{"type":"string","title":"Status"},"sentToEmail":{"type":"string","title":"Senttoemail"},"sentFromEmail":{"type":"string","title":"Sentfromemail"},"sentFromName":{"type":"string","title":"Sentfromname"},"replyToEmail":{"type":"string","title":"Replytoemail"},"subject":{"type":"string","title":"Subject"},"bodyPreview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bodypreview"},"provider":{"type":"string","title":"Provider","default":"postmark"},"providerMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Providermessageid"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentat"},"failedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failedat"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyuserid"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","invoiceId","status","sentToEmail","sentFromEmail","sentFromName","replyToEmail","subject"],"title":"InvoiceDeliveryResponse","description":"Invoice email delivery attempt metadata."},"InvoiceDeliveryStatus":{"type":"string","enum":["not_sent","pending","sent","failed"],"title":"InvoiceDeliveryStatus","description":"Customer delivery status values exposed on invoice record lists."},"InvoiceDocumentResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"invoiceId":{"type":"string","title":"Invoiceid"},"version":{"type":"integer","title":"Version"},"filename":{"type":"string","title":"Filename"},"storagePath":{"type":"string","title":"Storagepath"},"contentType":{"type":"string","title":"Contenttype","default":"application/pdf"},"status":{"type":"string","title":"Status","default":"generated"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot"},"generatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generatedat"},"generatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generatedbyuserid"},"generatedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generatedbyemail"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","invoiceId","version","filename","storagePath"],"title":"InvoiceDocumentResponse","description":"Generated invoice PDF metadata."},"InvoiceDocumentStatus":{"type":"string","enum":["not_generated","generated","failed"],"title":"InvoiceDocumentStatus","description":"Generated PDF status values exposed on invoice record lists."},"InvoiceImportPreview":{"properties":{"invoices":{"items":{"$ref":"#/components/schemas/ParsedInvoice"},"type":"array","title":"Invoices"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"stats":{"$ref":"#/components/schemas/InvoiceImportStats"},"sourceFormat":{"type":"string","title":"Sourceformat"},"filename":{"type":"string","title":"Filename"},"formatDetected":{"type":"boolean","title":"Formatdetected","default":true},"fileColumns":{"items":{"type":"string"},"type":"array","title":"Filecolumns","default":[]},"needsColumnMapping":{"type":"boolean","title":"Needscolumnmapping","default":false},"unmappedColumns":{"items":{"type":"string"},"type":"array","title":"Unmappedcolumns","default":[]},"missingRequired":{"items":{"type":"string"},"type":"array","title":"Missingrequired","default":[]},"detectedMapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Detectedmapping","default":{}},"unsupportedRows":{"items":{"$ref":"#/components/schemas/SkippedRowDetail"},"type":"array","title":"Unsupportedrows","default":[]}},"type":"object","required":["invoices","errors","warnings","stats","sourceFormat","filename"],"title":"InvoiceImportPreview","description":"Result of parsing an invoice CSV file."},"InvoiceImportStats":{"properties":{"totalRows":{"type":"integer","title":"Totalrows","default":0},"validCount":{"type":"integer","title":"Validcount","default":0},"errorCount":{"type":"integer","title":"Errorcount","default":0},"warningCount":{"type":"integer","title":"Warningcount","default":0},"totalAmount":{"type":"number","title":"Totalamount","default":0.0},"totalBalance":{"type":"number","title":"Totalbalance","default":0.0},"statusBreakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Statusbreakdown","default":{}},"customersMatched":{"type":"integer","title":"Customersmatched","default":0},"customersUnmatched":{"type":"integer","title":"Customersunmatched","default":0},"subscriptionsMatched":{"type":"integer","title":"Subscriptionsmatched","default":0},"subscriptionsUnmatched":{"type":"integer","title":"Subscriptionsunmatched","default":0},"newInvoices":{"type":"integer","title":"Newinvoices","default":0},"updatedInvoices":{"type":"integer","title":"Updatedinvoices","default":0},"existingInvoices":{"type":"integer","title":"Existinginvoices","default":0},"unsupportedRowCount":{"type":"integer","title":"Unsupportedrowcount","default":0}},"type":"object","title":"InvoiceImportStats","description":"Statistics for the import preview."},"InvoiceLibraryItemCreate":{"properties":{"name":{"type":"string","maxLength":160,"minLength":1,"title":"Name"},"defaultDescription":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Defaultdescription"},"defaultRate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Defaultrate"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"}},"type":"object","required":["name"],"title":"InvoiceLibraryItemCreate","description":"Create a reusable invoice item."},"InvoiceLibraryItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"name":{"type":"string","title":"Name"},"defaultDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultdescription"},"defaultRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Defaultrate"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"archived":{"type":"boolean","title":"Archived","default":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","name"],"title":"InvoiceLibraryItemResponse","description":"Reusable invoice item with optional revenue-account mapping."},"InvoiceLibraryItemUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Name"},"defaultDescription":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Defaultdescription"},"defaultRate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Defaultrate"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"InvoiceLibraryItemUpdate","description":"Patch a reusable invoice item."},"InvoiceLifecycleStatus":{"type":"string","enum":["created","issued","voided","written_off"],"title":"InvoiceLifecycleStatus","description":"Customer-facing invoice lifecycle values."},"InvoiceLineItemCreate":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount"},"qty":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Qty"},"rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Rate"},"revenueSegment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Revenuesegment"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"libraryItemId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libraryitemid"}},"type":"object","title":"InvoiceLineItemCreate","description":"Line-level accounting for invoice creation."},"InvoiceListItem":{"properties":{"id":{"type":"string","title":"Id"},"customerId":{"type":"string","title":"Customerid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"issueDate":{"type":"string","title":"Issuedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"status":{"$ref":"#/components/schemas/InvoiceStatus"},"issueState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuestate"},"lifecycleStatus":{"$ref":"#/components/schemas/InvoiceLifecycleStatus","default":"issued"},"paymentStatus":{"$ref":"#/components/schemas/InvoicePaymentStatus","default":"unpaid"},"postingStatus":{"$ref":"#/components/schemas/InvoicePostingStatus","default":"pending"},"documentStatus":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDocumentStatus"},{"type":"null"}]},"deliveryStatus":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDeliveryStatus"},{"type":"null"}]},"sendOverdue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sendoverdue"},"amount":{"type":"number","title":"Amount"},"amountDue":{"type":"number","title":"Amountdue"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"qboInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboinvoiceid"},"matchStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchstatus","default":"unmatched"},"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"subscriptionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionname"},"isVoided":{"type":"boolean","title":"Isvoided","default":false},"isWrittenOff":{"type":"boolean","title":"Iswrittenoff","default":false},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["id","customerId","issueDate","status","amount","amountDue"],"title":"InvoiceListItem","description":"Simplified invoice for list views.\n\nReason: Excludes line_items to reduce payload size for list endpoints."},"InvoiceListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvoiceListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"InvoiceListResponse","description":"Paginated invoice list response."},"InvoiceMatch":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"confidence":{"type":"number","title":"Confidence","default":0.0},"matchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchtype"}},"type":"object","title":"InvoiceMatch","description":"Potential invoice match from the database."},"InvoiceNumberingResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"companyId":{"type":"string","title":"Companyid"},"prefix":{"type":"string","title":"Prefix","default":"INV-"},"nextNumber":{"type":"integer","title":"Nextnumber","default":1},"padding":{"type":"integer","title":"Padding","default":0},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["companyId"],"title":"InvoiceNumberingResponse","description":"Company invoice numbering settings."},"InvoiceNumberingUpdate":{"properties":{"prefix":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Prefix"},"nextNumber":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Nextnumber"},"padding":{"anyOf":[{"type":"integer","maximum":12.0,"minimum":0.0},{"type":"null"}],"title":"Padding"}},"type":"object","title":"InvoiceNumberingUpdate","description":"Partial update payload for invoice numbering settings."},"InvoicePaymentApplicationResponse":{"properties":{"id":{"type":"string","title":"Id"},"paymentId":{"type":"string","title":"Paymentid"},"invoiceId":{"type":"string","title":"Invoiceid"},"amount":{"type":"number","title":"Amount"},"createdAt":{"type":"string","title":"Createdat"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"paymentReferenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentreferencenumber"}},"type":"object","required":["id","paymentId","invoiceId","amount","createdAt"],"title":"InvoicePaymentApplicationResponse","description":"A payment application row for invoice-detail payment history."},"InvoicePaymentStatus":{"type":"string","enum":["unpaid","partial","paid"],"title":"InvoicePaymentStatus","description":"Settlement values independent from invoice lifecycle."},"InvoicePostingStatus":{"type":"string","enum":["pending","posted"],"title":"InvoicePostingStatus","description":"Porter GL posting values."},"InvoiceReadModel":{"properties":{"id":{"type":"string","title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"issueState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuestate"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerref"},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contactname"},"customerExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerexternalid"},"subscriptionExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionexternalid"},"externalContactId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalcontactid"},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"qboInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboinvoiceid"},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transactionid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"invoiceLink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicelink"},"pdfDownloadLink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdfdownloadlink"},"isVoided":{"type":"boolean","title":"Isvoided","default":false},"voidedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedat"},"voidedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedreason"},"isWrittenOff":{"type":"boolean","title":"Iswrittenoff","default":false},"writtenOffAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffat"},"writtenOffReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffreason"},"writtenOffAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Writtenoffamount"},"writtenOffQboCreditMemoId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffqbocreditmemoid"},"writtenOffQboPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffqbopaymentid"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Rawdata"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customeremail"},"billingContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingcontactemail"},"billingContactName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingcontactname"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"amountPaid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amountpaid"},"amountDue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amountdue"},"daysPastDue":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dayspastdue"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"lifecycleStatus":{"type":"string","title":"Lifecyclestatus","default":"issued"},"paymentStatus":{"type":"string","title":"Paymentstatus","default":"unpaid"},"postingStatus":{"type":"string","title":"Postingstatus","default":"pending"},"documentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentstatus"},"deliveryStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverystatus"},"sendOverdue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sendoverdue"},"sentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Sentdate"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"subscriptionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionname"},"matchStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchstatus","default":"unmatched"},"modifications":{"items":{"$ref":"#/components/schemas/app__repositories__invoices__InvoiceModification"},"type":"array","title":"Modifications","default":[]}},"type":"object","required":["id"],"title":"InvoiceReadModel","description":"Invoice read/display projection with joined and computed fields."},"InvoiceReauthor":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"invoiceDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount"},"taxAmount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Taxamount"},"ccEmails":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Ccemails"},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentterms"},"paymentInstructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Paymentinstructions"},"lineItems":{"anyOf":[{"items":{"$ref":"#/components/schemas/InvoiceLineItemCreate"},"type":"array","minItems":1},{"type":"null"}],"title":"Lineitems"}},"type":"object","title":"InvoiceReauthor","description":"Supplied edit fields; omitted values are preserved (POR-2393)."},"InvoiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"customerId":{"type":"string","title":"Customerid"},"issueState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuestate"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/TransactionProvenance"},{"type":"null"}]},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customeremail"},"billingContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingcontactemail"},"billingContactName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billingcontactname"},"ccEmails":{"items":{"type":"string"},"type":"array","title":"Ccemails"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"issueDate":{"type":"string","title":"Issuedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"status":{"$ref":"#/components/schemas/InvoiceStatus"},"lifecycleStatus":{"$ref":"#/components/schemas/InvoiceLifecycleStatus","default":"issued"},"paymentStatus":{"$ref":"#/components/schemas/InvoicePaymentStatus","default":"unpaid"},"postingStatus":{"$ref":"#/components/schemas/InvoicePostingStatus","default":"pending"},"documentStatus":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDocumentStatus"},{"type":"null"}]},"deliveryStatus":{"anyOf":[{"$ref":"#/components/schemas/InvoiceDeliveryStatus"},{"type":"null"}]},"amount":{"type":"number","title":"Amount"},"amountPaid":{"type":"number","title":"Amountpaid","default":0.0},"amountDue":{"type":"number","title":"Amountdue"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"modifications":{"items":{"$ref":"#/components/schemas/app__services__invoices__responses__InvoiceModification"},"type":"array","title":"Modifications"},"qboInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboinvoiceid"},"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"subscriptionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionname"},"matchStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchstatus","default":"unmatched"},"isVoided":{"type":"boolean","title":"Isvoided","default":false},"voidedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedat"},"voidedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedreason"},"isWrittenOff":{"type":"boolean","title":"Iswrittenoff","default":false},"writtenOffAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffat"},"writtenOffReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writtenoffreason"},"writtenOffAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Writtenoffamount"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["id","companyId","customerId","issueDate","status","amount","amountDue","createdAt","updatedAt"],"title":"InvoiceResponse","description":"Full invoice response with all fields."},"InvoiceSendEvidenceResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"invoiceId":{"type":"string","title":"Invoiceid"},"kind":{"type":"string","title":"Kind","default":"email_send"},"source":{"type":"string","title":"Source"},"sentAt":{"type":"string","title":"Sentat"},"recipientEmails":{"items":{"type":"string"},"type":"array","title":"Recipientemails","default":[]},"subjectSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subjectsnapshot"},"matchBasis":{"type":"string","title":"Matchbasis"},"sourceInboundEmailId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceinboundemailid"},"sourceInvoiceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceinvoicedocumentid"},"recordedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordedbyuserid"},"recordedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordedbyemail"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"retractedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retractedat"},"retractedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retractedbyuserid"},"retractedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retractedbyemail"},"retractionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retractionreason"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","companyId","invoiceId","source","sentAt","matchBasis"],"title":"InvoiceSendEvidenceResponse","description":"One piece of evidence that an invoice was sent outside Porter."},"InvoiceSortField":{"type":"string","enum":["date","dueDate","amount","customer","status","referenceNumber"],"title":"InvoiceSortField","description":"Allowed sort fields for invoice listing.\n\nReason: Restricts sort fields to prevent SQL injection and invalid queries."},"InvoiceStatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"open":{"type":"integer","title":"Open"},"paid":{"type":"integer","title":"Paid"},"overdue":{"type":"integer","title":"Overdue"},"voided":{"type":"integer","title":"Voided","default":0},"totalAmountDue":{"type":"number","title":"Totalamountdue"},"unmatchedCount":{"type":"integer","title":"Unmatchedcount","default":0}},"type":"object","required":["total","open","paid","overdue","totalAmountDue"],"title":"InvoiceStatsResponse","description":"Invoice statistics summary.\n\nReason: Status is event-derived from invoice settlement applications:\n- open = no settlement received (excludes voided)\n- paid = fully paid (amount_paid >= amount, excludes voided)\n- overdue = unsettled and past due_date (excludes voided)\n- voided = explicitly voided invoices (stored status, not computed)"},"InvoiceStatus":{"type":"string","enum":["draft","open","sent","partial","paid","overdue","voided","void","written_off"],"title":"InvoiceStatus","description":"Invoice status values.\n\nReason: Enum ensures type safety and documents valid status values.\nIncludes invoice lifecycle values accepted by imported and Porter-created rows."},"InvoiceUpdate":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"invoiceDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"status":{"anyOf":[{"$ref":"#/components/schemas/InvoiceStatus"},{"type":"null"}]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"additionalProperties":false,"type":"object","title":"InvoiceUpdate","description":"Request body for updating an invoice.\nReason: All fields optional to support partial updates via PATCH.\nReason: Line items removed - business detail stored in transaction_lines memo field."},"IsInternalResponse":{"properties":{"isInternal":{"type":"boolean","title":"Isinternal"}},"type":"object","required":["isInternal"],"title":"IsInternalResponse"},"IssueInvoiceRequest":{"properties":{"toEmail":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Toemail"},"ccEmails":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Ccemails"},"subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Subject"},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"},"saveRecipientToCustomer":{"type":"boolean","title":"Saverecipienttocustomer","default":false}},"type":"object","title":"IssueInvoiceRequest","description":"Request body for explicit invoice issue/send."},"IssueInvoiceResult":{"properties":{"invoice":{"$ref":"#/components/schemas/InvoiceReadModel"},"document":{"$ref":"#/components/schemas/InvoiceDocumentResponse"},"delivery":{"$ref":"#/components/schemas/InvoiceDeliveryResponse"},"deliveryReceipt":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Deliveryreceipt"}},"type":"object","required":["invoice","document","delivery"],"title":"IssueInvoiceResult","description":"Result of a successful issue/send operation."},"JournalEntriesListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/JournalEntryResponse"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"},"statusCounts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Statuscounts"}},"type":"object","required":["entries","total","offset","limit"],"title":"JournalEntriesListResponse","description":"Paginated list of journal entries."},"JournalEntryDetail":{"properties":{"scheduleId":{"type":"string","title":"Scheduleid"},"scheduleTitle":{"type":"string","title":"Scheduletitle"},"scheduleType":{"type":"string","title":"Scheduletype"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["scheduleId","scheduleTitle","scheduleType","periodStart","periodEnd","amount"],"title":"JournalEntryDetail","description":"Detail of which schedules contributed to a JE line."},"JournalEntryLine":{"properties":{"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"debit":{"type":"number","title":"Debit"},"credit":{"type":"number","title":"Credit"}},"type":"object","required":["accountId","accountName","debit","credit"],"title":"JournalEntryLine","description":"A line in a journal entry."},"JournalEntryLinePreview":{"properties":{"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"debit":{"type":"number","title":"Debit"},"credit":{"type":"number","title":"Credit"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["accountName","debit","credit"],"title":"JournalEntryLinePreview","description":"A single line in the journal entry preview."},"JournalEntryReadIdentity":{"properties":{"entryRef":{"type":"string","minLength":1,"title":"Entryref"},"entryKind":{"type":"string","enum":["computed_period","generated_receipt","manual","imported"],"title":"Entrykind"},"journalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Journalentryid"}},"type":"object","required":["entryRef","entryKind"],"title":"JournalEntryReadIdentity","description":"Atomic identity returned by journal-entry read surfaces."},"JournalEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"periodYear":{"type":"integer","title":"Periodyear"},"periodMonth":{"type":"integer","title":"Periodmonth"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"fromUnbilled":{"type":"number","title":"Fromunbilled"},"fromDeferred":{"type":"number","title":"Fromdeferred"},"totalRecognized":{"type":"number","title":"Totalrecognized"},"subscriptionCount":{"type":"integer","title":"Subscriptioncount"},"unbilledSubscriptionCount":{"type":"integer","title":"Unbilledsubscriptioncount"},"deferredSubscriptionCount":{"type":"integer","title":"Deferredsubscriptioncount"},"jeDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jedate"},"jeMemo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jememo"},"qboJournalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbojournalentryid"},"qboJournalEntryRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbojournalentryref"},"status":{"type":"string","title":"Status"},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedat"},"createdAt":{"type":"string","title":"Createdat"},"revenueSegments":{"items":{"type":"string"},"type":"array","title":"Revenuesegments","default":[]},"accountTotals":{"additionalProperties":{"type":"number"},"type":"object","title":"Accounttotals","default":{}}},"type":"object","required":["id","companyId","periodYear","periodMonth","periodStart","periodEnd","fromUnbilled","fromDeferred","totalRecognized","subscriptionCount","unbilledSubscriptionCount","deferredSubscriptionCount","jeDate","jeMemo","qboJournalEntryId","qboJournalEntryRef","status","postedAt","createdAt"],"title":"JournalEntryResponse","description":"A revenue recognition journal entry."},"LastClosedPeriodScopeSelection":{"properties":{"kind":{"type":"string","const":"last_closed_period","title":"Kind"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"LastClosedPeriodScopeSelection"},"LeaseCreate":{"properties":{"leaseName":{"type":"string","title":"Leasename"},"propertyAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Propertyaddress"},"landlordName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Landlordname"},"leaseStartDate":{"type":"string","title":"Leasestartdate"},"leaseEndDate":{"type":"string","title":"Leaseenddate"},"monthlyRent":{"type":"number","title":"Monthlyrent"},"annualEscalationPct":{"type":"number","title":"Annualescalationpct","default":0},"securityDepositAmount":{"type":"number","title":"Securitydepositamount","default":0},"paymentDayOfMonth":{"type":"integer","title":"Paymentdayofmonth","default":1},"rentExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rentexpenseaccountid"},"deferredRentAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deferredrentaccountid"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["leaseName","leaseStartDate","leaseEndDate","monthlyRent"],"title":"LeaseCreate","description":"Create a new lease.\n\nReason: All required fields for lease setup plus optional schedule\ngeneration flag. CamelCase aliases for frontend compatibility."},"LeaseResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"leaseName":{"type":"string","title":"Leasename"},"propertyAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Propertyaddress"},"landlordName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Landlordname"},"leaseStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leasestartdate"},"leaseEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leaseenddate"},"monthlyRent":{"type":"number","title":"Monthlyrent","default":0},"annualEscalationPct":{"type":"number","title":"Annualescalationpct","default":0},"securityDepositAmount":{"type":"number","title":"Securitydepositamount","default":0},"paymentDayOfMonth":{"type":"integer","title":"Paymentdayofmonth","default":1},"rentExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rentexpenseaccountid"},"deferredRentAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deferredrentaccountid"},"status":{"type":"string","title":"Status","default":"active"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","leaseName"],"title":"LeaseResponse","description":"Operating lease record."},"LeaseUpdate":{"properties":{"leaseName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leasename"},"propertyAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Propertyaddress"},"landlordName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Landlordname"},"leaseStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leasestartdate"},"leaseEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leaseenddate"},"monthlyRent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthlyrent"},"annualEscalationPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annualescalationpct"},"securityDepositAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Securitydepositamount"},"paymentDayOfMonth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentdayofmonth"},"rentExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rentexpenseaccountid"},"deferredRentAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deferredrentaccountid"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"LeaseUpdate","description":"Partial update for a lease.\n\nReason: All fields optional for PATCH semantics."},"LedgerLineReconciliationStateResponse":{"properties":{"ledgerLineId":{"type":"string","title":"Ledgerlineid"},"status":{"type":"string","title":"Status"},"isOutstanding":{"type":"boolean","title":"Isoutstanding"},"isCleared":{"type":"boolean","title":"Iscleared"},"firstOutstandingPeriod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstoutstandingperiod"},"clearedPeriod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clearedperiod"}},"type":"object","required":["ledgerLineId","status","isOutstanding","isCleared"],"title":"LedgerLineReconciliationStateResponse","description":"Response for changing a GL-only ledger line's reconciliation state."},"LedgerLineReconciliationStatusRequest":{"properties":{"status":{"type":"string","title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["status"],"title":"LedgerLineReconciliationStatusRequest","description":"Request body for GL-only ledger line reconciliation state."},"LinkSubscriptionRequest":{"properties":{"subscriptionId":{"type":"string","title":"Subscriptionid"}},"type":"object","required":["subscriptionId"],"title":"LinkSubscriptionRequest","description":"Request body for linking invoice to subscription."},"LinkSubscriptionResponse":{"properties":{"invoiceId":{"type":"string","title":"Invoiceid"},"subscriptionId":{"type":"string","title":"Subscriptionid"},"eventId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eventid"},"eventDetails":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eventdetails"},"ledgerRowsChanged":{"type":"boolean","title":"Ledgerrowschanged","default":false},"ledgerRefreshOutcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledgerrefreshoutcome"}},"type":"object","required":["invoiceId","subscriptionId"],"title":"LinkSubscriptionResponse","description":"Response after linking invoice to subscription."},"LinkTokenResponse":{"properties":{"linkToken":{"type":"string","title":"Linktoken"},"expiration":{"type":"string","title":"Expiration"}},"type":"object","required":["linkToken","expiration"],"title":"LinkTokenResponse","description":"Response for link token creation."},"LinkedDocumentResponse":{"properties":{"id":{"type":"string","title":"Id"},"documentId":{"type":"string","title":"Documentid"},"targetType":{"type":"string","title":"Targettype"},"targetId":{"type":"string","title":"Targetid"},"filename":{"type":"string","title":"Filename"},"originalFilename":{"type":"string","title":"Originalfilename"},"filetype":{"type":"string","title":"Filetype"},"filesize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Filesize"},"contentHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contenthash"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"storageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storageurl"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"createdAt":{"type":"string","title":"Createdat"}},"type":"object","required":["id","documentId","targetType","targetId","filename","originalFilename","filetype","category","createdAt"],"title":"LinkedDocumentResponse","description":"Document metadata attached to another Porter record."},"ListBlock-Input":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"list","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"primary":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Primary","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"secondary":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Secondary"},"secondaryFormat":{"anyOf":[{"type":"string","enum":["money","number","percent","text"]},{"type":"null"}],"title":"Secondaryformat","description":"Display format for secondary. Required whenever secondary is present; omit only when secondary is omitted."},"badge":{"anyOf":[{"$ref":"#/components/schemas/BadgeSpec-Input"},{"type":"null"}]},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Input"},{"type":"null"}],"description":"Optional list row interaction. The click evaluates expressions against the clicked row, sets artifact-local context, and can open a configured detail surface."}},"additionalProperties":false,"type":"object","required":["type","id","dataRef","primary"],"title":"ListBlock"},"ListBlock-Output":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"list","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"primary":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Primary","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"secondary":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Secondary"},"secondaryFormat":{"anyOf":[{"type":"string","enum":["money","number","percent","text"]},{"type":"null"}],"title":"Secondaryformat","description":"Display format for secondary. Required whenever secondary is present; omit only when secondary is omitted."},"badge":{"anyOf":[{"$ref":"#/components/schemas/BadgeSpec-Output"},{"type":"null"}]},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Output"},{"type":"null"}],"description":"Optional list row interaction. The click evaluates expressions against the clicked row, sets artifact-local context, and can open a configured detail surface."}},"additionalProperties":false,"type":"object","required":["type","id","dataRef","primary"],"title":"ListBlock"},"LiteralExpr":{"properties":{"op":{"type":"string","const":"literal","title":"Op"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Value"}},"additionalProperties":false,"type":"object","required":["op","value"],"title":"LiteralExpr"},"LoanActualPaymentCreate":{"properties":{"paymentDate":{"type":"string","title":"Paymentdate"},"cashAmount":{"type":"number","title":"Cashamount"},"sourceBankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcebanktransactionid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["paymentDate","cashAmount"],"title":"LoanActualPaymentCreate","description":"Confirmed loan cash payment recorded against a loan schedule."},"LoanActualPaymentResponse":{"properties":{"id":{"type":"string","title":"Id"},"scheduleId":{"type":"string","title":"Scheduleid"},"paymentNumber":{"type":"integer","title":"Paymentnumber"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"paymentDate":{"type":"string","title":"Paymentdate"},"daysInPeriod":{"type":"integer","title":"Daysinperiod"},"beginningPrincipal":{"type":"number","title":"Beginningprincipal"},"interestAmount":{"type":"number","title":"Interestamount"},"principalAmount":{"type":"number","title":"Principalamount"},"paymentAmount":{"type":"number","title":"Paymentamount"},"endingPrincipal":{"type":"number","title":"Endingprincipal"},"lineStatus":{"type":"string","title":"Linestatus"},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedat"},"sourceBankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcebanktransactionid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"servicingSequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Servicingsequence"},"allocationBasis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allocationbasis"},"glDisposition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gldisposition"},"allocationKernelVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allocationkernelversion"},"glShapeVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glshapeversion"},"expectedSemanticGlShapeFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expectedsemanticglshapefingerprint"},"matchStateFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchstatefingerprint"},"bankGlDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankgldate"},"servicingEffectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Servicingeffectivedate"},"migrationReviewState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Migrationreviewstate"},"reviewedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewedat"},"reviewedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewedbyuserid"},"reviewedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewedbyemail"}},"type":"object","required":["id","scheduleId","paymentNumber","periodStart","periodEnd","paymentDate","daysInPeriod","beginningPrincipal","interestAmount","principalAmount","paymentAmount","endingPrincipal","lineStatus"],"title":"LoanActualPaymentResponse","description":"Actual loan payment row with computed interest-first allocation."},"LoanBankPaymentAllocationPreview":{"properties":{"paymentDate":{"type":"string","title":"Paymentdate"},"cashAmount":{"type":"number","title":"Cashamount"},"beginningPrincipal":{"type":"number","title":"Beginningprincipal"},"interestAmount":{"type":"number","title":"Interestamount"},"principalAmount":{"type":"number","title":"Principalamount"},"endingPrincipal":{"type":"number","title":"Endingprincipal"},"daysInPeriod":{"type":"integer","title":"Daysinperiod"},"servicingSequence":{"type":"integer","title":"Servicingsequence"}},"type":"object","required":["paymentDate","cashAmount","beginningPrincipal","interestAmount","principalAmount","endingPrincipal","daysInPeriod","servicingSequence"],"title":"LoanBankPaymentAllocationPreview","description":"Previewed allocation for one bank-backed loan payment."},"LoanBankPaymentMatchApplyRequest":{"properties":{"scheduleId":{"type":"string","title":"Scheduleid"},"bankTransactionId":{"type":"string","title":"Banktransactionid"},"liabilityAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Liabilityaccountid"},"interestExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interestexpenseaccountid"},"replaceExistingUnpostedCategory":{"type":"boolean","title":"Replaceexistingunpostedcategory","default":false},"preservePostedGl":{"type":"boolean","title":"Preservepostedgl","default":false},"postedInterestLedgerLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedinterestledgerlineid"},"openingLiabilityAlreadyBooked":{"type":"boolean","title":"Openingliabilityalreadybooked","default":false},"noAccruedInterestAccounting":{"type":"boolean","title":"Noaccruedinterestaccounting","default":false},"idempotencyKey":{"type":"string","format":"uuid","title":"Idempotencykey"},"expectedStateFingerprint":{"type":"string","title":"Expectedstatefingerprint"}},"type":"object","required":["scheduleId","bankTransactionId","idempotencyKey","expectedStateFingerprint"],"title":"LoanBankPaymentMatchApplyRequest","description":"Apply request for a previewed loan-bank match."},"LoanBankPaymentMatchPreviewRequest":{"properties":{"scheduleId":{"type":"string","title":"Scheduleid"},"bankTransactionId":{"type":"string","title":"Banktransactionid"},"liabilityAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Liabilityaccountid"},"interestExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interestexpenseaccountid"},"replaceExistingUnpostedCategory":{"type":"boolean","title":"Replaceexistingunpostedcategory","default":false},"preservePostedGl":{"type":"boolean","title":"Preservepostedgl","default":false},"postedInterestLedgerLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedinterestledgerlineid"},"openingLiabilityAlreadyBooked":{"type":"boolean","title":"Openingliabilityalreadybooked","default":false},"noAccruedInterestAccounting":{"type":"boolean","title":"Noaccruedinterestaccounting","default":false}},"type":"object","required":["scheduleId","bankTransactionId"],"title":"LoanBankPaymentMatchPreviewRequest","description":"Preview request for matching a loan schedule to one bank transaction."},"LoanBankPaymentMatchPreviewResponse":{"properties":{"scheduleId":{"type":"string","title":"Scheduleid"},"bankTransactionId":{"type":"string","title":"Banktransactionid"},"allocation":{"$ref":"#/components/schemas/LoanBankPaymentAllocationPreview"},"liabilityAccountId":{"type":"string","title":"Liabilityaccountid"},"liabilityAccountName":{"type":"string","title":"Liabilityaccountname"},"interestExpenseAccountId":{"type":"string","title":"Interestexpenseaccountid"},"interestExpenseAccountName":{"type":"string","title":"Interestexpenseaccountname"},"glDisposition":{"type":"string","title":"Gldisposition"},"stateFingerprint":{"type":"string","title":"Statefingerprint"},"glShapeFingerprint":{"type":"string","title":"Glshapefingerprint"},"companyWritesEnabled":{"type":"boolean","title":"Companywritesenabled"},"replayed":{"type":"boolean","title":"Replayed","default":false},"loanActualPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loanactualpaymentid"}},"type":"object","required":["scheduleId","bankTransactionId","allocation","liabilityAccountId","liabilityAccountName","interestExpenseAccountId","interestExpenseAccountName","glDisposition","stateFingerprint","glShapeFingerprint","companyWritesEnabled"],"title":"LoanBankPaymentMatchPreviewResponse","description":"Loan-bank match preview/apply response."},"LoanBankPaymentUnmatchRequest":{"properties":{"bankTransactionId":{"type":"string","title":"Banktransactionid"},"idempotencyKey":{"type":"string","format":"uuid","title":"Idempotencykey"},"expectedStateFingerprint":{"type":"string","title":"Expectedstatefingerprint"}},"type":"object","required":["bankTransactionId","idempotencyKey","expectedStateFingerprint"],"title":"LoanBankPaymentUnmatchRequest","description":"Request to detach a bank-backed loan actual payment."},"LoanBankPaymentUnmatchResponse":{"properties":{"bankTransactionId":{"type":"string","title":"Banktransactionid"},"loanActualPaymentId":{"type":"string","title":"Loanactualpaymentid"},"stateFingerprint":{"type":"string","title":"Statefingerprint"},"replayed":{"type":"boolean","title":"Replayed","default":false}},"type":"object","required":["bankTransactionId","loanActualPaymentId","stateFingerprint"],"title":"LoanBankPaymentUnmatchResponse","description":"Response after unmatching a loan-backed bank transaction."},"LoanLineResponse":{"properties":{"id":{"type":"string","title":"Id"},"scheduleId":{"type":"string","title":"Scheduleid"},"paymentNumber":{"type":"integer","title":"Paymentnumber"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"paymentDate":{"type":"string","title":"Paymentdate"},"daysInPeriod":{"type":"integer","title":"Daysinperiod"},"beginningPrincipal":{"type":"number","title":"Beginningprincipal"},"interestAmount":{"type":"number","title":"Interestamount"},"principalAmount":{"type":"number","title":"Principalamount"},"paymentAmount":{"type":"number","title":"Paymentamount"},"endingPrincipal":{"type":"number","title":"Endingprincipal"},"lineStatus":{"type":"string","title":"Linestatus"},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedat"}},"type":"object","required":["id","scheduleId","paymentNumber","periodStart","periodEnd","paymentDate","daysInPeriod","beginningPrincipal","interestAmount","principalAmount","paymentAmount","endingPrincipal","lineStatus"],"title":"LoanLineResponse","description":"A single loan payment row with principal/interest split."},"LoanPrincipalAdjustmentCreate":{"properties":{"sourceLedgerLineId":{"type":"string","title":"Sourceledgerlineid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["sourceLedgerLineId"],"title":"LoanPrincipalAdjustmentCreate","description":"Exact posted journal-entry line to recognize as principal-only servicing."},"LoanPrincipalAdjustmentResponse":{"properties":{"id":{"type":"string","title":"Id"},"scheduleId":{"type":"string","title":"Scheduleid"},"adjustmentNumber":{"type":"integer","title":"Adjustmentnumber"},"effectiveDate":{"type":"string","title":"Effectivedate"},"daysSincePriorEvent":{"type":"integer","title":"Dayssincepriorevent"},"beginningPrincipal":{"type":"number","title":"Beginningprincipal"},"principalAmount":{"type":"number","title":"Principalamount"},"endingPrincipal":{"type":"number","title":"Endingprincipal"},"accruedInterestBefore":{"type":"number","title":"Accruedinterestbefore"},"accruedInterestAfter":{"type":"number","title":"Accruedinterestafter"},"sourceJournalEntryId":{"type":"string","title":"Sourcejournalentryid"},"sourceLedgerEventId":{"type":"string","title":"Sourceledgereventid"},"sourceLedgerLineId":{"type":"string","title":"Sourceledgerlineid"},"sourceLedgerLineKey":{"type":"string","title":"Sourceledgerlinekey"},"sourceAccountId":{"type":"string","title":"Sourceaccountid"},"sourceEvidence":{"additionalProperties":true,"type":"object","title":"Sourceevidence"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"allocationKernelVersion":{"type":"string","title":"Allocationkernelversion"}},"type":"object","required":["id","scheduleId","adjustmentNumber","effectiveDate","daysSincePriorEvent","beginningPrincipal","principalAmount","endingPrincipal","accruedInterestBefore","accruedInterestAfter","sourceJournalEntryId","sourceLedgerEventId","sourceLedgerLineId","sourceLedgerLineKey","sourceAccountId","sourceEvidence","allocationKernelVersion"],"title":"LoanPrincipalAdjustmentResponse","description":"Principal-only loan event plus the canonical ledger evidence it claims."},"LoanProjectionLineResponse":{"properties":{"id":{"type":"string","title":"Id"},"scheduleId":{"type":"string","title":"Scheduleid"},"rowKind":{"type":"string","title":"Rowkind"},"paymentNumber":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paymentnumber"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"paymentDate":{"type":"string","title":"Paymentdate"},"daysInPeriod":{"type":"integer","title":"Daysinperiod"},"beginningPrincipal":{"type":"number","title":"Beginningprincipal"},"interestAmount":{"type":"number","title":"Interestamount"},"principalAmount":{"type":"number","title":"Principalamount"},"paymentAmount":{"type":"number","title":"Paymentamount"},"endingPrincipal":{"type":"number","title":"Endingprincipal"},"lineStatus":{"type":"string","title":"Linestatus"},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedat"},"sourceBankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcebanktransactionid"},"sourceJournalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcejournalentryid"},"sourceLedgerEventId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceledgereventid"},"sourceLedgerLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceledgerlineid"},"sourceLedgerLineKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceledgerlinekey"},"sourceAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceaccountid"},"sourceEvidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sourceevidence"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"servicingSequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Servicingsequence"},"allocationBasis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allocationbasis"},"glDisposition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gldisposition"},"allocationKernelVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allocationkernelversion"},"glShapeVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glshapeversion"},"expectedSemanticGlShapeFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expectedsemanticglshapefingerprint"},"matchStateFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchstatefingerprint"},"bankGlDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankgldate"},"servicingEffectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Servicingeffectivedate"},"migrationReviewState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Migrationreviewstate"},"reviewedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewedat"},"reviewedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewedbyuserid"},"reviewedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewedbyemail"}},"type":"object","required":["id","scheduleId","rowKind","periodStart","periodEnd","paymentDate","daysInPeriod","beginningPrincipal","interestAmount","principalAmount","paymentAmount","endingPrincipal","lineStatus"],"title":"LoanProjectionLineResponse","description":"Canonical ordered loan history and forecast row for thin consumers."},"LoanTermsCreate":{"properties":{"annualInterestRate":{"type":"number","title":"Annualinterestrate"},"firstPaymentDate":{"type":"string","title":"Firstpaymentdate"},"termMonths":{"type":"integer","title":"Termmonths"},"scheduledPaymentAmount":{"type":"number","title":"Scheduledpaymentamount"},"paymentFrequency":{"type":"string","title":"Paymentfrequency","default":"monthly"},"dayCountConvention":{"type":"string","title":"Daycountconvention","default":"actual_365"},"recomputePolicy":{"type":"string","title":"Recomputepolicy","default":"hold_payment_shorten_term"}},"type":"object","required":["annualInterestRate","firstPaymentDate","termMonths","scheduledPaymentAmount"],"title":"LoanTermsCreate","description":"Loan-specific creation terms for schedule_type='loan'."},"LoanTermsResponse":{"properties":{"annualInterestRate":{"type":"number","title":"Annualinterestrate"},"firstPaymentDate":{"type":"string","title":"Firstpaymentdate"},"termMonths":{"type":"integer","title":"Termmonths"},"scheduledPaymentAmount":{"type":"number","title":"Scheduledpaymentamount"},"paymentFrequency":{"type":"string","title":"Paymentfrequency","default":"monthly"},"dayCountConvention":{"type":"string","title":"Daycountconvention","default":"actual_365"},"recomputePolicy":{"type":"string","title":"Recomputepolicy","default":"hold_payment_shorten_term"},"scheduleId":{"type":"string","title":"Scheduleid"},"companyId":{"type":"string","title":"Companyid"}},"type":"object","required":["annualInterestRate","firstPaymentDate","termMonths","scheduledPaymentAmount","scheduleId","companyId"],"title":"LoanTermsResponse","description":"Persisted loan-specific terms."},"ManualJELineInput":{"properties":{"accountId":{"type":"string","title":"Accountid"},"postingType":{"type":"string","enum":["debit","credit"],"title":"Postingtype"},"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"partyType":{"anyOf":[{"type":"string","enum":["vendor","customer"]},{"type":"null"}],"title":"Partytype"},"partyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partyid"}},"type":"object","required":["accountId","postingType","amount"],"title":"ManualJELineInput","description":"A single debit/credit line for a manual journal entry."},"ManualPaymentProcessorCreate":{"properties":{"displayName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Displayname"},"instructions":{"type":"string","maxLength":2000,"minLength":1,"title":"Instructions"},"makeDefault":{"type":"boolean","title":"Makedefault","default":true}},"additionalProperties":false,"type":"object","required":["instructions"],"title":"ManualPaymentProcessorCreate","description":"Manual payment instructions for invoice PDFs and audit state."},"ManualTransactionRequest":{"properties":{"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"proposedAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaccountid"},"bankAccountId":{"type":"string","title":"Bankaccountid"},"txnDate":{"type":"string","title":"Txndate"},"description":{"type":"string","title":"Description"},"amount":{"type":"number","title":"Amount"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"cardholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardholder"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","required":["bankAccountId","txnDate","description","amount"],"title":"ManualTransactionRequest","description":"Request to create a manual credit card transaction.\n\nReason: Users can add transactions manually that weren't in a CSV import.\nRequires a credit card account, date, description, and amount at minimum."},"MarkLeadRequest":{"properties":{"auditId":{"type":"string","format":"uuid","title":"Auditid"}},"type":"object","required":["auditId"],"title":"MarkLeadRequest"},"MarkLeadResponse":{"properties":{"queued":{"type":"boolean","title":"Queued"},"metaConfigured":{"type":"boolean","title":"Metaconfigured"}},"type":"object","required":["queued","metaConfigured"],"title":"MarkLeadResponse"},"MatchSuggestionsResponse":{"properties":{"customers":{"items":{"$ref":"#/components/schemas/CustomerSuggestion"},"type":"array","title":"Customers"},"subscriptions":{"items":{"$ref":"#/components/schemas/SubscriptionSuggestion"},"type":"array","title":"Subscriptions"}},"type":"object","required":["customers","subscriptions"],"title":"MatchSuggestionsResponse","description":"Response containing customer and subscription matching suggestions."},"MaxExpr-Input":{"properties":{"op":{"type":"string","const":"max","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"MaxExpr"},"MaxExpr-Output":{"properties":{"op":{"type":"string","const":"max","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"MaxExpr"},"McpConnectionCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"serverUrl":{"type":"string","maxLength":2000,"minLength":1,"title":"Serverurl"},"authToken":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Authtoken"}},"type":"object","required":["name","serverUrl"],"title":"McpConnectionCreate","description":"Request body for registering a customer MCP server."},"McpConnectionCreated":{"properties":{"connection":{"$ref":"#/components/schemas/McpConnectionResponse"},"tools":{"items":{"$ref":"#/components/schemas/McpRemoteTool"},"type":"array","title":"Tools"}},"type":"object","required":["connection","tools"],"title":"McpConnectionCreated","description":"A newly registered connection plus what the server advertised."},"McpConnectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"name":{"type":"string","title":"Name"},"serverUrl":{"type":"string","title":"Serverurl"},"transport":{"type":"string","title":"Transport"},"status":{"type":"string","title":"Status"},"hasAuthToken":{"type":"boolean","title":"Hasauthtoken","default":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby"}},"type":"object","required":["id","companyId","name","serverUrl","transport","status"],"title":"McpConnectionResponse","description":"One customer MCP server connection. Never carries the credential."},"McpRemoteTool":{"properties":{"name":{"type":"string","title":"Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"readOnlyHint":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Readonlyhint"}},"type":"object","required":["name"],"title":"McpRemoteTool","description":"One tool advertised by a customer's MCP server."},"MemoriesListResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/Memory"},"type":"array","title":"Memories"},"totalCount":{"type":"integer","title":"Totalcount"},"bySource":{"additionalProperties":{"type":"integer"},"type":"object","title":"Bysource"}},"type":"object","required":["memories","totalCount","bySource"],"title":"MemoriesListResponse"},"Memory":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"text":{"type":"string","title":"Text"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"source":{"type":"string","title":"Source"},"sourceRef":{"anyOf":[{"$ref":"#/components/schemas/MemorySourceRef"},{"type":"null"}]},"accessCount":{"type":"integer","title":"Accesscount"},"lastAccessedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastaccessedat"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["id","companyId","text","source","accessCount","createdAt","updatedAt"],"title":"Memory"},"MemoryItemListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CompanyMemoryResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"MemoryItemListResponse","description":"List of company memories with total count.\n\nReason: Used by the Documents page \"What Porter Knows\" panel to show\ngraph-backed company memories in teaser and full-list views."},"MemoryItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"structuredData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structureddata"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"importance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importance"},"status":{"type":"string","title":"Status"},"supersededById":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supersededbyid"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"effectiveStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectivestartdate"},"effectiveEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectiveenddate"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["id","companyId","type","title","content","status","createdAt","updatedAt"],"title":"MemoryItemResponse","description":"Full memory item response model."},"MemorySourceRef":{"properties":{"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessionid"},"toolCallId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Toolcallid"}},"type":"object","title":"MemorySourceRef"},"MergeDuplicatePaymentRequest":{"properties":{"survivorPaymentId":{"type":"string","title":"Survivorpaymentid"},"duplicatePaymentId":{"type":"string","title":"Duplicatepaymentid"}},"type":"object","required":["survivorPaymentId","duplicatePaymentId"],"title":"MergeDuplicatePaymentRequest","description":"Request to merge a flagged duplicate payment into its matched survivor.\n\nReason: POR-1412 — the survivor is the canonical payment to keep (the one\ncarrying any QBO Payment id); the duplicate is the flagged review-candidate\nrow that gets collapsed away. The settlement command validates that the two\nrows share customer/amount/date before merging."},"MetricBlock-Input":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"metric","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format"},"subtitle":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Subtitle","description":"Optional short secondary line rendered in muted text below the metric value, such as the period the value covers. Do not use it for a prior-period change; use comparison, which renders a toned delta. A metric cannot declare both subtitle and comparison."},"comparison":{"anyOf":[{"$ref":"#/components/schemas/ArtifactMetricComparison-Input"},{"type":"null"}],"description":"Optional prior or comparable-period comparison rendered below the value as the signed change, percentage, and 'vs <label>', inked by favorability."},"tooltip":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Tooltip","description":"Optional hover explanation for the metric value."},"detail":{"anyOf":[{"$ref":"#/components/schemas/ArtifactDetailConfig-Input"},{"type":"null"}],"description":"Optional click-through detail for the metric. Use drawer, modal, or popover presentations."},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Input"},{"type":"null"}],"description":"Optional click interaction for the metric. Use this to set artifact-local context that other blocks can read through expression.interaction, and optionally open a detail surface."}},"additionalProperties":false,"type":"object","required":["type","id","title","value","format"],"title":"MetricBlock"},"MetricBlock-Output":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"metric","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"format":{"type":"string","enum":["money","number","percent","text"],"title":"Format"},"subtitle":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Subtitle","description":"Optional short secondary line rendered in muted text below the metric value, such as the period the value covers. Do not use it for a prior-period change; use comparison, which renders a toned delta. A metric cannot declare both subtitle and comparison."},"comparison":{"anyOf":[{"$ref":"#/components/schemas/ArtifactMetricComparison-Output"},{"type":"null"}],"description":"Optional prior or comparable-period comparison rendered below the value as the signed change, percentage, and 'vs <label>', inked by favorability."},"tooltip":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Tooltip","description":"Optional hover explanation for the metric value."},"detail":{"anyOf":[{"$ref":"#/components/schemas/ArtifactDetailConfig-Output"},{"type":"null"}],"description":"Optional click-through detail for the metric. Use drawer, modal, or popover presentations."},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Output"},{"type":"null"}],"description":"Optional click interaction for the metric. Use this to set artifact-local context that other blocks can read through expression.interaction, and optionally open a detail surface."}},"additionalProperties":false,"type":"object","required":["type","id","title","value","format"],"title":"MetricBlock"},"MinExpr-Input":{"properties":{"op":{"type":"string","const":"min","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"MinExpr"},"MinExpr-Output":{"properties":{"op":{"type":"string","const":"min","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"MinExpr"},"MintRedemptionCodeRequest":{"properties":{"amount_cents":{"type":"integer","title":"Amount Cents"},"billing_interval":{"type":"string","enum":["month","year"],"title":"Billing Interval"},"trialDays":{"type":"integer","title":"Trialdays","default":0},"billingStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Billingstartdate"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"currency":{"type":"string","title":"Currency","default":"usd"},"maxRedemptions":{"type":"integer","title":"Maxredemptions","default":1},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiresat"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["amount_cents","billing_interval"],"title":"MintRedemptionCodeRequest"},"ModelsShellResponse":{"properties":{"models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Models"}},"type":"object","required":["models"],"title":"ModelsShellResponse"},"MoneyControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"money","title":"Type"},"defaultValue":{"type":"number","title":"Defaultvalue","default":0},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"},"step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Step"}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"MoneyControlSpec"},"MonthlyClosePromptsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ClosePromptItem"},"type":"array","title":"Items"},"totalAttentionNeeded":{"type":"integer","title":"Totalattentionneeded"}},"type":"object","required":["items","totalAttentionNeeded"],"title":"MonthlyClosePromptsResponse","description":"Monthly close checklist aggregating unresolved policy items."},"MulExpr-Input":{"properties":{"op":{"type":"string","const":"mul","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"MulExpr"},"MulExpr-Output":{"properties":{"op":{"type":"string","const":"mul","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"MulExpr"},"MutationAuthorityRequest":{"properties":{"latestRunId":{"type":"string","title":"Latestrunid"},"definitionHash":{"type":"string","title":"Definitionhash"},"workspaceRevision":{"type":"integer","title":"Workspacerevision"},"workspaceHash":{"type":"string","title":"Workspacehash"},"workspaceTopologyHash":{"type":"string","title":"Workspacetopologyhash"},"closeAuthorityFingerprint":{"type":"string","title":"Closeauthorityfingerprint"}},"type":"object","required":["latestRunId","definitionHash","workspaceRevision","workspaceHash","workspaceTopologyHash","closeAuthorityFingerprint"],"title":"MutationAuthorityRequest"},"NarrativeBlock":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"narrative","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"lead":{"anyOf":[{"type":"string","maxLength":400,"minLength":1},{"type":"null"}],"title":"Lead","description":"Optional concise conclusion that states the report's interpretation before the supporting narrative."}},"additionalProperties":false,"type":"object","required":["type","id","text"],"title":"NarrativeBlock"},"NavigationRelevanceResponse":{"properties":{"dashboard":{"$ref":"#/components/schemas/NavigationSurfaceState"},"porterAi":{"$ref":"#/components/schemas/NavigationSurfaceState"},"activity":{"$ref":"#/components/schemas/NavigationSurfaceState"},"transactions":{"$ref":"#/components/schemas/NavigationSurfaceState"},"transactionTabs":{"$ref":"#/components/schemas/TransactionTabRelevance"},"schedules":{"$ref":"#/components/schemas/NavigationSurfaceState"},"scheduleSourceTabs":{"$ref":"#/components/schemas/ScheduleTabRelevance"},"scheduleActivityTabs":{"$ref":"#/components/schemas/ScheduleActivityTabRelevance"},"monthlyClose":{"$ref":"#/components/schemas/NavigationSurfaceState"},"documents":{"$ref":"#/components/schemas/NavigationSurfaceState"},"documentTabs":{"$ref":"#/components/schemas/DocumentTabRelevance"},"reports":{"$ref":"#/components/schemas/NavigationSurfaceState"},"reportTabs":{"$ref":"#/components/schemas/ReportTabRelevance"},"workflows":{"$ref":"#/components/schemas/NavigationSurfaceState"},"memories":{"$ref":"#/components/schemas/NavigationSurfaceState"},"settings":{"$ref":"#/components/schemas/NavigationSurfaceState"},"settingsTabs":{"$ref":"#/components/schemas/SettingsTabRelevance"}},"type":"object","required":["dashboard","porterAi","activity","transactions","transactionTabs","schedules","scheduleSourceTabs","scheduleActivityTabs","monthlyClose","documents","documentTabs","reports","reportTabs","workflows","memories","settings","settingsTabs"],"title":"NavigationRelevanceResponse","description":"Company navigation relevance derived from actual persisted data."},"NavigationSurfaceState":{"properties":{"count":{"type":"integer","title":"Count"},"relevant":{"type":"boolean","title":"Relevant"}},"type":"object","required":["count","relevant"],"title":"NavigationSurfaceState","description":"Existence-backed visibility state for a navigable surface."},"NewConversationRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"objective":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Objective"},"initialAssistantMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initialassistantmessage"}},"type":"object","title":"NewConversationRequest","description":"Request to create a new conversation."},"NoteCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"structuredData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structureddata"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"importance":{"type":"string","title":"Importance","default":"medium"},"effectiveStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectivestartdate"},"effectiveEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectiveenddate"}},"type":"object","required":["title","content"],"title":"NoteCreateRequest"},"NoteListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemoryItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"NoteListResponse"},"NoteUpdateRequest":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"importance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importance"}},"type":"object","title":"NoteUpdateRequest"},"NotificationListResponse":{"properties":{"notifications":{"items":{"$ref":"#/components/schemas/NotificationResponse"},"type":"array","title":"Notifications"},"unreadCount":{"type":"integer","title":"Unreadcount"},"needsActionCount":{"type":"integer","title":"Needsactioncount"},"hasMore":{"type":"boolean","title":"Hasmore","default":false},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["notifications","unreadCount","needsActionCount"],"title":"NotificationListResponse","description":"List response — notifications plus the live unread count."},"NotificationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"companyId":{"type":"string","format":"uuid","title":"Companyid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"},"recipientUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipientuserid"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"deepLinkRoute":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deeplinkroute"},"notificationType":{"type":"string","enum":["general","email_triage","close","transactions","schedules","integrations","automations","workflows"],"title":"Notificationtype","default":"general"},"resolutionStatus":{"type":"string","enum":["needs_action","handled","dismissed"],"title":"Resolutionstatus","default":"needs_action"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolvedat"},"readAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Readat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","companyId","title","body","createdAt","updatedAt"],"title":"NotificationResponse","description":"Single notification row."},"NumberControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"number","title":"Type"},"defaultValue":{"type":"number","title":"Defaultvalue","default":0},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"},"step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Step"}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"NumberControlSpec"},"ObjectGraphEdge":{"properties":{"id":{"type":"string","title":"Id"},"fromNodeId":{"type":"string","title":"Fromnodeid"},"toNodeId":{"type":"string","title":"Tonodeid"},"relationshipType":{"type":"string","title":"Relationshiptype"},"label":{"type":"string","title":"Label"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","fromNodeId","toNodeId","relationshipType","label"],"title":"ObjectGraphEdge"},"ObjectGraphNode":{"properties":{"id":{"type":"string","title":"Id"},"objectType":{"type":"string","title":"Objecttype"},"objectId":{"type":"string","title":"Objectid"},"label":{"type":"string","title":"Label"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"posted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Posted"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","objectType","objectId","label"],"title":"ObjectGraphNode"},"ObjectRelationshipGraph":{"properties":{"rootNodeId":{"type":"string","title":"Rootnodeid"},"nodes":{"items":{"$ref":"#/components/schemas/ObjectGraphNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/ObjectGraphEdge"},"type":"array","title":"Edges"}},"type":"object","required":["rootNodeId","nodes","edges"],"title":"ObjectRelationshipGraph"},"OffsetDateExpression":{"properties":{"kind":{"type":"string","const":"offset","title":"Kind"},"anchor":{"oneOf":[{"$ref":"#/components/schemas/FixedDateAnchor"},{"$ref":"#/components/schemas/TodayDateAnchor"},{"$ref":"#/components/schemas/ScopeBoundaryDateAnchor"}],"title":"Anchor","discriminator":{"propertyName":"kind","mapping":{"fixed":"#/components/schemas/FixedDateAnchor","scope_boundary":"#/components/schemas/ScopeBoundaryDateAnchor","today":"#/components/schemas/TodayDateAnchor"}}},"months":{"type":"integer","title":"Months","default":0},"days":{"type":"integer","title":"Days","default":0}},"additionalProperties":false,"type":"object","required":["kind","anchor"],"title":"OffsetDateExpression"},"OpenBillItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"amount":{"type":"number","title":"Amount"},"appliedAmount":{"type":"number","title":"Appliedamount","default":0.0},"remainingBalance":{"type":"number","title":"Remainingbalance"},"billDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billdate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"daysPastDue":{"type":"integer","title":"Dayspastdue"},"agingBucket":{"type":"string","title":"Agingbucket","default":"current"},"documentType":{"type":"string","title":"Documenttype","default":"bill"},"isVendorCredit":{"type":"boolean","title":"Isvendorcredit","default":false},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"qboBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbobillid"}},"type":"object","required":["id","amount","remainingBalance","daysPastDue"],"title":"OpenBillItemResponse","description":"A single open bill in the A/P aging report.\n\nReason: Pydantic model for camelCase serialization of OpenBillItem dataclass."},"OpenNotificationResponse":{"properties":{"conversationId":{"type":"string","title":"Conversationid"}},"type":"object","required":["conversationId"],"title":"OpenNotificationResponse","description":"Returned by POST /{notification_id}/open."},"ParsedBankTransaction":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance"},"achMetadata":{"anyOf":[{"$ref":"#/components/schemas/ACHMetadata"},{"type":"null"}]},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"glAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glaccountname"},"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"exclude":{"type":"boolean","title":"Exclude","default":false},"excludeReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excludereason"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"isDuplicate":{"type":"boolean","title":"Isduplicate","default":false},"duplicateTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duplicatetransactionid"},"isFileDuplicate":{"type":"boolean","title":"Isfileduplicate","default":false},"fileDuplicateOfRow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fileduplicateofrow"},"category":{"type":"string","title":"Category","default":"net_new"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"rowNumber":{"type":"integer","title":"Rownumber","default":0},"sourceFormat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceformat"}},"type":"object","title":"ParsedBankTransaction","description":"A parsed bank transaction ready for import."},"ParsedCreditCardTransaction":{"properties":{"rowNumber":{"type":"integer","title":"Rownumber","default":0},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"transactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transactiondate"},"postDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postdate"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"rawDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rawdescription"},"cardholderName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardholdername"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"originalAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Originalamount"},"originalCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originalcurrency"},"fees":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fees"},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"},"cardLastFour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardlastfour"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"isDuplicate":{"type":"boolean","title":"Isduplicate","default":false},"duplicateTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duplicatetransactionid"},"duplicateType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duplicatetype"},"isFileDuplicate":{"type":"boolean","title":"Isfileduplicate","default":false},"fileDuplicateOfRow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fileduplicateofrow"},"uploadCategory":{"type":"string","title":"Uploadcategory","default":"net_new"},"sourceFormat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceformat"}},"type":"object","title":"ParsedCreditCardTransaction","description":"A parsed credit card transaction ready for import."},"ParsedInvoice":{"properties":{"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"status":{"type":"string","title":"Status","default":"sent"},"currency":{"type":"string","title":"Currency","default":"USD"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customeremail"},"customerExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerexternalid"},"subscriptionExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionexternalid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Balance"},"invoiceLink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicelink"},"pdfDownloadLink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdfdownloadlink"},"customerMatch":{"anyOf":[{"$ref":"#/components/schemas/CustomerMatch"},{"type":"null"}]},"subscriptionMatch":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionMatch"},{"type":"null"}]},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"rowNumber":{"type":"integer","title":"Rownumber","default":0},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"sourceFormat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceformat"},"importType":{"type":"string","title":"Importtype","default":"new"},"changedFields":{"items":{"type":"string"},"type":"array","title":"Changedfields","default":[]},"isInFileDuplicate":{"type":"boolean","title":"Isinfileduplicate","default":false}},"type":"object","title":"ParsedInvoice","description":"A parsed invoice ready for import."},"ParsedPayment":{"properties":{"paymentSecondaryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentsecondaryid"},"paymentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentexternalid"},"externalInvoiceReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalinvoicereference"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"availableDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availabledate"},"grossAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Grossamount"},"feeAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Feeamount"},"netAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Netamount"},"currency":{"type":"string","title":"Currency","default":"USD"},"reportingCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reportingcategory"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"payoutId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payoutid"},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"cashAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountid"},"cashAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountname"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customeremail"},"customerMatch":{"anyOf":[{"$ref":"#/components/schemas/CustomerMatch"},{"type":"null"}]},"invoiceMatch":{"anyOf":[{"$ref":"#/components/schemas/InvoiceMatch"},{"type":"null"}]},"derivedCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Derivedcustomerid"},"derivedCustomerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Derivedcustomername"},"derivedCustomerSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Derivedcustomersource"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"rowNumber":{"type":"integer","title":"Rownumber","default":0},"sourceFormat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceformat"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"}},"type":"object","title":"ParsedPayment","description":"A parsed payment ready for import."},"ParsedSubscription":{"properties":{"subscriptionName":{"type":"string","title":"Subscriptionname"},"customerName":{"type":"string","title":"Customername"},"productType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Producttype"},"totalAmount":{"type":"number","title":"Totalamount"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"paymentStatus":{"type":"string","title":"Paymentstatus"},"paymentSchedule":{"type":"string","title":"Paymentschedule"},"monthlyAmount":{"type":"number","title":"Monthlyamount"},"contractTermMonths":{"type":"integer","title":"Contracttermmonths"},"scheduleType":{"type":"string","title":"Scheduletype"},"customerExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerexternalid"},"subscriptionExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionexternalid"},"product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"},"status":{"type":"string","title":"Status","default":"active"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"rowNumber":{"type":"integer","title":"Rownumber","default":0},"isModification":{"type":"boolean","title":"Ismodification","default":false},"modifications":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Modifications","default":[]},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"isPotentialDuplicate":{"type":"boolean","title":"Ispotentialduplicate","default":false},"duplicateSubscriptionIds":{"items":{"type":"string"},"type":"array","title":"Duplicatesubscriptionids","default":[]},"hasMissingCustomer":{"type":"boolean","title":"Hasmissingcustomer","default":false},"hasSuspiciousTerm":{"type":"boolean","title":"Hassuspiciousterm","default":false}},"type":"object","required":["subscriptionName","customerName","totalAmount","paymentStatus","paymentSchedule","monthlyAmount","contractTermMonths","scheduleType"],"title":"ParsedSubscription","description":"A parsed subscription row ready for preview or import."},"PaymentApplicationCreate":{"properties":{"invoiceId":{"type":"string","title":"Invoiceid"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["invoiceId","amount"],"title":"PaymentApplicationCreate","description":"Apply payment to invoice."},"PaymentApplicationResponse":{"properties":{"id":{"type":"string","title":"Id"},"paymentId":{"type":"string","title":"Paymentid"},"invoiceId":{"type":"string","title":"Invoiceid"},"amount":{"type":"number","title":"Amount"},"createdAt":{"type":"string","title":"Createdat"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"}},"type":"object","required":["id","paymentId","invoiceId","amount","createdAt"],"title":"PaymentApplicationResponse","description":"A payment application to an invoice."},"PaymentCreate":{"anyOf":[{"required":["cashAccountId"]},{"required":["cashAccountName"]}],"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"source":{"type":"string","title":"Source","default":"ui"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"amount":{"type":"number","title":"Amount"},"date":{"type":"string","title":"Date"},"paymentTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paymenttime"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"currency":{"type":"string","title":"Currency","default":"USD"},"stripeTxnId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripetxnid"},"feeAmount":{"type":"number","title":"Feeamount","default":0},"netAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Netamount"},"tipAmount":{"type":"number","title":"Tipamount","default":0},"commerceOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commerceorderid"},"payoutId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payoutid"},"availableDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availabledate"},"cashAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountid"},"cashAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountname"},"settlementAccountPurpose":{"type":"string","enum":["holding","cash_on_hand","gift_card_liability","undeposited_funds"],"title":"Settlementaccountpurpose","default":"holding"},"payerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payerid"},"payerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payername"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"importFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importfilename"},"proposedAction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaction"},"proposedMatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchid"},"proposedMatchIds":{"items":{"type":"string"},"type":"array","title":"Proposedmatchids","default":[]},"proposedMatchUrls":{"items":{"type":"string"},"type":"array","title":"Proposedmatchurls","default":[]},"proposedMatchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchtype"},"aiReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aireasoning"}},"type":"object","required":["amount","date"],"title":"PaymentCreate","description":"Create payment request."},"PaymentDepositApplicationResponse":{"properties":{"id":{"type":"string","title":"Id"},"paymentId":{"type":"string","title":"Paymentid"},"bankTransactionId":{"type":"string","title":"Banktransactionid"},"amount":{"type":"number","title":"Amount"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"bankTransactionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionstatus"},"bankTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactiondate"},"bankTransactionDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactiondescription"},"bankTransactionAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Banktransactionamount"}},"type":"object","required":["id","paymentId","bankTransactionId","amount"],"title":"PaymentDepositApplicationResponse","description":"A payment allocation to a bank transaction."},"PaymentImportPreview":{"properties":{"payments":{"items":{"$ref":"#/components/schemas/ParsedPayment"},"type":"array","title":"Payments"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"stats":{"$ref":"#/components/schemas/PaymentImportStats"},"sourceFormat":{"type":"string","title":"Sourceformat"},"filename":{"type":"string","title":"Filename"},"formatDetected":{"type":"boolean","title":"Formatdetected","default":true},"fileColumns":{"items":{"type":"string"},"type":"array","title":"Filecolumns","default":[]},"needsColumnMapping":{"type":"boolean","title":"Needscolumnmapping","default":false},"unmappedColumns":{"items":{"type":"string"},"type":"array","title":"Unmappedcolumns","default":[]},"missingRequired":{"items":{"type":"string"},"type":"array","title":"Missingrequired","default":[]},"detectedMapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Detectedmapping","default":{}},"unsupportedRows":{"items":{"$ref":"#/components/schemas/SkippedRowDetail"},"type":"array","title":"Unsupportedrows","default":[]}},"type":"object","required":["payments","errors","warnings","stats","sourceFormat","filename"],"title":"PaymentImportPreview","description":"Result of parsing a payment CSV/Excel file."},"PaymentImportStats":{"properties":{"totalRows":{"type":"integer","title":"Totalrows","default":0},"chargeCount":{"type":"integer","title":"Chargecount","default":0},"payoutCount":{"type":"integer","title":"Payoutcount","default":0},"refundCount":{"type":"integer","title":"Refundcount","default":0},"otherCount":{"type":"integer","title":"Othercount","default":0},"validCount":{"type":"integer","title":"Validcount","default":0},"errorCount":{"type":"integer","title":"Errorcount","default":0},"warningCount":{"type":"integer","title":"Warningcount","default":0},"totalGross":{"type":"number","title":"Totalgross","default":0.0},"totalFees":{"type":"number","title":"Totalfees","default":0.0},"totalNet":{"type":"number","title":"Totalnet","default":0.0},"customersMatched":{"type":"integer","title":"Customersmatched","default":0},"customersUnmatched":{"type":"integer","title":"Customersunmatched","default":0},"invoicesMatched":{"type":"integer","title":"Invoicesmatched","default":0},"invoicesUnmatched":{"type":"integer","title":"Invoicesunmatched","default":0},"unsupportedRowCount":{"type":"integer","title":"Unsupportedrowcount","default":0}},"type":"object","title":"PaymentImportStats","description":"Statistics for the import preview."},"PaymentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PaymentReadModel"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"PaymentListResponse","description":"Payment list response with pagination info."},"PaymentProcessorConnectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"kind":{"type":"string","enum":["stripe","helcim","manual","hubspot","square"],"title":"Kind"},"displayName":{"type":"string","title":"Displayname"},"status":{"type":"string","enum":["active","pending","disconnected","error"],"title":"Status","default":"active"},"connectedAt":{"type":"string","title":"Connectedat"},"isDefault":{"type":"boolean","title":"Isdefault"},"capabilities":{"additionalProperties":true,"type":"object","title":"Capabilities"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"cashAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cashaccountid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","kind","displayName","connectedAt","isDefault","capabilities","config"],"title":"PaymentProcessorConnectionResponse","description":"Company payment processor connection shaped for frontend selection."},"PaymentReadModel":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"payerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payerid"},"source":{"type":"string","title":"Source"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"amount":{"type":"number","title":"Amount"},"date":{"type":"string","title":"Date"},"paymentTime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymenttime"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"qboPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbopaymentid"},"qboProcessingFeePurchaseId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboprocessingfeepurchaseid"},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncedat"},"isVoided":{"type":"boolean","title":"Isvoided","default":false},"voidedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedat"},"voidedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voidedreason"},"currency":{"type":"string","title":"Currency","default":"USD"},"stripeTxnId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripetxnid"},"feeAmount":{"type":"number","title":"Feeamount","default":0},"netAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Netamount"},"tipAmount":{"type":"number","title":"Tipamount","default":0},"commerceOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commerceorderid"},"payoutId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payoutid"},"payoutEndToEndId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payoutendtoendid"},"payoutFeeAdjustmentAmount":{"type":"number","title":"Payoutfeeadjustmentamount","default":0},"unbookedChargeFeeAmount":{"type":"number","title":"Unbookedchargefeeamount","default":0},"availableDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availabledate"},"payerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payername"},"proposedAction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaction"},"proposedMatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchid"},"proposedMatchIds":{"items":{"type":"string"},"type":"array","title":"Proposedmatchids","default":[]},"proposedMatchUrls":{"items":{"type":"string"},"type":"array","title":"Proposedmatchurls","default":[]},"proposedMatchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchtype"},"aiReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aireasoning"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"displayName":{"type":"string","title":"Displayname","default":""},"depositStatus":{"type":"string","title":"Depositstatus","default":"undeposited"},"bankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionid"},"depositApplications":{"items":{"$ref":"#/components/schemas/PaymentDepositApplicationResponse"},"type":"array","title":"Depositapplications","default":[]},"depositApplicationAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Depositapplicationamount"},"postingStatus":{"type":"string","title":"Postingstatus","default":"pending"},"appliedToInvoices":{"items":{"$ref":"#/components/schemas/PaymentApplicationResponse"},"type":"array","title":"Appliedtoinvoices","default":[]},"appliedAmount":{"type":"number","title":"Appliedamount","default":0},"unappliedAmount":{"type":"number","title":"Unappliedamount","default":0},"payerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payeremail"},"settlementAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlementaccountid"},"settlementAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlementaccountname"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/TransactionProvenance"},{"type":"null"}]},"reconciliation":{"anyOf":[{"$ref":"#/components/schemas/PaymentReconciliationResponse"},{"type":"null"}]},"proposedMatchCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedmatchcustomerid"},"feeStatus":{"type":"string","enum":["not_applicable","held","not_held","unavailable"],"title":"Feestatus","default":"not_applicable"},"feeStatusReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feestatusreason"}},"type":"object","required":["id","companyId","source","amount","date","createdAt","updatedAt"],"title":"PaymentReadModel","description":"Payment read/display projection with joined and computed fields."},"PaymentReconciliationDifference":{"properties":{"field":{"type":"string","title":"Field"},"expected":{"title":"Expected"},"observed":{"title":"Observed"}},"type":"object","required":["field","expected","observed"],"title":"PaymentReconciliationDifference","description":"One accounting-significant Porter-versus-QBO read-model difference."},"PaymentReconciliationResponse":{"properties":{"status":{"type":"string","const":"needs_review","title":"Status"},"reason":{"type":"string","title":"Reason"},"incident_id":{"type":"string","title":"Incident Id"},"observed_at":{"type":"string","title":"Observed At"},"porter_graph_hash":{"type":"string","title":"Porter Graph Hash"},"differences":{"items":{"$ref":"#/components/schemas/PaymentReconciliationDifference"},"type":"array","title":"Differences"}},"type":"object","required":["status","reason","incident_id","observed_at","porter_graph_hash","differences"],"title":"PaymentReconciliationResponse","description":"Open QBO divergence projected onto a Payment list/detail response."},"PaymentRequest":{"properties":{"amount":{"type":"number","title":"Amount"},"paymentDate":{"type":"string","title":"Paymentdate"},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"bankAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"sourceEvidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sourceevidence"}},"type":"object","required":["amount","paymentDate"],"title":"PaymentRequest","description":"Request body for recording a bill payment."},"PaymentResponse":{"properties":{"id":{"type":"string","title":"Id"},"billId":{"type":"string","title":"Billid"},"amount":{"type":"number","title":"Amount"},"paymentDate":{"type":"string","title":"Paymentdate"},"balanceRemaining":{"type":"number","title":"Balanceremaining"},"status":{"$ref":"#/components/schemas/BillStatus"}},"type":"object","required":["id","billId","amount","paymentDate","balanceRemaining","status"],"title":"PaymentResponse","description":"Response from recording a bill payment."},"PaymentStatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"undeposited":{"type":"integer","title":"Undeposited"},"deposited":{"type":"integer","title":"Deposited"},"partial":{"type":"integer","title":"Partial","default":0},"totalUndepositedAmount":{"type":"number","title":"Totalundepositedamount"},"totalDepositedAmount":{"type":"number","title":"Totaldepositedamount"},"totalPartialAmount":{"type":"number","title":"Totalpartialamount","default":0.0}},"type":"object","required":["total","undeposited","deposited","totalUndepositedAmount","totalDepositedAmount"],"title":"PaymentStatsResponse","description":"Payment statistics for deposit tracking.\n\nReason: Frontend expects deposit-based stats (deposited vs undeposited counts/amounts)\nto match the StatusFilterBar component used in the payments tab."},"PaymentUpdate":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"depositStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depositstatus"},"bankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionid"}},"type":"object","title":"PaymentUpdate","description":"Update payment request."},"PercentControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"percent","title":"Type"},"defaultValue":{"type":"number","title":"Defaultvalue","default":0},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"},"step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Step"}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"PercentControlSpec"},"PeriodScopeSelection":{"properties":{"kind":{"type":"string","const":"period","title":"Kind"},"period":{"type":"string","enum":["current_month","previous_month","current_quarter","current_year","ytd","trailing_3_months","trailing_6_months","trailing_12_months","trailing_3m","trailing_6m","trailing_12m"],"title":"Period"},"anchor":{"oneOf":[{"$ref":"#/components/schemas/FixedDateExpression"},{"$ref":"#/components/schemas/TodayDateExpression"},{"$ref":"#/components/schemas/ScopeBoundaryDateExpression"},{"$ref":"#/components/schemas/OffsetDateExpression"}],"title":"Anchor","discriminator":{"propertyName":"kind","mapping":{"fixed":"#/components/schemas/FixedDateExpression","offset":"#/components/schemas/OffsetDateExpression","scope_boundary":"#/components/schemas/ScopeBoundaryDateExpression","today":"#/components/schemas/TodayDateExpression"}}},"calendar":{"type":"string","enum":["calendar","fiscal"],"title":"Calendar","default":"calendar"}},"additionalProperties":false,"type":"object","required":["kind","period","anchor"],"title":"PeriodScopeSelection"},"PeriodSnapshotSummary":{"properties":{"exists":{"type":"boolean","title":"Exists"},"period":{"type":"string","title":"Period"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"capturedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedat"},"capturedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedby"},"cashSettlementContractVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashsettlementcontractversion"},"artifacts":{"items":{"$ref":"#/components/schemas/SnapshotArtifactMeta"},"type":"array","title":"Artifacts","default":[]},"versions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Versions","default":[]}},"type":"object","required":["exists","period"],"title":"PeriodSnapshotSummary"},"PermissionRoleResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"},"name":{"type":"string","title":"Name"},"displayName":{"type":"string","title":"Displayname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"grantIds":{"items":{"type":"string"},"type":"array","title":"Grantids"},"isSystem":{"type":"boolean","title":"Issystem"}},"type":"object","required":["id","name","displayName","grantIds","isSystem"],"title":"PermissionRoleResponse","description":"One system or company-specific role available to team members."},"PipelineActionRequest":{"properties":{"transactionIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transactionids"}},"type":"object","title":"PipelineActionRequest","description":"Request body for pipeline action endpoints."},"PipelineHealthResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"periodStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Periodstart"},"periodEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Periodend"},"totalTransactionsInPeriod":{"type":"integer","title":"Totaltransactionsinperiod","default":0},"autoCategorized":{"type":"integer","title":"Autocategorized","default":0},"excluded":{"type":"integer","title":"Excluded","default":0},"needsReview":{"type":"integer","title":"Needsreview","default":0},"ready":{"type":"integer","title":"Ready","default":0},"stages":{"items":{"$ref":"#/components/schemas/PipelineHealthStageBreakdown"},"type":"array","title":"Stages"},"erroredEvents":{"type":"integer","title":"Erroredevents","default":0}},"type":"object","required":["companyId","stages"],"title":"PipelineHealthResponse","description":"Aggregate pipeline health metrics for the bank transactions page."},"PipelineHealthStageBreakdown":{"properties":{"stage":{"type":"string","title":"Stage"},"matched":{"type":"integer","title":"Matched","default":0},"noMatch":{"type":"integer","title":"Nomatch","default":0},"skipped":{"type":"integer","title":"Skipped","default":0},"errored":{"type":"integer","title":"Errored","default":0}},"type":"object","required":["stage"],"title":"PipelineHealthStageBreakdown","description":"Per-stage event counts for pipeline health summaries."},"PipelineTraceEvent":{"properties":{"id":{"type":"string","title":"Id"},"runId":{"type":"string","title":"Runid"},"stage":{"type":"string","title":"Stage"},"status":{"type":"string","title":"Status"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"startedAt":{"type":"string","format":"date-time","title":"Startedat"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finishedat"}},"type":"object","required":["id","runId","stage","status","startedAt"],"title":"PipelineTraceEvent","description":"One stage event from the latest stored transaction trace."},"PipelineTraceResponse":{"properties":{"transactionId":{"type":"string","title":"Transactionid"},"events":{"items":{"$ref":"#/components/schemas/PipelineTraceEvent"},"type":"array","title":"Events"},"eventCount":{"type":"integer","title":"Eventcount"}},"type":"object","required":["transactionId","events","eventCount"],"title":"PipelineTraceResponse","description":"Full per-transaction pipeline trace ordered chronologically."},"PixelMapBlock-Input":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"pixelMap","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"ariaLabel":{"type":"string","maxLength":160,"minLength":1,"title":"Arialabel"},"markId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Markid","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"x":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"X","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"y":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Y","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"tone":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Tone","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"secondary":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Secondary"},"magnitude":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Magnitude"},"xDomain":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2,"title":"Xdomain"},"yDomain":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2,"title":"Ydomain"},"encoding":{"$ref":"#/components/schemas/PixelMapEncoding"},"legend":{"items":{"$ref":"#/components/schemas/PixelMapLegendItem"},"type":"array","maxItems":4,"minItems":1,"title":"Legend"},"height":{"type":"string","enum":["compact","standard","tall"],"title":"Height","default":"standard"},"emptyTitle":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Emptytitle"},"emptyDescription":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Emptydescription"}},"additionalProperties":false,"type":"object","required":["type","id","dataRef","ariaLabel","markId","x","y","tone","label","xDomain","yDomain","encoding","legend"],"title":"PixelMapBlock"},"PixelMapBlock-Output":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"pixelMap","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"ariaLabel":{"type":"string","maxLength":160,"minLength":1,"title":"Arialabel"},"markId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Markid","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"x":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"X","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"y":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Y","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"tone":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Tone","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"label":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Label","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"secondary":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Secondary"},"magnitude":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Magnitude"},"xDomain":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2,"title":"Xdomain"},"yDomain":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2,"title":"Ydomain"},"encoding":{"$ref":"#/components/schemas/PixelMapEncoding"},"legend":{"items":{"$ref":"#/components/schemas/PixelMapLegendItem"},"type":"array","maxItems":4,"minItems":1,"title":"Legend"},"height":{"type":"string","enum":["compact","standard","tall"],"title":"Height","default":"standard"},"emptyTitle":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Emptytitle"},"emptyDescription":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Emptydescription"}},"additionalProperties":false,"type":"object","required":["type","id","dataRef","ariaLabel","markId","x","y","tone","label","xDomain","yDomain","encoding","legend"],"title":"PixelMapBlock"},"PixelMapEncoding":{"properties":{"xLabel":{"type":"string","maxLength":120,"minLength":1,"title":"Xlabel"},"yLabel":{"type":"string","maxLength":120,"minLength":1,"title":"Ylabel"},"colorLabel":{"type":"string","maxLength":120,"minLength":1,"title":"Colorlabel"},"sizeLabel":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Sizelabel"},"xTicks":{"anyOf":[{"items":{"$ref":"#/components/schemas/PixelMapTick"},"type":"array","maxItems":12,"minItems":1},{"type":"null"}],"title":"Xticks"},"yTicks":{"anyOf":[{"items":{"$ref":"#/components/schemas/PixelMapTick"},"type":"array","maxItems":12,"minItems":1},{"type":"null"}],"title":"Yticks"}},"additionalProperties":false,"type":"object","required":["xLabel","yLabel","colorLabel"],"title":"PixelMapEncoding"},"PixelMapLegendItem":{"properties":{"tone":{"type":"string","enum":["neutral","green","warning","error"],"title":"Tone"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"}},"additionalProperties":false,"type":"object","required":["tone","label"],"title":"PixelMapLegendItem"},"PixelMapTick":{"properties":{"value":{"type":"number","title":"Value"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"}},"additionalProperties":false,"type":"object","required":["value","label"],"title":"PixelMapTick"},"PlaidAccountsListResponse":{"properties":{"connectionHistory":{"items":{"$ref":"#/components/schemas/ConnectionHistoryEntry"},"type":"array","title":"Connectionhistory"},"accounts":{"items":{"$ref":"#/components/schemas/BankAccountResponse"},"type":"array","title":"Accounts"},"syncStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncstartdate"},"plaidItemId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plaiditemid"},"reauthItem":{"anyOf":[{"$ref":"#/components/schemas/PlaidReauthItemResponse"},{"type":"null"}]},"items":{"items":{"$ref":"#/components/schemas/PlaidItemSummaryResponse"},"type":"array","title":"Items"}},"type":"object","required":["accounts"],"title":"PlaidAccountsListResponse","description":"Response for listing Plaid-connected accounts with item metadata."},"PlaidBalanceRefreshResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"accountsRefreshed":{"type":"integer","title":"Accountsrefreshed"}},"type":"object","required":["success","accountsRefreshed"],"title":"PlaidBalanceRefreshResponse","description":"Response for an explicit Plaid balance-cache refresh."},"PlaidItemMetadataDiagnosticResponse":{"properties":{"products":{"items":{"type":"string"},"type":"array","title":"Products"},"availableProducts":{"items":{"type":"string"},"type":"array","title":"Availableproducts"},"billedProducts":{"items":{"type":"string"},"type":"array","title":"Billedproducts"},"consentedProducts":{"items":{"type":"string"},"type":"array","title":"Consentedproducts"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"}},"type":"object","title":"PlaidItemMetadataDiagnosticResponse"},"PlaidItemSummaryResponse":{"properties":{"itemId":{"type":"string","title":"Itemid"},"institutionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institutionname"},"status":{"type":"string","title":"Status"},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"},"syncStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncstartdate"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncedat"}},"type":"object","required":["itemId","status"],"title":"PlaidItemSummaryResponse","description":"One connected Plaid item (institution) for the Settings connection list."},"PlaidReauthCompleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"itemId":{"type":"string","title":"Itemid"},"accounts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Accounts"}},"type":"object","required":["success","itemId","accounts"],"title":"PlaidReauthCompleteResponse","description":"Response after a Plaid update-mode Link flow succeeds."},"PlaidReauthItemResponse":{"properties":{"itemId":{"type":"string","title":"Itemid"},"institutionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institutionname"},"status":{"type":"string","title":"Status"},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"},"accountNames":{"items":{"type":"string"},"type":"array","title":"Accountnames"}},"type":"object","required":["itemId","status"],"title":"PlaidReauthItemResponse","description":"The first Plaid connection that needs user reauthentication."},"PlaidStatementAccountDiagnosticResponse":{"properties":{"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"accountMask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountmask"},"statementCount":{"type":"integer","title":"Statementcount","default":0},"statements":{"items":{"$ref":"#/components/schemas/PlaidStatementMetadataResponse"},"type":"array","title":"Statements"}},"type":"object","title":"PlaidStatementAccountDiagnosticResponse"},"PlaidStatementDiagnosticTotalsResponse":{"properties":{"itemCount":{"type":"integer","title":"Itemcount","default":0},"activeItemCount":{"type":"integer","title":"Activeitemcount","default":0},"statementTotal":{"type":"integer","title":"Statementtotal","default":0},"itemsWithStatements":{"type":"integer","title":"Itemswithstatements","default":0},"itemsNeedingConsent":{"type":"integer","title":"Itemsneedingconsent","default":0},"itemsWithoutStatementSupport":{"type":"integer","title":"Itemswithoutstatementsupport","default":0},"itemsWithZeroListedStatements":{"type":"integer","title":"Itemswithzerolistedstatements","default":0},"itemsWithErrors":{"type":"integer","title":"Itemswitherrors","default":0}},"type":"object","title":"PlaidStatementDiagnosticTotalsResponse"},"PlaidStatementDiagnosticsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PlaidStatementItemDiagnosticResponse"},"type":"array","title":"Items"},"totals":{"$ref":"#/components/schemas/PlaidStatementDiagnosticTotalsResponse"},"refreshNote":{"type":"string","title":"Refreshnote"}},"type":"object","required":["totals","refreshNote"],"title":"PlaidStatementDiagnosticsResponse"},"PlaidStatementItemDiagnosticResponse":{"properties":{"itemId":{"type":"string","title":"Itemid"},"institutionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institutionname"},"status":{"type":"string","title":"Status"},"localAccounts":{"items":{"$ref":"#/components/schemas/PlaidStatementLocalAccountResponse"},"type":"array","title":"Localaccounts"},"tokenPresent":{"type":"boolean","title":"Tokenpresent","default":false},"plaidItem":{"anyOf":[{"$ref":"#/components/schemas/PlaidItemMetadataDiagnosticResponse"},{"type":"null"}]},"plaidItemError":{"anyOf":[{"$ref":"#/components/schemas/PlaidStatementListDiagnosticResponse"},{"type":"null"}]},"statementsList":{"$ref":"#/components/schemas/PlaidStatementListDiagnosticResponse"},"nextAction":{"type":"string","title":"Nextaction"},"nextActionReason":{"type":"string","title":"Nextactionreason"}},"type":"object","required":["itemId","status","statementsList","nextAction","nextActionReason"],"title":"PlaidStatementItemDiagnosticResponse"},"PlaidStatementListDiagnosticResponse":{"properties":{"status":{"type":"string","title":"Status"},"httpStatus":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Httpstatus"},"errorType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errortype"},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"requestId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestid"},"accountCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accountcount"},"statementTotal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statementtotal"},"accounts":{"items":{"$ref":"#/components/schemas/PlaidStatementAccountDiagnosticResponse"},"type":"array","title":"Accounts"}},"type":"object","required":["status"],"title":"PlaidStatementListDiagnosticResponse"},"PlaidStatementLocalAccountResponse":{"properties":{"bankAccountId":{"type":"string","title":"Bankaccountid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"plaidAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plaidaccountid"}},"type":"object","required":["bankAccountId"],"title":"PlaidStatementLocalAccountResponse"},"PlaidStatementMetadataResponse":{"properties":{"statementId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementid"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"datePosted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateposted"}},"type":"object","title":"PlaidStatementMetadataResponse"},"PnlAccountNode":{"properties":{"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"acctNum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acctnum"},"amount":{"type":"number","title":"Amount","default":0.0},"subtotal":{"type":"number","title":"Subtotal","default":0.0},"depth":{"type":"integer","title":"Depth","default":0},"hasDirectPostings":{"type":"boolean","title":"Hasdirectpostings","default":false},"children":{"items":{"$ref":"#/components/schemas/PnlAccountNode"},"type":"array","title":"Children","default":[]}},"type":"object","required":["accountId","accountName"],"title":"PnlAccountNode"},"PnlSection":{"properties":{"name":{"type":"string","title":"Name"},"accounts":{"items":{"$ref":"#/components/schemas/PnlAccountNode"},"type":"array","title":"Accounts"},"total":{"type":"number","title":"Total"},"isSubtotal":{"type":"boolean","title":"Issubtotal"}},"type":"object","required":["name","accounts","total","isSubtotal"],"title":"PnlSection"},"PointScopeSelection":{"properties":{"kind":{"type":"string","const":"point","title":"Kind"},"date":{"oneOf":[{"$ref":"#/components/schemas/FixedDateExpression"},{"$ref":"#/components/schemas/TodayDateExpression"},{"$ref":"#/components/schemas/ScopeBoundaryDateExpression"},{"$ref":"#/components/schemas/OffsetDateExpression"}],"title":"Date","discriminator":{"propertyName":"kind","mapping":{"fixed":"#/components/schemas/FixedDateExpression","offset":"#/components/schemas/OffsetDateExpression","scope_boundary":"#/components/schemas/ScopeBoundaryDateExpression","today":"#/components/schemas/TodayDateExpression"}}}},"additionalProperties":false,"type":"object","required":["kind","date"],"title":"PointScopeSelection"},"PolicyChangeHistoryResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"PolicyChangeHistoryResponse","description":"Response for policy change history."},"PolicyUpdate":{"properties":{"accounting_basis":{"anyOf":[{"type":"string","enum":["cash","accrual"]},{"type":"null"}],"title":"Accounting Basis"},"fiscal_year_end_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fiscal Year End Month"},"reporting_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reporting Currency"},"de_minimis_threshold_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"De Minimis Threshold Usd"},"capitalization_threshold_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Capitalization Threshold Usd"},"fixed_asset_capitalization_threshold_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fixed Asset Capitalization Threshold Usd"},"default_fa_life_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Fa Life Months"},"fa_depreciation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fa Depreciation Method"},"fa_depreciation_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fa Depreciation Start"},"fa_default_salvage_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fa Default Salvage Value"},"default_intangible_life_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Intangible Life Months"},"intangible_amortization_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intangible Amortization Method"},"prepaid_expense_threshold_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prepaid Expense Threshold Usd"},"prepaid_annual_threshold_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prepaid Annual Threshold Usd"},"prepaid_quarterly_threshold_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prepaid Quarterly Threshold Usd"},"prepaid_policy":{"anyOf":[{"type":"string","enum":["daily","monthly"]},{"type":"null"}],"title":"Prepaid Policy"},"prepaid_min_service_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prepaid Min Service Days"},"prepaid_recognition_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prepaid Recognition Method"},"prepaid_asset_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prepaid Asset Account Id"},"accrual_threshold_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accrual Threshold Usd"},"accruals_autoreverse":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accruals Autoreverse"},"accrued_liability_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accrued Liability Account Id"},"payroll_accrual_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payroll Accrual Enabled"},"payroll_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Frequency"},"payroll_day_1":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payroll Day 1"},"payroll_day_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Day 2"},"monthly_payroll_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Payroll Amount"},"payroll_expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll Expense Account Id"},"revrec_basis":{"anyOf":[{"type":"string","enum":["daily","monthly"]},{"type":"null"}],"title":"Revrec Basis"},"revenue_recognition_timing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Recognition Timing"},"deferred_revenue_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deferred Revenue Account Id"},"unbilled_revenue_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilled Revenue Account Id"},"modification_approach":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modification Approach"},"variable_consideration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Consideration"},"invoice_terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Terms Days"},"bad_debt_aging_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bad Debt Aging Days"},"closing_timeline_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Closing Timeline Days"},"sales_tax_basis":{"anyOf":[{"type":"string","enum":["cash","accrual"]},{"type":"null"}],"title":"Sales Tax Basis"},"commissions_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Commissions Enabled"},"commission_applies_to":{"anyOf":[{"type":"string","enum":["new_business","all"]},{"type":"null"}],"title":"Commission Applies To"},"commission_rate_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Rate Pct"},"commission_amortization":{"anyOf":[{"type":"string","enum":["subscription_term","customer_lifetime"]},{"type":"null"}],"title":"Commission Amortization"},"commission_lifetime_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Commission Lifetime Months"},"average_contract_length_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Average Contract Length Months"},"commission_amortization_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commission Amortization Period"},"commission_amortization_custom_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Commission Amortization Custom Months"},"prepaid_commissions_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prepaid Commissions Account Id"},"commission_other_expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commission Other Expense Account Id"},"cap_software_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cap Software Enabled"},"cap_software_standard":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cap Software Standard"},"cap_software_useful_life_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cap Software Useful Life Months"},"cap_software_amortization_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cap Software Amortization Method"},"cap_software_default_productivity_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap Software Default Productivity Pct"},"cap_software_asset_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cap Software Asset Account Id"},"cap_software_accum_amort_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cap Software Accum Amort Account Id"},"cap_software_amort_expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cap Software Amort Expense Account Id"},"commissions_payable_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commissions Payable Account Id"},"leases_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Leases Enabled"},"lease_accounting_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Accounting Mode"},"lease_rent_expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Rent Expense Account Id"},"lease_deferred_rent_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Deferred Rent Account Id"},"security_deposit_asset_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Deposit Asset Account Id"},"security_deposit_expense_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Deposit Expense Account Id"},"qbo_posting_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Qbo Posting Enabled"}},"additionalProperties":false,"type":"object","title":"PolicyUpdate","description":"Partial update for policies.\n\nReason: All fields optional — PATCH semantics. Covers all policy\nsections from Foundation through Leases.\nReason: extra=forbid rejects unknown/misspelled fields (→ 422 instead of silent drop).\nReason: Literal types mirror DB check constraints (→ 422 instead of DB 500)."},"PorterAISkillActionAssociation":{"properties":{"actionBindingId":{"type":"string","title":"Actionbindingid"},"role":{"type":"string","title":"Role","default":"participant"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"applicability":{"type":"string","enum":["always","conditional","optional"],"title":"Applicability","default":"conditional"},"guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance"}},"type":"object","required":["actionBindingId"],"title":"PorterAISkillActionAssociation","description":"Compact workflow metadata connecting a skill to one ontology action."},"PorterAiContactResponse":{"properties":{"smsPhoneNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smsphonenumber"},"whatsappPhoneNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsappphonenumber"}},"type":"object","title":"PorterAiContactResponse"},"PostCommerceRootsRequest":{"properties":{"saleIds":{"items":{"type":"string"},"type":"array","maxItems":1000,"title":"Saleids"},"refundIds":{"items":{"type":"string"},"type":"array","maxItems":1000,"title":"Refundids"}},"additionalProperties":false,"type":"object","title":"PostCommerceRootsRequest","description":"One bounded, explicit provider-neutral commerce posting request."},"PostCommerceRootsResponse":{"properties":{"outcomes":{"items":{"$ref":"#/components/schemas/CommercePostingRootOutcomeResponse"},"type":"array","title":"Outcomes"}},"type":"object","required":["outcomes"],"title":"PostCommerceRootsResponse","description":"Ordered exhaustive receipt: requested Sales first, then Refunds."},"PostInvoiceToQBOErrorResponse":{"properties":{"invoiceId":{"type":"string","title":"Invoiceid"},"error":{"type":"string","title":"Error"},"code":{"type":"string","title":"Code"},"details":{"items":{"type":"string"},"type":"array","title":"Details"}},"type":"object","required":["invoiceId","error","code"],"title":"PostInvoiceToQBOErrorResponse","description":"One failed invoice row from a bulk invoice post."},"PostInvoiceToQBOResponse":{"properties":{"invoiceId":{"type":"string","title":"Invoiceid"},"qboInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboinvoiceid"},"qboInvoiceRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboinvoiceref"}},"type":"object","required":["invoiceId"],"title":"PostInvoiceToQBOResponse","description":"Response from posting a Porter invoice through the invoice posting command."},"PostPaymentToGLPreviewAccount":{"properties":{"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"qboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountid"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["accountName"],"title":"PostPaymentToGLPreviewAccount","description":"One side (debit or credit) of the Post-to-GL preview."},"PostPaymentToGLPreviewResponse":{"properties":{"debit":{"$ref":"#/components/schemas/PostPaymentToGLPreviewAccount"},"credit":{"$ref":"#/components/schemas/PostPaymentToGLPreviewAccount"},"depositStatus":{"type":"string","title":"Depositstatus"},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"isRepairNeeded":{"type":"boolean","title":"Isrepairneeded","default":false}},"type":"object","required":["debit","credit","depositStatus"],"title":"PostPaymentToGLPreviewResponse","description":"Preview of the GL entry Porter will book when posting this payment."},"PostPaymentToQBOErrorResponse":{"properties":{"paymentId":{"type":"string","title":"Paymentid"},"error":{"type":"string","title":"Error"},"code":{"type":"string","title":"Code"},"details":{"items":{"type":"string"},"type":"array","title":"Details","default":[]}},"type":"object","required":["paymentId","error","code"],"title":"PostPaymentToQBOErrorResponse","description":"One failed payment row from a bulk QBO Payment post."},"PostPaymentToQBOResponse":{"properties":{"paymentId":{"type":"string","title":"Paymentid"},"qboPaymentId":{"type":"string","title":"Qbopaymentid"},"qboPaymentRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbopaymentref"},"qboProcessingFeePurchaseId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboprocessingfeepurchaseid"},"qboProcessingFeePurchaseRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboprocessingfeepurchaseref"}},"type":"object","required":["paymentId","qboPaymentId"],"title":"PostPaymentToQBOResponse","description":"Response after creating or reusing a QBO Payment and companion fee Expense."},"PostProcessorSettlementCommerceRootsResponse":{"properties":{"settlementId":{"type":"string","title":"Settlementid"},"businessDateBasis":{"type":"string","const":"business_date","title":"Businessdatebasis"},"outcomes":{"items":{"$ref":"#/components/schemas/CommercePostingRootOutcomeResponse"},"type":"array","title":"Outcomes"}},"type":"object","required":["settlementId","businessDateBasis","outcomes"],"title":"PostProcessorSettlementCommerceRootsResponse","description":"Exact linked Sale/Refund outcomes posted at their business dates."},"PostProcessorSettlementCostsRequest":{"properties":{"provider":{"type":"string","enum":["square","stripe","hubspot","helcim"],"title":"Provider"},"expectedSourceVersion":{"type":"string","title":"Expectedsourceversion"},"expectedGroupEvidenceFingerprint":{"type":"string","title":"Expectedgroupevidencefingerprint"},"approvals":{"items":{"$ref":"#/components/schemas/ProcessorSettlementCostApprovalRequest"},"type":"array","minItems":1,"title":"Approvals"},"expenseAccountId":{"type":"string","title":"Expenseaccountid"},"clearingAccountId":{"type":"string","title":"Clearingaccountid"}},"additionalProperties":false,"type":"object","required":["provider","expectedSourceVersion","expectedGroupEvidenceFingerprint","approvals","expenseAccountId","clearingAccountId"],"title":"PostProcessorSettlementCostsRequest","description":"Complete compare-and-set input for settlement-entry cost posting."},"PostProcessorSettlementCostsResponse":{"properties":{"status":{"type":"string","enum":["applied","unchanged"],"title":"Status"},"settlementId":{"type":"string","title":"Settlementid"},"provider":{"type":"string","title":"Provider"},"reconciliationStatus":{"type":"string","title":"Reconciliationstatus"},"independentCostTotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Independentcosttotal"},"entryReceipts":{"items":{"$ref":"#/components/schemas/ProcessorSettlementCostEntryReceiptResponse"},"type":"array","title":"Entryreceipts"}},"type":"object","required":["status","settlementId","provider","reconciliationStatus","independentCostTotal","entryReceipts"],"title":"PostProcessorSettlementCostsResponse","description":"Minimal public receipt for canonical settlement-cost posting."},"PostSaleRefundsRequest":{"properties":{"refundIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Refundids"},"dateFrom":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Datefrom"},"dateTo":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dateto"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","title":"PostSaleRefundsRequest","description":"Explicit refund posting request (POR-2492)."},"PostSaleRefundsResponse":{"properties":{"postedRefundIds":{"items":{"type":"string"},"type":"array","title":"Postedrefundids"},"unchangedRefundIds":{"items":{"type":"string"},"type":"array","title":"Unchangedrefundids"},"heldRefundIds":{"items":{"type":"string"},"type":"array","title":"Heldrefundids"},"reviewRequiredRefundIds":{"items":{"type":"string"},"type":"array","title":"Reviewrequiredrefundids"},"blockedClosedPeriodRefundIds":{"items":{"type":"string"},"type":"array","title":"Blockedclosedperiodrefundids"},"saleNotPostedRefundIds":{"items":{"type":"string"},"type":"array","title":"Salenotpostedrefundids"},"holdReasonsByRefundId":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Holdreasonsbyrefundid"}},"type":"object","required":["postedRefundIds","unchangedRefundIds","heldRefundIds","reviewRequiredRefundIds","blockedClosedPeriodRefundIds","saleNotPostedRefundIds","holdReasonsByRefundId"],"title":"PostSaleRefundsResponse","description":"Exact per-refund posting outcome (POR-2492)."},"PostSalesRequest":{"properties":{"saleIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Saleids"},"dateFrom":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Datefrom"},"dateTo":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dateto"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","title":"PostSalesRequest","description":"Explicit Sale posting request (POR-2484)."},"PostSalesResponse":{"properties":{"postedSaleIds":{"items":{"type":"string"},"type":"array","title":"Postedsaleids"},"unchangedSaleIds":{"items":{"type":"string"},"type":"array","title":"Unchangedsaleids"},"heldSaleIds":{"items":{"type":"string"},"type":"array","title":"Heldsaleids"},"blockedClosedPeriodSaleIds":{"items":{"type":"string"},"type":"array","title":"Blockedclosedperiodsaleids"},"reviewRequiredSaleIds":{"items":{"type":"string"},"type":"array","title":"Reviewrequiredsaleids"},"canceledSaleIds":{"items":{"type":"string"},"type":"array","title":"Canceledsaleids"},"holdReasonsBySaleId":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Holdreasonsbysaleid"}},"type":"object","required":["postedSaleIds","unchangedSaleIds","heldSaleIds","blockedClosedPeriodSaleIds","reviewRequiredSaleIds","canceledSaleIds","holdReasonsBySaleId"],"title":"PostSalesResponse","description":"Exact per-Sale posting outcome (POR-2484)."},"PostUnifiedJERequest":{"properties":{"entryId":{"type":"string","title":"Entryid"}},"type":"object","required":["entryId"],"title":"PostUnifiedJERequest","description":"Request to post a unified journal entry to QBO."},"PostUnifiedJEResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"postingOperationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postingoperationid"},"qboJeId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbojeid"},"qboJeRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbojeref"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"},"errorDetails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Errordetails"}},"type":"object","required":["success"],"title":"PostUnifiedJEResponse","description":"Response after posting a unified JE to QBO."},"PostedPeriod":{"properties":{"year":{"type":"integer","title":"Year"},"month":{"type":"integer","title":"Month"},"periodLabel":{"type":"string","title":"Periodlabel"},"status":{"type":"string","title":"Status"}},"type":"object","required":["year","month","periodLabel","status"],"title":"PostedPeriod","description":"A period that has been posted."},"PostedPeriodsResponse":{"properties":{"periods":{"items":{"$ref":"#/components/schemas/PostedPeriod"},"type":"array","title":"Periods"},"nextUnpostedPeriod":{"anyOf":[{"$ref":"#/components/schemas/PostedPeriod"},{"type":"null"}]}},"type":"object","required":["periods"],"title":"PostedPeriodsResponse","description":"List of posted periods."},"PostingBatchDetailResponse":{"properties":{"batch":{"$ref":"#/components/schemas/PostingBatchItem"},"linkedItems":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Linkeditems"}},"type":"object","required":["batch","linkedItems"],"title":"PostingBatchDetailResponse","description":"A single posting batch with its linked items."},"PostingBatchItem":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"batchType":{"type":"string","title":"Batchtype"},"itemCount":{"type":"integer","title":"Itemcount"},"postedCount":{"type":"integer","title":"Postedcount"},"failedCount":{"type":"integer","title":"Failedcount"},"status":{"type":"string","title":"Status"},"postedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedby"},"postedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedbyemail"},"revertedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revertedat"},"revertedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revertedby"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["id","companyId","batchType","itemCount","postedCount","failedCount","status","createdAt","updatedAt"],"title":"PostingBatchItem","description":"A single posting batch in the list."},"PostingBatchListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PostingBatchItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"PostingBatchListResponse","description":"Paginated list of posting batches."},"PostingStatus":{"type":"string","enum":["posted","pending"],"title":"PostingStatus","description":"Accounting state returned on a concrete row or aggregate group."},"PreferencesResponse":{"properties":{"essentialView":{"type":"boolean","title":"Essentialview"},"themePreference":{"type":"string","enum":["light","dark"],"title":"Themepreference"}},"type":"object","required":["essentialView","themePreference"],"title":"PreferencesResponse"},"PreferencesUpdate":{"properties":{"essentialView":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Essentialview"},"themePreference":{"anyOf":[{"type":"string","enum":["light","dark"]},{"type":"null"}],"title":"Themepreference"}},"type":"object","title":"PreferencesUpdate"},"PrepareAuditDocumentUploadRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"contentType":{"type":"string","maxLength":255,"title":"Contenttype","default":"application/octet-stream"},"sizeBytes":{"type":"integer","minimum":0.0,"title":"Sizebytes"}},"type":"object","required":["filename","sizeBytes"],"title":"PrepareAuditDocumentUploadRequest"},"PrepareMonthlyCloseGoalRunResponse":{"properties":{"initialMessage":{"type":"string","title":"Initialmessage"},"conversationObjective":{"additionalProperties":true,"type":"object","title":"Conversationobjective"},"period":{"$ref":"#/components/schemas/ClosePeriodResponse"}},"type":"object","required":["initialMessage","conversationObjective","period"],"title":"PrepareMonthlyCloseGoalRunResponse","description":"Payload the Monthly Close page sends through the normal chat runtime."},"PreparedAuditDocumentUpload":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"contentType":{"type":"string","maxLength":255,"minLength":1,"title":"Contenttype"},"sizeBytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sizebytes"},"status":{"$ref":"#/components/schemas/AuditDocumentStatus"},"errorMessage":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Errormessage"},"extractionSummary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extractionsummary"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"uploadUrl":{"type":"string","title":"Uploadurl"},"uploadToken":{"type":"string","title":"Uploadtoken"}},"type":"object","required":["id","filename","contentType","status","createdAt","uploadUrl","uploadToken"],"title":"PreparedAuditDocumentUpload","description":"A one-time Storage target; raw file bytes never transit the landing proxy."},"PreviewProposalRequest":{"properties":{"action":{"type":"string","title":"Action"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"previewKey":{"type":"string","title":"Previewkey"}},"type":"object","required":["action","previewKey"],"title":"PreviewProposalRequest","description":"Request to run a declared, non-mutating rehearsal of a pending approval.\n\nReason (POR-2092): `preview_key` is a KEY, not a handler. The server resolves\nit against the proposed action's own `approval_previews` declaration, so this\nrequest cannot name the tool class it wants executed."},"PreviousPeriodScopeSelection":{"properties":{"kind":{"type":"string","const":"previous_period","title":"Kind"},"scope":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","title":"Scope"},"count":{"type":"integer","minimum":1.0,"title":"Count","default":1}},"additionalProperties":false,"type":"object","required":["kind","scope"],"title":"PreviousPeriodScopeSelection"},"ProcessorBalanceEventRecord":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"provider":{"type":"string","title":"Provider"},"merchantId":{"type":"string","title":"Merchantid"},"objectKind":{"type":"string","title":"Objectkind"},"externalId":{"type":"string","title":"Externalid"},"sourceRevision":{"type":"string","title":"Sourcerevision"},"sourceStatus":{"type":"string","title":"Sourcestatus"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"sourceEffectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sourceeffectiveat"},"sourceObservedAt":{"type":"string","format":"date-time","title":"Sourceobservedat"},"accountingDisposition":{"type":"string","title":"Accountingdisposition"},"evidenceFingerprint":{"type":"string","title":"Evidencefingerprint"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","companyId","provider","merchantId","objectKind","externalId","sourceRevision","sourceStatus","sourceObservedAt","accountingDisposition","evidenceFingerprint","createdAt","updatedAt"],"title":"ProcessorBalanceEventRecord"},"ProcessorSettlementBankCandidateRecord":{"properties":{"bankTransactionId":{"type":"string","title":"Banktransactionid"},"date":{"type":"string","format":"date","title":"Date"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"description":{"type":"string","title":"Description"},"status":{"type":"string","title":"Status"},"bankAccountId":{"type":"string","title":"Bankaccountid"},"bankAccountName":{"type":"string","title":"Bankaccountname"}},"type":"object","required":["bankTransactionId","date","amount","description","status","bankAccountId","bankAccountName"],"title":"ProcessorSettlementBankCandidateRecord","description":"One bank deposit a payout may claim, described well enough to choose it.\n\nReason: POR-2573 -- candidate discovery previously returned bare ids for the\nshared matcher. An operator picking between deposits needs the facts printed\non the bank register row and nothing more; no score, rank or match reason is\nexposed, because candidacy stays a repository predicate rather than a\nsurface-local judgement."},"ProcessorSettlementBankMatchRequest":{"properties":{"bankTransactionId":{"type":"string","title":"Banktransactionid"}},"type":"object","required":["bankTransactionId"],"title":"ProcessorSettlementBankMatchRequest","description":"One explicit bank cash event selected for a processor payout."},"ProcessorSettlementBankReviewRequest":{"properties":{"bankTransactionId":{"type":"string","title":"Banktransactionid"},"reviewFingerprint":{"type":"string","title":"Reviewfingerprint"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["bankTransactionId","reviewFingerprint","reason"],"title":"ProcessorSettlementBankReviewRequest","description":"Reason: confirmation must bind the exact preview, cash identity and intent."},"ProcessorSettlementCommerceRootRecord":{"properties":{"rootKind":{"type":"string","enum":["sale","refund"],"title":"Rootkind"},"rootId":{"type":"string","title":"Rootid"},"externalId":{"type":"string","title":"Externalid"},"businessDate":{"type":"string","format":"date","title":"Businessdate"},"recognitionStatus":{"type":"string","title":"Recognitionstatus"},"accountingRevisionStatus":{"type":"string","title":"Accountingrevisionstatus"}},"type":"object","required":["rootKind","rootId","externalId","businessDate","recognitionStatus","accountingRevisionStatus"],"title":"ProcessorSettlementCommerceRootRecord","description":"One Sale or Refund linked to a payout entry, read at its own date grain."},"ProcessorSettlementCostApprovalRequest":{"properties":{"externalId":{"type":"string","title":"Externalid"},"expectedEntryType":{"type":"string","title":"Expectedentrytype"},"expectedAmount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Expectedamount"},"expectedEvidenceFingerprint":{"type":"string","title":"Expectedevidencefingerprint"}},"additionalProperties":false,"type":"object","required":["externalId","expectedEntryType","expectedAmount","expectedEvidenceFingerprint"],"title":"ProcessorSettlementCostApprovalRequest","description":"Exact source-entry evidence approved for one independent cost."},"ProcessorSettlementCostEntryReceiptResponse":{"properties":{"entryId":{"type":"string","title":"Entryid"},"externalId":{"type":"string","title":"Externalid"},"status":{"type":"string","enum":["posted","unchanged"],"title":"Status"}},"type":"object","required":["entryId","externalId","status"],"title":"ProcessorSettlementCostEntryReceiptResponse","description":"Public outcome for one approved settlement entry."},"ProcessorSettlementDetailRecord":{"properties":{"settlement":{"$ref":"#/components/schemas/ProcessorSettlementGroupRecord"},"entries":{"items":{"$ref":"#/components/schemas/ProcessorSettlementEntryRecord"},"type":"array","title":"Entries"},"unpostedIndependentCostCount":{"type":"integer","title":"Unpostedindependentcostcount"},"commerceRoots":{"items":{"$ref":"#/components/schemas/ProcessorSettlementCommerceRootRecord"},"type":"array","title":"Commerceroots"}},"type":"object","required":["settlement","entries","unpostedIndependentCostCount"],"title":"ProcessorSettlementDetailRecord"},"ProcessorSettlementEntryRecord":{"properties":{"id":{"type":"string","title":"Id"},"externalId":{"type":"string","title":"Externalid"},"entryType":{"type":"string","title":"Entrytype"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"effectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effectiveat"},"sourceObjectKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceobjectkind"},"sourceObjectId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceobjectid"},"accountingDisposition":{"type":"string","title":"Accountingdisposition"},"evidenceFingerprint":{"type":"string","title":"Evidencefingerprint"},"commerceOrderTenderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commerceordertenderid"},"commerceOrderRefundId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commerceorderrefundid"},"paymentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentexternalid"},"paymentGrossAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Paymentgrossamount"},"paymentFeeAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Paymentfeeamount"},"paymentNetAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Paymentnetamount"},"paymentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Paymentdate"}},"type":"object","required":["id","externalId","entryType","amount","accountingDisposition","evidenceFingerprint"],"title":"ProcessorSettlementEntryRecord"},"ProcessorSettlementGroupRecord":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"provider":{"type":"string","title":"Provider"},"merchantId":{"type":"string","title":"Merchantid"},"externalId":{"type":"string","title":"Externalid"},"sourceVersion":{"type":"string","title":"Sourceversion"},"sourceStatus":{"type":"string","title":"Sourcestatus"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"arrivalDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Arrivaldate"},"sourceObservedAt":{"type":"string","format":"date-time","title":"Sourceobservedat"},"evidenceFingerprint":{"type":"string","title":"Evidencefingerprint"},"reconciliationStatus":{"type":"string","title":"Reconciliationstatus"},"bankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionid"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","companyId","provider","merchantId","externalId","sourceVersion","sourceStatus","sourceObservedAt","evidenceFingerprint","reconciliationStatus","createdAt","updatedAt"],"title":"ProcessorSettlementGroupRecord"},"ProcessorSettlementReview":{"properties":{"status":{"type":"string","enum":["eligible","blocked","applied","unchanged","committed_audit_incomplete"],"title":"Status"},"settlementId":{"type":"string","title":"Settlementid"},"bankTransactionId":{"type":"string","title":"Banktransactionid"},"sourceVersion":{"type":"string","title":"Sourceversion"},"sourceCheckedAt":{"type":"string","format":"date-time","title":"Sourcecheckedat"},"entryCount":{"type":"integer","title":"Entrycount"},"allocationCount":{"type":"integer","title":"Allocationcount"},"payoutAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Payoutamount"},"bankAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bankamount"},"entryTotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Entrytotal"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"blockers":{"items":{"type":"string"},"type":"array","title":"Blockers"},"reviewFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewfingerprint"},"transitionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transitionid"},"accountingUpdated":{"type":"boolean","const":false,"title":"Accountingupdated","default":false}},"type":"object","required":["status","settlementId","bankTransactionId","sourceVersion","sourceCheckedAt","entryCount","allocationCount","payoutAmount","bankAmount","entryTotal","currency"],"title":"ProcessorSettlementReview","description":"A complete source snapshot check, never a promise about future revisions."},"ProcessorTenderAccountMapping":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"paymentProcessorConnectionId":{"type":"string","title":"Paymentprocessorconnectionid"},"tenderKind":{"type":"string","enum":["cash","gift_card","external"],"title":"Tenderkind"},"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"accountType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accounttype"},"subType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"semanticRoles":{"items":{"type":"string"},"type":"array","title":"Semanticroles"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","paymentProcessorConnectionId","tenderKind","accountId","accountName"],"title":"ProcessorTenderAccountMapping","description":"One processor tender kind mapped to an existing company COA account."},"ProfileUpdate":{"properties":{"email":{"type":"string","title":"Email"},"firstName":{"type":"string","title":"Firstname"},"lastName":{"type":"string","title":"Lastname"}},"type":"object","required":["email","firstName","lastName"],"title":"ProfileUpdate"},"ProfitAndLossResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"sections":{"items":{"$ref":"#/components/schemas/PnlSection"},"type":"array","title":"Sections"},"grossProfit":{"type":"number","title":"Grossprofit"},"operatingIncome":{"type":"number","title":"Operatingincome"},"netIncome":{"type":"number","title":"Netincome"}},"type":"object","required":["companyId","startDate","endDate","sections","grossProfit","operatingIncome","netIncome"],"title":"ProfitAndLossResponse"},"ProgramExecutionEntry":{"properties":{"index":{"type":"integer","title":"Index"},"values":{"additionalProperties":true,"type":"object","title":"Values"},"selection":{"$ref":"#/components/schemas/ProgramExecutionSelection"}},"additionalProperties":false,"type":"object","required":["index","values","selection"],"title":"ProgramExecutionEntry"},"ProgramExecutionFieldDescriptor":{"properties":{"key":{"type":"string","title":"Key"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"role":{"type":"string","enum":["dimension","measure","series","value"],"title":"Role","default":"value"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"semanticId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semanticid"}},"additionalProperties":false,"type":"object","required":["key"],"title":"ProgramExecutionFieldDescriptor"},"ProgramExecutionFieldValue":{"properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"role":{"anyOf":[{"type":"string","enum":["dimension","measure","series","value"]},{"type":"null"}],"title":"Role","default":"value"},"value":{"title":"Value"},"exactValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exactvalue"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"semanticId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Semanticid"},"owner":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionObjectBinding"},{"type":"null"}]},"ownerRef":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Ownerref"},"ownerFieldKey":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Ownerfieldkey"},"reference":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionObjectBinding"},{"type":"null"}]},"referenceRef":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Referenceref"},"referenceFieldKey":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Referencefieldkey"},"contributors":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProgramExecutionObjectBinding"},"type":"array"},{"type":"null"}],"title":"Contributors"},"contributorRefs":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":256},{"type":"null"}],"title":"Contributorrefs"},"derivation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Derivation"}},"additionalProperties":false,"type":"object","title":"ProgramExecutionFieldValue"},"ProgramExecutionObjectBinding":{"properties":{"kind":{"type":"string","enum":["workflow_record","canonical_entity"],"title":"Kind","default":"workflow_record"},"objectTypeKey":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Objecttypekey"},"entityKey":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Entitykey"},"recordId":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Recordid"},"label":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Label"},"fieldKey":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Fieldkey"}},"additionalProperties":false,"type":"object","title":"ProgramExecutionObjectBinding"},"ProgramExecutionResult":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"fields":{"items":{"$ref":"#/components/schemas/ProgramExecutionFieldDescriptor"},"type":"array","title":"Fields"},"entries":{"items":{"$ref":"#/components/schemas/ProgramExecutionEntry"},"type":"array","title":"Entries"},"bindings":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProgramExecutionObjectBinding"},"type":"array"},{"type":"null"}],"title":"Bindings"}},"additionalProperties":false,"type":"object","title":"ProgramExecutionResult"},"ProgramExecutionSelection":{"properties":{"kind":{"type":"string","const":"program_entry","title":"Kind","default":"program_entry"},"rowIndex":{"type":"integer","title":"Rowindex"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"primaryDimension":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionFieldValue"},{"type":"null"}]},"primaryMeasure":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionFieldValue"},{"type":"null"}]},"series":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionFieldValue"},{"type":"null"}]},"fields":{"additionalProperties":{"$ref":"#/components/schemas/ProgramExecutionFieldValue"},"type":"object","title":"Fields"},"owner":{"anyOf":[{"$ref":"#/components/schemas/ProgramExecutionObjectBinding"},{"type":"null"}]},"ownerRef":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Ownerref"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProgramExecutionObjectBinding"},"type":"array"},{"type":"null"}],"title":"References"},"referenceRefs":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":256},{"type":"null"}],"title":"Referencerefs"}},"additionalProperties":false,"type":"object","required":["rowIndex"],"title":"ProgramExecutionSelection"},"ProgramStep":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Unique step name used by later references."},"op":{"type":"string","minLength":1,"title":"Op","description":"Read-only ontology action or deterministic analyze operation."},"params":{"additionalProperties":true,"type":"object","title":"Params","description":"Operation parameters, including references to earlier outputs."}},"additionalProperties":false,"type":"object","required":["name","op"],"title":"ProgramStep","description":"A single named row-program step."},"PromptComponentView":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"defaultBody":{"type":"string","title":"Defaultbody"},"editable":{"type":"boolean","title":"Editable"},"source":{"type":"string","title":"Source"},"isOverridden":{"type":"boolean","title":"Isoverridden"},"bodySha256":{"type":"string","title":"Bodysha256"},"defaultBodySha256":{"type":"string","title":"Defaultbodysha256"},"overrideBaseBodySha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overridebasebodysha256"},"updatedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyemail"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"usedBy":{"items":{"$ref":"#/components/schemas/PromptUsageView"},"type":"array","title":"Usedby"},"history":{"items":{"$ref":"#/components/schemas/PromptVersionView"},"type":"array","title":"History"}},"type":"object","required":["key","title","body","defaultBody","editable","source","isOverridden","bodySha256","defaultBodySha256"],"title":"PromptComponentView"},"PromptManifest":{"properties":{"promptId":{"type":"string","title":"Promptid"},"title":{"type":"string","title":"Title"},"environment":{"type":"string","title":"Environment"},"components":{"items":{"$ref":"#/components/schemas/PromptComponentView"},"type":"array","title":"Components"},"renderedPrompt":{"type":"string","title":"Renderedprompt"}},"type":"object","required":["promptId","title","environment","components","renderedPrompt"],"title":"PromptManifest"},"PromptOverrideUpdate":{"properties":{"body":{"type":"string","maxLength":50000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"PromptOverrideUpdate"},"PromptSurfaceManifest":{"properties":{"surfaceId":{"type":"string","title":"Surfaceid"},"title":{"type":"string","title":"Title"},"prompts":{"items":{"$ref":"#/components/schemas/PromptSurfacePromptView"},"type":"array","title":"Prompts"}},"type":"object","required":["surfaceId","title","prompts"],"title":"PromptSurfaceManifest"},"PromptSurfacePromptView":{"properties":{"slug":{"type":"string","title":"Slug"},"promptId":{"type":"string","title":"Promptid"},"title":{"type":"string","title":"Title"}},"type":"object","required":["slug","promptId","title"],"title":"PromptSurfacePromptView"},"PromptUsageView":{"properties":{"promptId":{"type":"string","title":"Promptid"},"promptTitle":{"type":"string","title":"Prompttitle"},"surface":{"type":"string","title":"Surface"},"scope":{"type":"string","title":"Scope"}},"type":"object","required":["promptId","promptTitle","surface","scope"],"title":"PromptUsageView"},"PromptVersionView":{"properties":{"id":{"type":"string","title":"Id"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"baseBodySha256":{"type":"string","title":"Basebodysha256"},"isActive":{"type":"boolean","title":"Isactive"},"createdByEmail":{"type":"string","title":"Createdbyemail"},"createdAt":{"type":"string","title":"Createdat"}},"type":"object","required":["id","baseBodySha256","isActive","createdByEmail","createdAt"],"title":"PromptVersionView"},"ProposalEventRequest":{"properties":{"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"proposalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalid"},"proposalFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalfingerprint"},"proposalMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposalmessage"},"proposalSideEffects":{"items":{"type":"string"},"type":"array","title":"Proposalsideeffects"},"approvalExecution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Approvalexecution"},"result":{"anyOf":[{},{"type":"null"}],"title":"Result"}},"type":"object","required":["status","action"],"title":"ProposalEventRequest","description":"Request to persist non-executing proposal UI state transitions.\n\nReason: Approval cards are user-visible transcript state. Dismissing a\nproposal does not execute a domain mutation, but the button state still\nhas to survive chat history reloads and be model-visible on later turns."},"ProvenanceAudit":{"properties":{"createdVia":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdvia"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","title":"ProvenanceAudit","description":"Who/how/when, from the command_log mutation audit (best-effort)."},"ProvenanceLink":{"properties":{"kind":{"type":"string","title":"Kind"},"id":{"type":"string","title":"Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["kind","id"],"title":"ProvenanceLink","description":"A related record worth linking to from the provenance block."},"PublicLandingNotificationRequest":{"properties":{"submissionId":{"type":"string","format":"uuid","title":"Submissionid"},"name":{"type":"string","maxLength":120,"title":"Name","default":""},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"company":{"type":"string","maxLength":200,"title":"Company","default":""},"existingFinanceTeam":{"type":"string","maxLength":500,"title":"Existingfinanceteam","default":""},"helpWith":{"type":"string","maxLength":4000,"title":"Helpwith","default":""},"source":{"anyOf":[{"type":"string","const":"financial_health_audit"},{"type":"null"}],"title":"Source"},"action":{"type":"string","enum":["generate_report","unlock_report","unlock_insights","personalized_insights_opt_in","book_demo"],"title":"Action","default":"book_demo"},"reportHeadline":{"type":"string","maxLength":300,"title":"Reportheadline","default":""},"reportReviewPeriod":{"type":"string","maxLength":300,"title":"Reportreviewperiod","default":""},"reportSummary":{"type":"string","maxLength":4000,"title":"Reportsummary","default":""},"reportFindings":{"items":{"type":"string","maxLength":500},"type":"array","maxItems":10,"title":"Reportfindings"}},"additionalProperties":false,"type":"object","required":["submissionId","email"],"title":"PublicLandingNotificationRequest","description":"One typed lead event; callers cannot author an arbitrary email."},"PublicLandingNotificationResult":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"duplicate":{"type":"boolean","title":"Duplicate","default":false}},"type":"object","title":"PublicLandingNotificationResult"},"QBOCleanupResult":{"properties":{"realmId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Realmid"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment"},"localMergeStatus":{"type":"string","enum":["not_committed","unknown","committed"],"title":"Localmergestatus","default":"not_committed"},"sourceCustomerIds":{"items":{"type":"string"},"type":"array","title":"Sourcecustomerids"},"targetCustomerId":{"type":"string","title":"Targetcustomerid"},"outcomes":{"items":{"$ref":"#/components/schemas/QBOCustomerOutcome"},"type":"array","title":"Outcomes"},"skippedCustomerIds":{"items":{"type":"string"},"type":"array","title":"Skippedcustomerids"},"writeAllowed":{"type":"boolean","title":"Writeallowed","default":true},"blockers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Blockers"},"deactivationRequested":{"type":"boolean","title":"Deactivationrequested","default":true},"blockedBeforeChanges":{"type":"boolean","title":"Blockedbeforechanges","default":false}},"type":"object","required":["sourceCustomerIds","targetCustomerId"],"title":"QBOCleanupResult"},"QBOConnectResponse":{"properties":{"authUrl":{"type":"string","title":"Authurl"},"state":{"type":"string","title":"State"}},"type":"object","required":["authUrl","state"],"title":"QBOConnectResponse"},"QBOCustomerOutcome":{"properties":{"qboCustomerId":{"type":"string","title":"Qbocustomerid"},"status":{"type":"string","enum":["pending","unknown","deactivated","already_inactive"],"title":"Status"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"balance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance"},"balanceWithJobs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balancewithjobs"},"historyEmpty":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Historyempty"},"openItemsClear":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Openitemsclear"}},"type":"object","required":["qboCustomerId","status"],"title":"QBOCustomerOutcome"},"QuickBooksConnectionStart":{"properties":{"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authurl"}},"type":"object","title":"QuickBooksConnectionStart"},"QuickBooksConnectionStartRequest":{"properties":{"returnUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Returnurl"}},"type":"object","title":"QuickBooksConnectionStartRequest"},"QuickBooksConnectionState":{"properties":{"status":{"$ref":"#/components/schemas/QuickBooksConnectionStatus"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"},"connectedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connectedat"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"}},"type":"object","required":["status"],"title":"QuickBooksConnectionState"},"QuickBooksConnectionStatus":{"type":"string","enum":["not_started","pending","connected","failed"],"title":"QuickBooksConnectionStatus"},"QuickBooksConnectionStatusResponse":{"properties":{"connectionHistory":{"items":{"$ref":"#/components/schemas/ConnectionHistoryEntry"},"type":"array","title":"Connectionhistory","default":[]},"connected":{"type":"boolean","title":"Connected"},"realmId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Realmid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiresat"},"qboEnvironment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboenvironment"}},"type":"object","required":["connected"],"title":"QuickBooksConnectionStatusResponse"},"RangeScopeSelection":{"properties":{"kind":{"type":"string","const":"range","title":"Kind"},"start":{"oneOf":[{"$ref":"#/components/schemas/FixedDateExpression"},{"$ref":"#/components/schemas/TodayDateExpression"},{"$ref":"#/components/schemas/ScopeBoundaryDateExpression"},{"$ref":"#/components/schemas/OffsetDateExpression"}],"title":"Start","discriminator":{"propertyName":"kind","mapping":{"fixed":"#/components/schemas/FixedDateExpression","offset":"#/components/schemas/OffsetDateExpression","scope_boundary":"#/components/schemas/ScopeBoundaryDateExpression","today":"#/components/schemas/TodayDateExpression"}}},"end":{"oneOf":[{"$ref":"#/components/schemas/FixedDateExpression"},{"$ref":"#/components/schemas/TodayDateExpression"},{"$ref":"#/components/schemas/ScopeBoundaryDateExpression"},{"$ref":"#/components/schemas/OffsetDateExpression"}],"title":"End","discriminator":{"propertyName":"kind","mapping":{"fixed":"#/components/schemas/FixedDateExpression","offset":"#/components/schemas/OffsetDateExpression","scope_boundary":"#/components/schemas/ScopeBoundaryDateExpression","today":"#/components/schemas/TodayDateExpression"}}}},"additionalProperties":false,"type":"object","required":["kind","start","end"],"title":"RangeScopeSelection"},"RecognitionDetailItem":{"properties":{"subscriptionId":{"type":"string","title":"Subscriptionid"},"customerName":{"type":"string","title":"Customername"},"contractAmount":{"type":"number","title":"Contractamount"},"daysInPeriod":{"type":"integer","title":"Daysinperiod"},"amountRecognized":{"type":"number","title":"Amountrecognized"},"sourceAccount":{"type":"string","title":"Sourceaccount"}},"type":"object","required":["subscriptionId","customerName","contractAmount","daysInPeriod","amountRecognized","sourceAccount"],"title":"RecognitionDetailItem","description":"Per-subscription recognition detail."},"RecognitionPreviewResponse":{"properties":{"companyId":{"type":"string","title":"Companyid"},"periodYear":{"type":"integer","title":"Periodyear"},"periodMonth":{"type":"integer","title":"Periodmonth"},"periodLabel":{"type":"string","title":"Periodlabel"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"fromUnbilled":{"type":"number","title":"Fromunbilled"},"fromDeferred":{"type":"number","title":"Fromdeferred"},"totalRecognized":{"type":"number","title":"Totalrecognized"},"subscriptionCount":{"type":"integer","title":"Subscriptioncount"},"unbilledSubscriptionCount":{"type":"integer","title":"Unbilledsubscriptioncount"},"deferredSubscriptionCount":{"type":"integer","title":"Deferredsubscriptioncount"},"jeDate":{"type":"string","title":"Jedate"},"jeMemo":{"type":"string","title":"Jememo"},"status":{"type":"string","title":"Status"},"details":{"items":{"$ref":"#/components/schemas/RecognitionDetailItem"},"type":"array","title":"Details"},"journalEntryLines":{"items":{"$ref":"#/components/schemas/JournalEntryLinePreview"},"type":"array","title":"Journalentrylines","default":[]}},"type":"object","required":["companyId","periodYear","periodMonth","periodLabel","periodStart","periodEnd","fromUnbilled","fromDeferred","totalRecognized","subscriptionCount","unbilledSubscriptionCount","deferredSubscriptionCount","jeDate","jeMemo","status","details"],"title":"RecognitionPreviewResponse","description":"Preview of recognition JE for a period."},"ReconciliationAccount":{"properties":{"accountId":{"type":"string","title":"Accountid"},"reconciliationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reconciliationid"},"accountName":{"type":"string","title":"Accountname"},"accountType":{"type":"string","title":"Accounttype"},"porterBalance":{"type":"number","title":"Porterbalance"},"beginningBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beginningbalance"},"additions":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Additions"},"reductions":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reductions"},"endingBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Endingbalance"},"statementBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Statementbalance"},"variance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Variance"},"statementBeginningBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Statementbeginningbalance"},"beginningBalanceAdjustment":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beginningbalanceadjustment"},"acceptedResidualAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Acceptedresidualamount"},"acceptedResidualReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acceptedresidualreason"},"status":{"type":"string","title":"Status"},"confirmedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmedby"},"confirmedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmedat"},"statementPeriodStart":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementperiodstart"},"statementPeriodEnd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementperiodend"},"statementDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementdocumentid"},"isGroup":{"type":"boolean","title":"Isgroup","default":false},"memberAccountIds":{"items":{"type":"string"},"type":"array","title":"Memberaccountids"},"memberAccountNames":{"items":{"type":"string"},"type":"array","title":"Memberaccountnames"}},"type":"object","required":["accountId","accountName","accountType","porterBalance","status"],"title":"ReconciliationAccount","description":"A single bank/CC or clearing account for reconciliation."},"ReconciliationAccountGroupRequest":{"properties":{"name":{"type":"string","title":"Name"},"accountIds":{"items":{"type":"string"},"type":"array","title":"Accountids"}},"type":"object","required":["name","accountIds"],"title":"ReconciliationAccountGroupRequest","description":"Request body for creating/updating a shared-statement account group."},"ReconciliationAccountGroupResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"name":{"type":"string","title":"Name"},"accountType":{"type":"string","title":"Accounttype"},"statementCloseDay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statementcloseday"},"isActive":{"type":"boolean","title":"Isactive","default":true},"memberAccountIds":{"items":{"type":"string"},"type":"array","title":"Memberaccountids"},"memberAccountNames":{"items":{"type":"string"},"type":"array","title":"Memberaccountnames"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedby"}},"type":"object","required":["id","companyId","name","accountType"],"title":"ReconciliationAccountGroupResponse","description":"Configured group of accounts reconciled against one shared statement."},"ReconciliationBookItem":{"properties":{"id":{"type":"string","title":"Id"},"ledgerLineId":{"type":"string","title":"Ledgerlineid"},"itemType":{"type":"string","title":"Itemtype"},"bankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionid"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"date":{"type":"string","title":"Date"},"description":{"type":"string","title":"Description"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"amount":{"type":"number","title":"Amount"},"postingType":{"type":"string","title":"Postingtype"},"isCleared":{"type":"boolean","title":"Iscleared"},"canClear":{"type":"boolean","title":"Canclear"},"isOutstanding":{"type":"boolean","title":"Isoutstanding","default":false},"canMarkOutstanding":{"type":"boolean","title":"Canmarkoutstanding","default":false},"canClearLedgerLine":{"type":"boolean","title":"Canclearledgerline","default":false},"reconciliationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reconciliationstatus"},"firstOutstandingPeriod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstoutstandingperiod"},"clearedPeriod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clearedperiod"},"runningBalance":{"type":"number","title":"Runningbalance"}},"type":"object","required":["id","ledgerLineId","itemType","date","description","amount","postingType","isCleared","canClear","runningBalance"],"title":"ReconciliationBookItem","description":"One GL-backed register row for a reconciliation account."},"ReconciliationBookResponse":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/ReconciliationBookItem"},"type":"array","title":"Transactions"},"beginningBalance":{"type":"number","title":"Beginningbalance"},"reconciliationOpeningBalance":{"type":"number","title":"Reconciliationopeningbalance","default":0.0},"additions":{"type":"number","title":"Additions"},"reductions":{"type":"number","title":"Reductions"},"endingBalance":{"type":"number","title":"Endingbalance"},"clearedCount":{"type":"integer","title":"Clearedcount"},"clearedBalance":{"type":"number","title":"Clearedbalance"},"unclearedBalance":{"type":"number","title":"Unclearedbalance"},"unpostedItems":{"items":{"$ref":"#/components/schemas/ReconciliationUnpostedItem"},"type":"array","title":"Unposteditems","default":[]},"unpostedCount":{"type":"integer","title":"Unpostedcount","default":0},"unpostedTotal":{"type":"number","title":"Unpostedtotal","default":0.0},"outstandingCount":{"type":"integer","title":"Outstandingcount","default":0},"outstandingTotal":{"type":"number","title":"Outstandingtotal","default":0.0},"hasReconciliationBaseline":{"type":"boolean","title":"Hasreconciliationbaseline","default":false},"statementTimingTotal":{"type":"number","title":"Statementtimingtotal","default":0.0},"beginningBalanceAdjustment":{"type":"number","title":"Beginningbalanceadjustment","default":0.0},"unexplainedDifference":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unexplaineddifference"}},"type":"object","required":["transactions","beginningBalance","additions","reductions","endingBalance","clearedCount","clearedBalance","unclearedBalance"],"title":"ReconciliationBookResponse","description":"GL-backed register response for the existing bank-transactions endpoint."},"ReconciliationResponse":{"properties":{"matched":{"type":"integer","title":"Matched","default":0},"missingInQbo":{"type":"integer","title":"Missinginqbo","default":0},"amountMismatch":{"type":"integer","title":"Amountmismatch","default":0},"totalChecked":{"type":"integer","title":"Totalchecked","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"details":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Details","default":[]}},"type":"object","title":"ReconciliationResponse","description":"Reconciliation report comparing Porter records with QBO."},"ReconciliationStatement":{"properties":{"id":{"type":"string","title":"Id"},"documentId":{"type":"string","title":"Documentid"},"fileName":{"type":"string","title":"Filename"},"uploadedAt":{"type":"string","title":"Uploadedat"},"uploadedBy":{"type":"string","title":"Uploadedby"}},"type":"object","required":["id","documentId","fileName","uploadedAt","uploadedBy"],"title":"ReconciliationStatement","description":"An attached statement source document for a reconciliation account.\n\nReason: POR-1537 — source-data auditing only. ``document_id`` references the\nstored file in the canonical documents table; download it through the documents\nAPI. No AI extraction or extracted balances."},"ReconciliationSuggestionGroup":{"properties":{"transactionIds":{"items":{"type":"string"},"type":"array","title":"Transactionids"},"transactions":{"items":{"$ref":"#/components/schemas/BankTransactionReconItem"},"type":"array","title":"Transactions"},"total":{"type":"number","title":"Total"}},"type":"object","required":["transactionIds","transactions","total"],"title":"ReconciliationSuggestionGroup","description":"One suggestion: a subset of uncleared transactions summing to the target."},"ReconciliationSuggestionsResponse":{"properties":{"target":{"type":"number","title":"Target"},"suggestions":{"items":{"$ref":"#/components/schemas/ReconciliationSuggestionGroup"},"type":"array","title":"Suggestions"}},"type":"object","required":["target","suggestions"],"title":"ReconciliationSuggestionsResponse","description":"Response for the suggestions endpoint."},"ReconciliationUnpostedItem":{"properties":{"isPosted":{"type":"boolean","title":"Isposted","default":false},"bankTransactionId":{"type":"string","title":"Banktransactionid"},"date":{"type":"string","title":"Date"},"description":{"type":"string","title":"Description"},"amount":{"type":"number","title":"Amount"},"postingStatus":{"type":"string","title":"Postingstatus"}},"type":"object","required":["bankTransactionId","date","description","amount","postingStatus"],"title":"ReconciliationUnpostedItem","description":"One categorized-but-unposted bank transaction blocking reconciliation.\n\nReason: POR-1387 — the GL-backed register reads posted lines only, so an\naccount whose variance is caused by ready/needs_review bank transactions\nshows a variance with no visible cause. These rows surface that cause. They\nare display-only: `is_posted=False` keeps them structurally distinct from the\nposted register rows and they are NEVER added into the posted running/ending\nbalance."},"ReconciliationsResponse":{"properties":{"statementAccounts":{"items":{"$ref":"#/components/schemas/ReconciliationAccount"},"type":"array","title":"Statementaccounts"},"clearingAccounts":{"items":{"$ref":"#/components/schemas/ReconciliationAccount"},"type":"array","title":"Clearingaccounts"},"statementConfirmed":{"type":"integer","title":"Statementconfirmed"},"statementTotal":{"type":"integer","title":"Statementtotal"},"clearingClean":{"type":"integer","title":"Clearingclean"},"clearingTotal":{"type":"integer","title":"Clearingtotal"}},"type":"object","required":["statementAccounts","clearingAccounts","statementConfirmed","statementTotal","clearingClean","clearingTotal"],"title":"ReconciliationsResponse","description":"Response for the reconciliations list endpoint."},"RecordApPortalSubmissionRequest":{"properties":{"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submittedat"},"externalReference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Externalreference"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"}},"type":"object","title":"RecordApPortalSubmissionRequest","description":"Request body for recording external AP-portal invoice submission."},"RecordDirectPaymentApplicationRequest":{"properties":{"invoiceId":{"type":"string","title":"Invoiceid"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"}},"type":"object","required":["invoiceId","amount"],"title":"RecordDirectPaymentApplicationRequest","description":"One invoice allocation for a bank-origin direct payment."},"RecordDirectPaymentRequest":{"properties":{"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoiceid"},"applications":{"anyOf":[{"items":{"$ref":"#/components/schemas/RecordDirectPaymentApplicationRequest"},"type":"array"},{"type":"null"}],"title":"Applications"},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","title":"RecordDirectPaymentRequest","description":"Record a direct customer payment against an open invoice.\n\nReason: POR-115 — when a bank deposit is categorized as A/R, Michael can link it\nto an open invoice, creating a payment + GL entry (DR Cash, CR A/R)."},"RecordDirectPaymentResponse":{"properties":{"paymentId":{"type":"string","title":"Paymentid"},"invoiceId":{"type":"string","title":"Invoiceid"},"amount":{"type":"number","title":"Amount"},"payments":{"items":{"$ref":"#/components/schemas/RecordedDirectPayment"},"type":"array","title":"Payments"}},"type":"object","required":["paymentId","invoiceId","amount"],"title":"RecordDirectPaymentResponse","description":"Response after recording a direct payment."},"RecordExternalSendRequest":{"properties":{"sentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sentat"},"recipientEmails":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Recipientemails"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"}},"type":"object","title":"RecordExternalSendRequest","description":"Request body for recording an invoice send that happened outside Porter."},"RecordLoanPaymentResponse":{"properties":{"schedule":{"$ref":"#/components/schemas/ScheduleResponse"}},"type":"object","required":["schedule"],"title":"RecordLoanPaymentResponse","description":"Response after recording an actual loan payment."},"RecordLoanPrincipalAdjustmentResponse":{"properties":{"schedule":{"$ref":"#/components/schemas/ScheduleResponse"}},"type":"object","required":["schedule"],"title":"RecordLoanPrincipalAdjustmentResponse","description":"Response after linking posted JE evidence to loan servicing."},"RecordedDirectPayment":{"properties":{"paymentId":{"type":"string","title":"Paymentid"},"invoiceId":{"type":"string","title":"Invoiceid"},"invoiceIds":{"items":{"type":"string"},"type":"array","title":"Invoiceids"},"amount":{"type":"number","title":"Amount"},"paymentApplicationIds":{"items":{"type":"string"},"type":"array","title":"Paymentapplicationids"}},"type":"object","required":["paymentId","invoiceId","amount"],"title":"RecordedDirectPayment","description":"One created payment from a direct bank deposit."},"RedeemBillingAccessCodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"RedeemBillingAccessCodeRequest"},"RedeemCodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"RedeemCodeRequest"},"RefreshScenarioRequest":{"properties":{"authority":{"$ref":"#/components/schemas/MutationAuthorityRequest"}},"type":"object","required":["authority"],"title":"RefreshScenarioRequest"},"RefundCostReadiness":{"properties":{"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons","default":[]},"observations":{"items":{"$ref":"#/components/schemas/RefundFeeObservation"},"type":"array","title":"Observations","default":[]},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End"}},"additionalProperties":false,"type":"object","title":"RefundCostReadiness"},"RefundFeeObservation":{"properties":{"components":{"items":{"$ref":"#/components/schemas/CommerceFeeComponent"},"type":"array","title":"Components","default":[]},"errors":{"items":{"$ref":"#/components/schemas/RefundFeeValidationError"},"type":"array","title":"Errors","default":[]},"complete":{"type":"boolean","title":"Complete"},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Content Hash"}},"additionalProperties":false,"type":"object","required":["complete","content_hash"],"title":"RefundFeeObservation","description":"One normalized multiset; duplicate components are economically distinct."},"RefundFeeValidationError":{"properties":{"code":{"type":"string","enum":["missing_components","invalid_components","invalid_component","currency_mismatch","principal_conflict","legacy_aggregate_unproven"],"title":"Code"},"index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Index"},"amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Minor"},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}],"title":"Currency"}},"additionalProperties":false,"type":"object","required":["code"],"title":"RefundFeeValidationError","description":"Only validated primitive fragments survive malformed source evidence."},"RepairGLResponse":{"properties":{"totalPayments":{"type":"integer","title":"Totalpayments"},"repaired":{"type":"integer","title":"Repaired"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"type":"integer","title":"Errors"}},"type":"object","required":["totalPayments","repaired","skipped","errors"],"title":"RepairGLResponse","description":"Response from GL repair endpoint."},"ReportContextResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/DocumentListItem"},"type":"array","title":"Documents"},"notes":{"items":{"$ref":"#/components/schemas/MemoryItemResponse"},"type":"array","title":"Notes"},"companyProfile":{"items":{"$ref":"#/components/schemas/CompanyMemoryResponse"},"type":"array","title":"Companyprofile"}},"type":"object","required":["documents","notes","companyProfile"],"title":"ReportContextResponse","description":"Aggregated context for report generation."},"ReportDetail":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"title":{"type":"string","title":"Title"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"status":{"type":"string","enum":["generating","ready","failed"],"title":"Status","default":"ready"},"reportDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reportdate"},"htmlContent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htmlcontent"},"content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content"},"uploadedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploadedby"},"generatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generatedat"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"accountingBasis":{"anyOf":[{"type":"string","enum":["cash","accrual"]},{"type":"null"}],"title":"Accountingbasis"},"cashSettlementContractVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashsettlementcontractversion"},"numericAvailable":{"type":"boolean","title":"Numericavailable","default":false},"createdAt":{"type":"string","title":"Createdat"}},"type":"object","required":["id","companyId","title","createdAt"],"title":"ReportDetail","description":"Full report including body content (for viewer).\n\nReason: POR-1320 — structured reports carry `content` (rendered natively);\nlegacy advisor uploads carry `html_content`. Either may be null on a given\nrow, so both are optional."},"ReportListItem":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"title":{"type":"string","title":"Title"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"status":{"type":"string","enum":["generating","ready","failed"],"title":"Status","default":"ready"},"reportDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reportdate"},"uploadedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploadedby"},"generatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generatedat"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"accountingBasis":{"anyOf":[{"type":"string","enum":["cash","accrual"]},{"type":"null"}],"title":"Accountingbasis"},"cashSettlementContractVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashsettlementcontractversion"},"numericAvailable":{"type":"boolean","title":"Numericavailable","default":false},"createdAt":{"type":"string","title":"Createdat"}},"type":"object","required":["id","companyId","title","createdAt"],"title":"ReportListItem","description":"Report summary without report body (for list views)."},"ReportListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"ReportListResponse"},"ReportTabRelevance":{"properties":{"profitAndLoss":{"$ref":"#/components/schemas/NavigationSurfaceState"},"balanceSheet":{"$ref":"#/components/schemas/NavigationSurfaceState"},"cashFlow":{"$ref":"#/components/schemas/NavigationSurfaceState"},"generalLedger":{"$ref":"#/components/schemas/NavigationSurfaceState"},"trialBalance":{"$ref":"#/components/schemas/NavigationSurfaceState"},"apAging":{"$ref":"#/components/schemas/NavigationSurfaceState"},"monthlyPerformance":{"$ref":"#/components/schemas/NavigationSurfaceState"}},"type":"object","required":["profitAndLoss","balanceSheet","cashFlow","generalLedger","trialBalance","apAging","monthlyPerformance"],"title":"ReportTabRelevance","description":"Reports page tabs keyed by the frontend route slugs."},"ResetCompanyResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"deleted":{"additionalProperties":{"type":"integer"},"type":"object","title":"Deleted"}},"type":"object","required":["success","message","deleted"],"title":"ResetCompanyResponse","description":"Response model for company reset with deletion counts."},"ResolveBillPaymentBankCandidateReviewRequest":{"properties":{"bankTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Banktransactionid"}},"type":"object","title":"ResolveBillPaymentBankCandidateReviewRequest","description":"Selected bank evidence for an explicit AP candidate decision."},"ResolveFlagRequest":{"properties":{"resolution":{"type":"string","title":"Resolution"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduleid"}},"type":"object","required":["resolution"],"title":"ResolveFlagRequest","description":"Request to resolve (accept or dismiss) a flag.\n\nReason: resolution is 'accepted' (user wants to create schedule) or 'dismissed'.\nschedule_id is set when a schedule is created from the flag."},"ResolveQboPaymentReconciliationRequest":{"properties":{"incidentId":{"type":"string","title":"Incidentid"},"decision":{"type":"string","enum":["keep_porter","porter_adjusted_to_qbo"],"title":"Decision"},"expectedPorterGraphHash":{"type":"string","title":"Expectedportergraphhash"}},"type":"object","required":["incidentId","decision","expectedPorterGraphHash"],"title":"ResolveQboPaymentReconciliationRequest","description":"Explicit decision for one reviewed QBO Payment difference."},"ResolvedCreditCardRow":{"properties":{"parsed":{"$ref":"#/components/schemas/ParsedCreditCardTransaction"},"bankAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bankaccountid"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"uncertainties":{"items":{"$ref":"#/components/schemas/Uncertainty"},"type":"array","title":"Uncertainties","default":[]}},"type":"object","required":["parsed"],"title":"ResolvedCreditCardRow","description":"Parsed CC row enriched with resolution results.\n\n# Reason: Carries the original parsed fields PLUS resolved FKs PLUS\n# per-field uncertainties so the dialog and AI see identical data.\n# The writer accepts this same shape as input (rows[].dict())."},"ResolvedTemporalScope":{"properties":{"kind":{"type":"string","enum":["point","range","all_dates","current_state","undated"],"title":"Kind"},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Enddate"},"selection":{"oneOf":[{"$ref":"#/components/schemas/PointScopeSelection"},{"$ref":"#/components/schemas/RangeScopeSelection"},{"$ref":"#/components/schemas/PeriodScopeSelection"},{"$ref":"#/components/schemas/LastClosedPeriodScopeSelection"},{"$ref":"#/components/schemas/PreviousPeriodScopeSelection"},{"$ref":"#/components/schemas/AllDatesScopeSelection"},{"$ref":"#/components/schemas/CurrentStateScopeSelection"},{"$ref":"#/components/schemas/UndatedScopeSelection"}],"title":"Selection","discriminator":{"propertyName":"kind","mapping":{"all_dates":"#/components/schemas/AllDatesScopeSelection","current_state":"#/components/schemas/CurrentStateScopeSelection","last_closed_period":"#/components/schemas/LastClosedPeriodScopeSelection","period":"#/components/schemas/PeriodScopeSelection","point":"#/components/schemas/PointScopeSelection","previous_period":"#/components/schemas/PreviousPeriodScopeSelection","range":"#/components/schemas/RangeScopeSelection","undated":"#/components/schemas/UndatedScopeSelection"}}},"controlId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Controlid"},"relative":{"type":"boolean","title":"Relative"},"dependsOn":{"items":{"type":"string"},"type":"array","title":"Dependson"},"label":{"type":"string","title":"Label"}},"additionalProperties":false,"type":"object","required":["kind","startDate","endDate","selection","controlId","relative","dependsOn","label"],"title":"ResolvedTemporalScope"},"RestoreResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"snapshotId":{"type":"string","title":"Snapshotid"},"tablesRestored":{"type":"integer","title":"Tablesrestored","default":0},"rowsRestored":{"type":"integer","title":"Rowsrestored","default":0},"elapsedMs":{"type":"integer","title":"Elapsedms","default":0}},"type":"object","required":["success","message","snapshotId"],"title":"RestoreResponse"},"RestoreRuleRequest":{"properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0.0,"title":"Expectedrevision"},"acknowledgedExceptionTransactionIds":{"items":{"type":"string"},"type":"array","title":"Acknowledgedexceptiontransactionids"}},"type":"object","required":["expectedRevision"],"title":"RestoreRuleRequest"},"ResyncTypesRequest":{"properties":{"types":{"items":{"type":"string"},"type":"array","title":"Types"}},"type":"object","required":["types"],"title":"ResyncTypesRequest","description":"Request body for targeted re-sync of specific QBO transaction types."},"ResyncTypesResponse":{"properties":{"synced":{"type":"integer","title":"Synced","default":0},"failed":{"type":"integer","title":"Failed","default":0},"failedTypes":{"items":{"type":"string"},"type":"array","title":"Failedtypes","default":[]},"success":{"type":"boolean","title":"Success","default":true},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"ResyncTypesResponse","description":"Response for targeted re-sync."},"RetractSendEvidenceRequest":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"RetractSendEvidenceRequest","description":"Request body for retracting send evidence that did not prove a send."},"RevenueRecognitionPeriod":{"properties":{"period":{"type":"string","title":"Period"},"periodLabel":{"type":"string","title":"Periodlabel"},"periodEndDate":{"type":"string","title":"Periodenddate"},"beginningBalance":{"type":"number","title":"Beginningbalance"},"endingBalance":{"type":"number","title":"Endingbalance"},"fromUnbilledRevenue":{"type":"number","title":"Fromunbilledrevenue"},"fromDeferredRevenue":{"type":"number","title":"Fromdeferredrevenue"},"netChange":{"type":"number","title":"Netchange"},"subscriptionCount":{"type":"integer","title":"Subscriptioncount"}},"type":"object","required":["period","periodLabel","periodEndDate","beginningBalance","endingBalance","fromUnbilledRevenue","fromDeferredRevenue","netChange","subscriptionCount"],"title":"RevenueRecognitionPeriod","description":"A single period in the revenue recognition rollforward."},"RevenueRecognitionPeriodDetailResponse":{"properties":{"period":{"type":"string","title":"Period"},"periodLabel":{"type":"string","title":"Periodlabel"},"beginningBalance":{"type":"number","title":"Beginningbalance"},"endingBalance":{"type":"number","title":"Endingbalance"},"subscriptions":{"items":{"$ref":"#/components/schemas/RevenueRecognitionSubscriptionDetail"},"type":"array","title":"Subscriptions"},"totalFromUnbilled":{"type":"number","title":"Totalfromunbilled"},"totalFromDeferred":{"type":"number","title":"Totalfromdeferred"},"totalNetChange":{"type":"number","title":"Totalnetchange"},"totalActualRevenue":{"type":"number","title":"Totalactualrevenue"},"hasVariances":{"type":"boolean","title":"Hasvariances"}},"type":"object","required":["period","periodLabel","beginningBalance","endingBalance","subscriptions","totalFromUnbilled","totalFromDeferred","totalNetChange","totalActualRevenue","hasVariances"],"title":"RevenueRecognitionPeriodDetailResponse","description":"Detailed revenue recognition for a specific period."},"RevenueRecognitionRollforwardResponse":{"properties":{"periodSummaries":{"items":{"$ref":"#/components/schemas/RevenueRecognitionPeriod"},"type":"array","title":"Periodsummaries"},"totalRecognized":{"type":"number","title":"Totalrecognized"},"totalFromUnbilled":{"type":"number","title":"Totalfromunbilled"},"totalFromDeferred":{"type":"number","title":"Totalfromdeferred"}},"type":"object","required":["periodSummaries","totalRecognized","totalFromUnbilled","totalFromDeferred"],"title":"RevenueRecognitionRollforwardResponse","description":"Multi-period revenue recognition rollforward."},"RevenueRecognitionSubscriptionDetail":{"properties":{"subscriptionId":{"type":"string","title":"Subscriptionid"},"customerName":{"type":"string","title":"Customername"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"fromUnbilledRevenue":{"type":"number","title":"Fromunbilledrevenue"},"fromDeferredRevenue":{"type":"number","title":"Fromdeferredrevenue"},"netChange":{"type":"number","title":"Netchange"},"actualRevenueRecognized":{"type":"number","title":"Actualrevenuerecognized"},"hasVariance":{"type":"boolean","title":"Hasvariance"}},"type":"object","required":["subscriptionId","customerName","fromUnbilledRevenue","fromDeferredRevenue","netChange","actualRevenueRecognized","hasVariance"],"title":"RevenueRecognitionSubscriptionDetail","description":"Per-subscription detail for revenue recognition period."},"RevenueSegmentAccountMappingCreate":{"properties":{"revenueSegment":{"type":"string","title":"Revenuesegment"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"unbilledAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledaccountid"},"deferredAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deferredaccountid"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"commissionCogsAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commissioncogsaccountid"}},"type":"object","required":["revenueSegment"],"title":"RevenueSegmentAccountMappingCreate","description":"Create/upsert request for a revenue segment GL account mapping."},"RevenueSegmentAccountMappingResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"revenueSegment":{"type":"string","title":"Revenuesegment"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"aliasOf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aliasof"},"canonicalSegmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonicalsegmentid"},"canonicalRevenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonicalrevenuesegment"},"canonicalDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonicaldisplayname"},"isAlias":{"type":"boolean","title":"Isalias","default":false},"unbilledAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledaccountid"},"deferredAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deferredaccountid"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"commissionCogsAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commissioncogsaccountid"},"accountMappingId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountmappingid"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","revenueSegment"],"title":"RevenueSegmentAccountMappingResponse","description":"Revenue segment to GL account mapping response."},"RevenueSegmentAccountMappingUpdate":{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"unbilledAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledaccountid"},"deferredAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deferredaccountid"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"commissionCogsAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commissioncogsaccountid"}},"type":"object","title":"RevenueSegmentAccountMappingUpdate","description":"Update request for a revenue segment GL account mapping."},"RevenueSegmentAliasClearResponse":{"properties":{"revenueSegment":{"type":"string","title":"Revenuesegment"},"removed":{"type":"boolean","title":"Removed"}},"type":"object","required":["revenueSegment","removed"],"title":"RevenueSegmentAliasClearResponse","description":"Revenue segment alias clear response."},"RevenueSegmentAliasCreate":{"properties":{"aliasRevenueSegment":{"type":"string","title":"Aliasrevenuesegment"},"canonicalRevenueSegment":{"type":"string","title":"Canonicalrevenuesegment"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"}},"type":"object","required":["aliasRevenueSegment","canonicalRevenueSegment"],"title":"RevenueSegmentAliasCreate","description":"Create/update request for making one segment key alias another."},"RevenueSegmentBulkMappingRequest":{"properties":{"mappings":{"items":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingCreate"},"type":"array","title":"Mappings"}},"type":"object","required":["mappings"],"title":"RevenueSegmentBulkMappingRequest","description":"Bulk revenue segment account mapping request."},"RevenueSegmentMappingListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RevenueSegmentAccountMappingResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"RevenueSegmentMappingListResponse","description":"Revenue segment account mappings list response."},"RevertBatchResponse":{"properties":{"reverted":{"type":"integer","title":"Reverted"},"failed":{"type":"integer","title":"Failed"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"status":{"type":"string","title":"Status"}},"type":"object","required":["reverted","failed","status"],"title":"RevertBatchResponse","description":"Response after reverting a posting batch."},"RevertUnifiedJEResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"reverted":{"type":"integer","title":"Reverted","default":0},"failed":{"type":"integer","title":"Failed","default":0},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"}},"type":"object","required":["success"],"title":"RevertUnifiedJEResponse","description":"Response from reverting a unified JE posting."},"ReviseRuleRequest":{"properties":{"ruleName":{"type":"string","title":"Rulename"},"description":{"type":"string","title":"Description"},"counterpartyId":{"type":"string","title":"Counterpartyid"},"counterpartyType":{"type":"string","title":"Counterpartytype"},"categoryAccountId":{"type":"string","title":"Categoryaccountid"},"gateConditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Gateconditions"},"priority":{"type":"integer","title":"Priority","default":100},"currentRuleId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currentruleid"},"expectedRevision":{"type":"integer","title":"Expectedrevision"},"acknowledgedExceptionTransactionIds":{"items":{"type":"string"},"type":"array","title":"Acknowledgedexceptiontransactionids"}},"type":"object","required":["ruleName","description","counterpartyId","counterpartyType","categoryAccountId","expectedRevision"],"title":"ReviseRuleRequest"},"RollforwardPeriod":{"properties":{"period":{"type":"string","title":"Period"},"periodLabel":{"type":"string","title":"Periodlabel"},"beginningBalance":{"type":"number","title":"Beginningbalance"},"additions":{"type":"number","title":"Additions"},"recognition":{"type":"number","title":"Recognition"},"endingBalance":{"type":"number","title":"Endingbalance"}},"type":"object","required":["period","periodLabel","beginningBalance","additions","recognition","endingBalance"],"title":"RollforwardPeriod","description":"A single period in the rollforward."},"RollforwardSummaryResponse":{"properties":{"accountType":{"type":"string","title":"Accounttype"},"periods":{"items":{"$ref":"#/components/schemas/RollforwardPeriod"},"type":"array","title":"Periods"},"totalBeginning":{"type":"number","title":"Totalbeginning"},"totalAdditions":{"type":"number","title":"Totaladditions"},"totalRecognition":{"type":"number","title":"Totalrecognition"},"totalEnding":{"type":"number","title":"Totalending"}},"type":"object","required":["accountType","periods","totalBeginning","totalAdditions","totalRecognition","totalEnding"],"title":"RollforwardSummaryResponse","description":"Summary rollforward for multiple periods."},"RowProgramReference":{"properties":{"row_ref":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$","title":"Row Ref","description":"Name of an earlier step or the declared runtime context."},"path":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]*(?:\\.[a-zA-Z_][a-zA-Z0-9_]*)*$"},{"type":"null"}],"title":"Path","description":"Optional dotted field path within the referenced value."}},"additionalProperties":false,"type":"object","required":["row_ref"],"title":"RowProgramReference","description":"A structured reference to one prior row-program output."},"RuleDefinitionRequest":{"properties":{"ruleName":{"type":"string","title":"Rulename"},"description":{"type":"string","title":"Description"},"counterpartyId":{"type":"string","title":"Counterpartyid"},"counterpartyType":{"type":"string","title":"Counterpartytype"},"categoryAccountId":{"type":"string","title":"Categoryaccountid"},"gateConditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Gateconditions"},"priority":{"type":"integer","title":"Priority","default":100},"currentRuleId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currentruleid"}},"type":"object","required":["ruleName","description","counterpartyId","counterpartyType","categoryAccountId"],"title":"RuleDefinitionRequest","description":"Proposed rule definition used by preview and revision approval."},"RuleExceptionRequest":{"properties":{"ruleId":{"type":"string","format":"uuid","title":"Ruleid"},"ruleRevision":{"type":"integer","exclusiveMinimum":0.0,"title":"Rulerevision"}},"additionalProperties":false,"type":"object","required":["ruleId","ruleRevision"],"title":"RuleExceptionRequest"},"SaleAmountMatchContext":{"properties":{"amountBasis":{"type":"string","enum":["gross","refund"],"title":"Amountbasis"},"matchedAmount":{"type":"number","title":"Matchedamount"}},"type":"object","required":["amountBasis","matchedAmount"],"title":"SaleAmountMatchContext","description":"Non-headline Sale amount that caused a free-text numeric match."},"SaleDetailRecord":{"properties":{"sale":{"$ref":"#/components/schemas/SaleSummaryRecord"},"salePayload":{"additionalProperties":true,"type":"object","title":"Salepayload"},"recognizedSalePayload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recognizedsalepayload"},"tenders":{"items":{"$ref":"#/components/schemas/SaleTenderRecord"},"type":"array","title":"Tenders"},"refunds":{"items":{"$ref":"#/components/schemas/SaleRefundRecord"},"type":"array","title":"Refunds"}},"type":"object","required":["sale","salePayload","tenders","refunds"],"title":"SaleDetailRecord"},"SaleLifecycleContext":{"properties":{"sourceState":{"type":"string","title":"Sourcestate"},"recognitionStatus":{"type":"string","title":"Recognitionstatus"},"accountingRevisionStatus":{"type":"string","title":"Accountingrevisionstatus"},"accountingAttentionRequired":{"type":"boolean","title":"Accountingattentionrequired"},"holdReasons":{"items":{"type":"string"},"type":"array","title":"Holdreasons"}},"type":"object","required":["sourceState","recognitionStatus","accountingRevisionStatus","accountingAttentionRequired"],"title":"SaleLifecycleContext","description":"Canonical Sale lifecycle fields that do not collapse into one status."},"SaleListRecord":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SaleSummaryRecord"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"recognizedCount":{"type":"integer","title":"Recognizedcount"},"needsReviewCount":{"type":"integer","title":"Needsreviewcount"},"readyCount":{"type":"integer","title":"Readycount","default":0},"grossAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Grossamount"},"refundAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Refundamount"},"initialFees":{"$ref":"#/components/schemas/InitialFeeTotals"}},"type":"object","required":["items","total","recognizedCount","needsReviewCount","grossAmount","refundAmount"],"title":"SaleListRecord"},"SaleRefundRecord":{"properties":{"id":{"type":"string","title":"Id"},"externalId":{"type":"string","title":"Externalid"},"refundDate":{"type":"string","format":"date","title":"Refunddate"},"sourceStatus":{"type":"string","title":"Sourcestatus"},"recognitionStatus":{"type":"string","title":"Recognitionstatus"},"accountingRevisionStatus":{"type":"string","title":"Accountingrevisionstatus"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"tipAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tipamount"},"feeRefundAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Feerefundamount"},"currency":{"type":"string","title":"Currency"},"holdReasons":{"items":{"type":"string"},"type":"array","title":"Holdreasons"},"costReadiness":{"$ref":"#/components/schemas/RefundCostReadiness"}},"type":"object","required":["id","externalId","refundDate","sourceStatus","recognitionStatus","accountingRevisionStatus","amount","tipAmount","feeRefundAmount","currency"],"title":"SaleRefundRecord"},"SaleRevenueLineRecord":{"properties":{"revenueSegment":{"type":"string","title":"Revenuesegment"},"description":{"type":"string","title":"Description"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"}},"type":"object","required":["revenueSegment","description","amount"],"title":"SaleRevenueLineRecord","description":"One provider-normalized item/category contributing to Sale proceeds."},"SaleSummaryRecord":{"properties":{"id":{"type":"string","title":"Id"},"source":{"type":"string","title":"Source"},"externalId":{"type":"string","title":"Externalid"},"sourceVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sourceversion"},"locationExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locationexternalid"},"businessDate":{"type":"string","format":"date","title":"Businessdate"},"accountingDate":{"type":"string","format":"date","title":"Accountingdate"},"currency":{"type":"string","title":"Currency"},"sourceState":{"type":"string","title":"Sourcestate"},"recognitionStatus":{"type":"string","title":"Recognitionstatus"},"accountingRevisionStatus":{"type":"string","title":"Accountingrevisionstatus"},"accountingAttentionRequired":{"type":"boolean","title":"Accountingattentionrequired"},"holdReasons":{"items":{"type":"string"},"type":"array","title":"Holdreasons"},"grossAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Grossamount"},"refundAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Refundamount"},"netAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Netamount"},"revenueLines":{"items":{"$ref":"#/components/schemas/SaleRevenueLineRecord"},"type":"array","title":"Revenuelines"},"discountAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discountamount","default":"0"},"taxAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Taxamount","default":"0"},"tipAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tipamount","default":"0"},"tenderCount":{"type":"integer","title":"Tendercount"},"tenderTotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tendertotal"},"tenderMethods":{"items":{"type":"string"},"type":"array","title":"Tendermethods"},"feeTotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Feetotal"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"initialFeePendingCount":{"type":"integer","title":"Initialfeependingcount","default":0},"initialFeeReviewCount":{"type":"integer","title":"Initialfeereviewcount","default":0},"initialFeeKnownZeroCount":{"type":"integer","title":"Initialfeeknownzerocount","default":0},"initialFeeNotApplicableCount":{"type":"integer","title":"Initialfeenotapplicablecount","default":0},"initialFeeRecordedAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Initialfeerecordedamount","default":"0"}},"type":"object","required":["id","source","externalId","sourceVersion","businessDate","accountingDate","currency","sourceState","recognitionStatus","accountingRevisionStatus","accountingAttentionRequired","grossAmount","refundAmount","netAmount","tenderCount","tenderTotal","feeTotal","updatedAt"],"title":"SaleSummaryRecord"},"SaleTenderRecord":{"properties":{"id":{"type":"string","title":"Id"},"sourceTenderId":{"type":"string","title":"Sourcetenderid"},"externalPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalpaymentid"},"tenderType":{"type":"string","title":"Tendertype"},"supportStatus":{"type":"string","title":"Supportstatus"},"unsupportedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unsupportedreason"},"sourceStatus":{"type":"string","title":"Sourcestatus"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"tipAmount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tipamount"},"feeAmount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Feeamount"},"currency":{"type":"string","title":"Currency"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"sourceEffectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sourceeffectiveat"},"destinationKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destinationkind"},"destinationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destinationaccountid"},"destinationAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destinationaccountname"},"cashBasisStatus":{"type":"string","title":"Cashbasisstatus"},"cashFlowClassification":{"type":"string","title":"Cashflowclassification"},"payoutEligible":{"type":"boolean","title":"Payouteligible"},"initialFee":{"anyOf":[{"$ref":"#/components/schemas/InitialFeeReadiness"},{"type":"null"}]}},"type":"object","required":["id","sourceTenderId","tenderType","supportStatus","sourceStatus","tipAmount","currency","cashBasisStatus","cashFlowClassification","payoutEligible"],"title":"SaleTenderRecord"},"ScenarioCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"sourceScenarioId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcescenarioid"}},"type":"object","required":["name"],"title":"ScenarioCreateRequest"},"ScenarioMutationResponse":{"properties":{"scenarioId":{"type":"string","title":"Scenarioid"},"latestRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latestrunid"},"state":{"type":"string","title":"State","default":"ready"}},"type":"object","required":["scenarioId","latestRunId"],"title":"ScenarioMutationResponse"},"ScenarioUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"ScenarioUpdateRequest"},"ScheduleActivityTabRelevance":{"properties":{"revRec":{"$ref":"#/components/schemas/NavigationSurfaceState"},"deferredRevenue":{"$ref":"#/components/schemas/NavigationSurfaceState"},"unbilledRevenue":{"$ref":"#/components/schemas/NavigationSurfaceState"},"prepaidCommissions":{"$ref":"#/components/schemas/NavigationSurfaceState"},"prepaidExpenses":{"$ref":"#/components/schemas/NavigationSurfaceState"},"accruals":{"$ref":"#/components/schemas/NavigationSurfaceState"},"fixedAssets":{"$ref":"#/components/schemas/NavigationSurfaceState"},"intangible":{"$ref":"#/components/schemas/NavigationSurfaceState"},"domainNames":{"$ref":"#/components/schemas/NavigationSurfaceState"},"leaseLiability":{"$ref":"#/components/schemas/NavigationSurfaceState"},"rouAsset":{"$ref":"#/components/schemas/NavigationSurfaceState"},"loans":{"$ref":"#/components/schemas/NavigationSurfaceState"},"capitalizedSoftware":{"$ref":"#/components/schemas/NavigationSurfaceState"}},"type":"object","required":["revRec","deferredRevenue","unbilledRevenue","prepaidCommissions","prepaidExpenses","accruals","fixedAssets","intangible","domainNames","leaseLiability","rouAsset","loans","capitalizedSoftware"],"title":"ScheduleActivityTabRelevance","description":"Schedules activity tabs keyed by the frontend route slugs."},"ScheduleCreate":{"properties":{"scheduleType":{"type":"string","title":"Scheduletype"},"title":{"type":"string","title":"Title"},"totalAmount":{"type":"number","title":"Totalamount"},"salvageValue":{"type":"number","title":"Salvagevalue","default":0.0},"startDate":{"type":"string","title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"usefulLifeMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usefullifemonths"},"recognitionMethod":{"type":"string","title":"Recognitionmethod","default":"straight_line"},"debitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountid"},"debitAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountname"},"creditAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountid"},"creditAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sourceTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetransactionid"},"assetClassId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assetclassid"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"capitalizationDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capitalizationdate"},"capitalizeAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Capitalizeamount"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"importFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importfilename"},"importBatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importbatchid"},"source":{"type":"string","title":"Source","default":"ui"},"loanTerms":{"anyOf":[{"$ref":"#/components/schemas/LoanTermsCreate"},{"type":"null"}]},"taxDepreciationTerms":{"anyOf":[{"$ref":"#/components/schemas/TaxDepreciationTermsCreate"},{"type":"null"}]}},"type":"object","required":["scheduleType","title","totalAmount","startDate"],"title":"ScheduleCreate","description":"Create schedule request."},"ScheduleEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"subscriptionId":{"type":"string","title":"Subscriptionid"},"date":{"type":"string","title":"Date"},"eventType":{"type":"string","title":"Eventtype"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"periodLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Periodlabel"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"eventDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eventdescription"},"eventAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eventamount"},"eventReferenceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eventreferenceid"},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoiceid"},"invoiceReferenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicereferencenumber"},"paymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentid"},"revenueRecognizedChange":{"type":"number","title":"Revenuerecognizedchange","default":0},"unbilledRevenueChange":{"type":"number","title":"Unbilledrevenuechange","default":0},"deferredRevenueChange":{"type":"number","title":"Deferredrevenuechange","default":0},"arChange":{"type":"number","title":"Archange","default":0},"cumulativeRevenueRecognized":{"type":"number","title":"Cumulativerevenuerecognized","default":0},"unbilledRevenueBalance":{"type":"number","title":"Unbilledrevenuebalance","default":0},"deferredRevenueBalance":{"type":"number","title":"Deferredrevenuebalance","default":0},"arBalance":{"type":"number","title":"Arbalance","default":0},"totalInvoicedToDate":{"type":"number","title":"Totalinvoicedtodate","default":0},"modeAfter":{"type":"string","title":"Modeafter"},"explanationTrace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Explanationtrace"}},"type":"object","required":["id","subscriptionId","date","eventType","modeAfter"],"title":"ScheduleEntryResponse","description":"A schedule entry - either a recognition period or an event row.\n\nReason: Per spec, the schedule interleaves monthly recognition periods\nwith event rows (invoices, payments). This gives a chronological view\nof how balances evolve over the subscription lifetime.\n\nReason: Field names match frontend SubscriptionScheduleEntry type for\ndirect API response compatibility (no transformation layer needed)."},"ScheduleLineResponse":{"properties":{"id":{"type":"string","title":"Id"},"scheduleId":{"type":"string","title":"Scheduleid"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"amount":{"type":"number","title":"Amount"},"cumulativeAmount":{"type":"number","title":"Cumulativeamount"},"remainingBalance":{"type":"number","title":"Remainingbalance"},"lineStatus":{"type":"string","title":"Linestatus"},"postedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedat"}},"type":"object","required":["id","scheduleId","periodStart","periodEnd","amount","cumulativeAmount","remainingBalance","lineStatus"],"title":"ScheduleLineResponse","description":"A single schedule line (recognition period)."},"ScheduleListResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"scheduleType":{"type":"string","title":"Scheduletype"},"title":{"type":"string","title":"Title"},"status":{"type":"string","title":"Status"},"totalAmount":{"type":"number","title":"Totalamount"},"remainingAmount":{"type":"number","title":"Remainingamount"},"recognizedThrough":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recognizedthrough"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"usefulLifeMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usefullifemonths"},"recognitionMethod":{"type":"string","title":"Recognitionmethod","default":"straight_line"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"debitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountid"},"debitAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountname"},"creditAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountid"},"creditAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountname"},"capitalizationDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capitalizationdate"},"createdAt":{"type":"string","title":"Createdat"}},"type":"object","required":["id","companyId","scheduleType","title","status","totalAmount","remainingAmount","startDate","createdAt"],"title":"ScheduleListResponse","description":"Schedule list item (without lines)."},"SchedulePreviewRequest":{"properties":{"trigger":{"additionalProperties":true,"type":"object","title":"Trigger"}},"type":"object","required":["trigger"],"title":"SchedulePreviewRequest"},"ScheduleProposal":{"properties":{"schedule_type":{"type":"string","enum":["prepaid","fixed_asset","intangible"],"title":"Schedule Type","description":"Type of schedule to create"},"title":{"type":"string","title":"Title","description":"Suggested title for the schedule"},"total_amount":{"type":"number","title":"Total Amount","description":"Total amount from invoice"},"start_date":{"type":"string","title":"Start Date","description":"Schedule start date (YYYY-MM-DD)"},"end_date":{"type":"string","title":"End Date","description":"Schedule end date (YYYY-MM-DD)"},"recognition_method":{"type":"string","enum":["straight_line","daily_straight_line"],"title":"Recognition Method","description":"How to recognize the expense","default":"daily_straight_line"},"suggested_debit_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Debit Account Id","description":"Suggested debit account ID"},"suggested_debit_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Debit Account Name","description":"Suggested debit account name"},"suggested_credit_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Credit Account Id","description":"Suggested credit account ID"},"suggested_credit_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Credit Account Name","description":"Suggested credit account name"},"source_document":{"type":"string","title":"Source Document","description":"Original filename"},"vendor_name":{"type":"string","title":"Vendor Name","description":"Vendor name from invoice"},"reference_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Number","description":"Invoice/policy number"},"policy_rationale":{"type":"string","title":"Policy Rationale","description":"Explanation of why this schedule type was chosen based on company policies"},"extraction_confidence":{"type":"string","enum":["high","medium","low"],"title":"Extraction Confidence","description":"Confidence in the extracted data"},"key_excerpts":{"items":{"type":"string"},"type":"array","title":"Key Excerpts","description":"Key text excerpts supporting the extraction"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Warnings about the proposal for user review"}},"type":"object","required":["schedule_type","title","total_amount","start_date","end_date","source_document","vendor_name","policy_rationale","extraction_confidence"],"title":"ScheduleProposal","description":"Proposed schedule based on parsed invoice data and company policies.\n\nReason: This is the pre-filled schedule that the user reviews before creation."},"ScheduleResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"scheduleType":{"type":"string","title":"Scheduletype"},"title":{"type":"string","title":"Title"},"status":{"type":"string","title":"Status"},"totalAmount":{"type":"number","title":"Totalamount"},"salvageValue":{"type":"number","title":"Salvagevalue","default":0},"remainingAmount":{"type":"number","title":"Remainingamount"},"recognizedThrough":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recognizedthrough"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"usefulLifeMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usefullifemonths"},"recognitionMethod":{"type":"string","title":"Recognitionmethod"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"debitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountid"},"debitAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountname"},"creditAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountid"},"creditAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sourceTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetransactionid"},"capitalizationDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capitalizationdate"},"capitalizeAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Capitalizeamount"},"originalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originalaccountid"},"originalAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originalaccountname"},"additionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additionstatus"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"},"isDeletable":{"type":"boolean","title":"Isdeletable","default":true},"postedJournalEntryCount":{"type":"integer","title":"Postedjournalentrycount","default":0},"lines":{"anyOf":[{"items":{"$ref":"#/components/schemas/ScheduleLineResponse"},"type":"array"},{"type":"null"}],"title":"Lines"},"loanTerms":{"anyOf":[{"$ref":"#/components/schemas/LoanTermsResponse"},{"type":"null"}]},"loanLines":{"anyOf":[{"items":{"$ref":"#/components/schemas/LoanLineResponse"},"type":"array"},{"type":"null"}],"title":"Loanlines"},"loanActualPayments":{"anyOf":[{"items":{"$ref":"#/components/schemas/LoanActualPaymentResponse"},"type":"array"},{"type":"null"}],"title":"Loanactualpayments"},"loanPrincipalAdjustments":{"anyOf":[{"items":{"$ref":"#/components/schemas/LoanPrincipalAdjustmentResponse"},"type":"array"},{"type":"null"}],"title":"Loanprincipaladjustments"},"loanForecastLines":{"anyOf":[{"items":{"$ref":"#/components/schemas/LoanLineResponse"},"type":"array"},{"type":"null"}],"title":"Loanforecastlines"},"loanProjectionLines":{"anyOf":[{"items":{"$ref":"#/components/schemas/LoanProjectionLineResponse"},"type":"array"},{"type":"null"}],"title":"Loanprojectionlines"},"taxDepreciationTerms":{"anyOf":[{"$ref":"#/components/schemas/TaxDepreciationTermsResponse"},{"type":"null"}]},"taxDepreciationYears":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxDepreciationYearResponse"},"type":"array"},{"type":"null"}],"title":"Taxdepreciationyears"}},"type":"object","required":["id","companyId","scheduleType","title","status","totalAmount","remainingAmount","startDate","recognitionMethod","createdAt","updatedAt"],"title":"ScheduleResponse","description":"Schedule response with camelCase aliases."},"ScheduleTabRelevance":{"properties":{"subscriptions":{"$ref":"#/components/schemas/NavigationSurfaceState"},"commissions":{"$ref":"#/components/schemas/NavigationSurfaceState"},"prepaidExpenses":{"$ref":"#/components/schemas/NavigationSurfaceState"},"accruals":{"$ref":"#/components/schemas/NavigationSurfaceState"},"fixedAssets":{"$ref":"#/components/schemas/NavigationSurfaceState"},"intangible":{"$ref":"#/components/schemas/NavigationSurfaceState"},"domainNames":{"$ref":"#/components/schemas/NavigationSurfaceState"},"leases":{"$ref":"#/components/schemas/NavigationSurfaceState"},"loans":{"$ref":"#/components/schemas/NavigationSurfaceState"},"capitalizedSoftware":{"$ref":"#/components/schemas/NavigationSurfaceState"}},"type":"object","required":["subscriptions","commissions","prepaidExpenses","accruals","fixedAssets","intangible","domainNames","leases","loans","capitalizedSoftware"],"title":"ScheduleTabRelevance","description":"Schedules page sub-tabs keyed by the frontend route slugs."},"ScheduleUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"totalAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalamount"},"salvageValue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Salvagevalue"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"usefulLifeMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usefullifemonths"},"recognitionMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recognitionmethod"},"debitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountid"},"debitAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountname"},"creditAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountid"},"creditAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sourceTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetransactionid"}},"type":"object","title":"ScheduleUpdate","description":"Update schedule request."},"ScopeBoundaryDateAnchor":{"properties":{"kind":{"type":"string","const":"scope_boundary","title":"Kind"},"scope":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","title":"Scope"},"boundary":{"type":"string","enum":["start","end"],"title":"Boundary"}},"additionalProperties":false,"type":"object","required":["kind","scope","boundary"],"title":"ScopeBoundaryDateAnchor"},"ScopeBoundaryDateExpression":{"properties":{"kind":{"type":"string","const":"scope_boundary","title":"Kind"},"scope":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","title":"Scope"},"boundary":{"type":"string","enum":["start","end"],"title":"Boundary"}},"additionalProperties":false,"type":"object","required":["kind","scope","boundary"],"title":"ScopeBoundaryDateExpression"},"SegmentedControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"segmented","title":"Type"},"defaultValue":{"type":"string","title":"Defaultvalue"},"options":{"items":{"$ref":"#/components/schemas/ControlOption"},"type":"array","maxItems":5,"minItems":2,"title":"Options"}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type","defaultValue","options"],"title":"SegmentedControlSpec"},"SelectControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"select","title":"Type"},"defaultValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultvalue"},"options":{"items":{"$ref":"#/components/schemas/ControlOption"},"type":"array","maxItems":50,"title":"Options","description":"Fixed choices listed first, such as an all/blank baseline. Required unless optionsFrom supplies the choices."},"optionsFrom":{"anyOf":[{"$ref":"#/components/schemas/ControlOptionsFrom"},{"type":"null"}],"description":"Derive choices from the current rows of a live dataRef, appended after fixed options. Choices come only from a complete result; a truncated result disables the control instead of listing partial choices. Use for report filters, not table cell edit controls."}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"SelectControlSpec"},"SendAuditEmailChallengeRequest":{"properties":{"state":{"type":"string","maxLength":512,"minLength":32,"title":"State"},"challengeId":{"type":"string","maxLength":128,"minLength":32,"title":"Challengeid"}},"type":"object","required":["state","challengeId"],"title":"SendAuditEmailChallengeRequest"},"SeriesExpr":{"properties":{"op":{"type":"string","const":"series","title":"Op"},"path":{"type":"string","maxLength":200,"minLength":1,"title":"Path","description":"Click-scoped chart-series value. Valid paths are key, label, value, index, or metadata.<key>. Value is the clicked numeric measure; index is the zero-based position in the authored series list. This expression is valid only in a chart interaction setContext assignment. Optional key and metadata paths resolve to null when absent; Porter never infers identity from labels."}},"additionalProperties":false,"type":"object","required":["op","path"],"title":"SeriesExpr"},"SetTransactionsClearedRequest":{"properties":{"transactionIds":{"items":{"type":"string"},"type":"array","title":"Transactionids"},"cleared":{"type":"boolean","title":"Cleared"},"expectedCleared":{"type":"boolean","title":"Expectedcleared"},"evidenceScope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidencescope"},"evidenceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidencedocumentid"}},"type":"object","required":["transactionIds","cleared","expectedCleared"],"title":"SetTransactionsClearedRequest","description":"Request body for an exact cleared-state compare-and-set mutation."},"SetTransactionsClearedResponse":{"properties":{"cleared":{"type":"boolean","title":"Cleared"},"expectedCleared":{"type":"boolean","title":"Expectedcleared"},"count":{"type":"integer","title":"Count"},"transactionIds":{"items":{"type":"string"},"type":"array","title":"Transactionids"},"appliedTransactionIds":{"items":{"type":"string"},"type":"array","title":"Appliedtransactionids"},"noopTransactionIds":{"items":{"type":"string"},"type":"array","title":"Nooptransactionids"},"evidenceScope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidencescope"},"evidenceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidencedocumentid"}},"type":"object","required":["cleared","expectedCleared","count","transactionIds","appliedTransactionIds","noopTransactionIds"],"title":"SetTransactionsClearedResponse","description":"Response for setting cleared state on a list of bank transactions."},"SettingsTabRelevance":{"properties":{"postingHistory":{"$ref":"#/components/schemas/NavigationSurfaceState"}},"type":"object","required":["postingHistory"],"title":"SettingsTabRelevance","description":"Settings tabs whose content can be genuinely empty."},"SkipReconciliationRequest":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"SkipReconciliationRequest","description":"Request body for the no-statement reconciliation skip (POR-1395)."},"SkippedRowDetail":{"properties":{"rowNumber":{"type":"integer","title":"Rownumber"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"reason":{"type":"string","title":"Reason"},"permanentRefusalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permanentrefusalcode"}},"type":"object","required":["rowNumber","reason"],"title":"SkippedRowDetail","description":"Detail about a skipped row during import.\n\nReason: Shared across invoice, bank transaction, and credit card import\nservices to avoid duplicating an identical model definition in three places."},"SlackConnectResponse":{"properties":{"authUrl":{"type":"string","title":"Authurl"},"state":{"type":"string","title":"State"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["authUrl","state","scopes"],"title":"SlackConnectResponse"},"SlackStatusResponse":{"properties":{"connectionHistory":{"items":{"$ref":"#/components/schemas/ConnectionHistoryEntry"},"type":"array","title":"Connectionhistory","default":[]},"connected":{"type":"boolean","title":"Connected"},"status":{"type":"string","title":"Status"},"connectAvailable":{"type":"boolean","title":"Connectavailable"},"connectUnavailableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectunavailablereason"},"slackTeamId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slackteamid"},"slackTeamName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slackteamname"},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botuserid"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["connected","status","connectAvailable"],"title":"SlackStatusResponse"},"SliderControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"slider","title":"Type"},"defaultValue":{"type":"number","title":"Defaultvalue","default":0},"min":{"type":"number","title":"Min"},"max":{"type":"number","title":"Max"},"step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Step"}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type","min","max"],"title":"SliderControlSpec"},"SnapshotArtifactMeta":{"properties":{"artifactType":{"type":"string","title":"Artifacttype"},"basis":{"type":"string","title":"Basis"},"headline":{"additionalProperties":{"type":"number"},"type":"object","title":"Headline","default":{}},"numericAvailable":{"type":"boolean","title":"Numericavailable","default":false},"cashSettlementContractVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashsettlementcontractversion"}},"type":"object","required":["artifactType","basis"],"title":"SnapshotArtifactMeta"},"SnapshotCreate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","title":"SnapshotCreate","description":"Request body for creating a snapshot."},"SnapshotListResponse":{"properties":{"snapshots":{"items":{"$ref":"#/components/schemas/SnapshotResponse"},"type":"array","title":"Snapshots"}},"type":"object","required":["snapshots"],"title":"SnapshotListResponse"},"SnapshotResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby"},"tableCount":{"type":"integer","title":"Tablecount","default":0},"rowCount":{"type":"integer","title":"Rowcount","default":0},"sizeBytes":{"type":"integer","title":"Sizebytes","default":0}},"type":"object","required":["id","companyId"],"title":"SnapshotResponse","description":"Snapshot metadata (excludes data blob)."},"SnapshotStatementResponse":{"properties":{"artifactType":{"type":"string","title":"Artifacttype"},"basis":{"type":"string","title":"Basis"},"version":{"type":"integer","title":"Version"},"capturedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capturedat"},"periodEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Periodenddate"},"cashSettlementContractVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashsettlementcontractversion"},"statement":{"additionalProperties":true,"type":"object","title":"Statement"}},"type":"object","required":["artifactType","basis","version","statement"],"title":"SnapshotStatementResponse"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder","description":"Valid sort direction values."},"SourcePaymentIntakeItemListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SourcePaymentIntakeItemResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"SourcePaymentIntakeItemListResponse","description":"Paginated source-payment intake list response."},"SourcePaymentIntakeItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"source":{"type":"string","title":"Source"},"sourceFingerprint":{"type":"string","title":"Sourcefingerprint"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"sourceObjectType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceobjecttype"},"sourceObjectId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceobjectid"},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoiceid"},"invoiceReferenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicereferencenumber"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"amount":{"type":"number","title":"Amount"},"applicationAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Applicationamount"},"currency":{"type":"string","title":"Currency","default":"USD"},"sourceDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcedate"},"reasonCode":{"type":"string","title":"Reasoncode"},"status":{"type":"string","title":"Status","default":"excluded"},"attempts":{"type":"integer","title":"Attempts","default":1},"firstSeenAt":{"type":"string","title":"Firstseenat"},"lastSeenAt":{"type":"string","title":"Lastseenat"},"assessmentPayload":{"additionalProperties":true,"type":"object","title":"Assessmentpayload"},"rawData":{"additionalProperties":true,"type":"object","title":"Rawdata"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["id","companyId","source","sourceFingerprint","amount","reasonCode","firstSeenAt","lastSeenAt","createdAt","updatedAt"],"title":"SourcePaymentIntakeItemResponse","description":"One source payment event that did not become canonical customer cash."},"SpendByCompany":{"properties":{"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"},"companyName":{"type":"string","title":"Companyname"},"usd":{"type":"number","title":"Usd"},"inputTokens":{"type":"integer","title":"Inputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"toolCalls":{"type":"integer","title":"Toolcalls"},"compactionItems":{"type":"integer","title":"Compactionitems"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["companyId","companyName","usd","inputTokens","outputTokens","toolCalls","compactionItems","missingEstimatedCostCalls","calls"],"title":"SpendByCompany"},"SpendByConversation":{"properties":{"conversationId":{"type":"string","title":"Conversationid"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"},"companyName":{"type":"string","title":"Companyname"},"usd":{"type":"number","title":"Usd"},"inputTokens":{"type":"integer","title":"Inputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"toolCalls":{"type":"integer","title":"Toolcalls"},"compactionItems":{"type":"integer","title":"Compactionitems"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"latestAt":{"type":"string","title":"Latestat"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["conversationId","companyId","companyName","usd","inputTokens","outputTokens","toolCalls","compactionItems","missingEstimatedCostCalls","latestAt","calls"],"title":"SpendByConversation"},"SpendByDay":{"properties":{"day":{"type":"string","title":"Day"},"usd":{"type":"number","title":"Usd"},"inputTokens":{"type":"integer","title":"Inputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"toolCalls":{"type":"integer","title":"Toolcalls"},"compactionItems":{"type":"integer","title":"Compactionitems"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["day","usd","inputTokens","outputTokens","toolCalls","compactionItems","missingEstimatedCostCalls","calls"],"title":"SpendByDay"},"SpendByModel":{"properties":{"model":{"type":"string","title":"Model"},"usd":{"type":"number","title":"Usd"},"inputTokens":{"type":"integer","title":"Inputtokens"},"cachedInputTokens":{"type":"integer","title":"Cachedinputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["model","usd","inputTokens","cachedInputTokens","outputTokens","missingEstimatedCostCalls","calls"],"title":"SpendByModel"},"SpendByModelTier":{"properties":{"model":{"type":"string","title":"Model"},"serviceTier":{"type":"string","title":"Servicetier"},"usd":{"type":"number","title":"Usd"},"inputTokens":{"type":"integer","title":"Inputtokens"},"cachedInputTokens":{"type":"integer","title":"Cachedinputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["model","serviceTier","usd","inputTokens","cachedInputTokens","outputTokens","missingEstimatedCostCalls","calls"],"title":"SpendByModelTier"},"SpendByServiceTier":{"properties":{"serviceTier":{"type":"string","title":"Servicetier"},"usd":{"type":"number","title":"Usd"},"inputTokens":{"type":"integer","title":"Inputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"toolCalls":{"type":"integer","title":"Toolcalls"},"compactionItems":{"type":"integer","title":"Compactionitems"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["serviceTier","usd","inputTokens","outputTokens","toolCalls","compactionItems","missingEstimatedCostCalls","calls"],"title":"SpendByServiceTier"},"SpendBySource":{"properties":{"source":{"type":"string","title":"Source"},"usd":{"type":"number","title":"Usd"},"inputTokens":{"type":"integer","title":"Inputtokens"},"outputTokens":{"type":"integer","title":"Outputtokens"},"toolCalls":{"type":"integer","title":"Toolcalls"},"compactionItems":{"type":"integer","title":"Compactionitems"},"missingEstimatedCostCalls":{"type":"integer","title":"Missingestimatedcostcalls"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["source","usd","inputTokens","outputTokens","toolCalls","compactionItems","missingEstimatedCostCalls","calls"],"title":"SpendBySource"},"SquareOrderRecheckResponse":{"properties":{"status":{"type":"string","title":"Status"},"providerOrderId":{"type":"string","title":"Providerorderid"},"recognitionStatus":{"type":"string","title":"Recognitionstatus"},"holdReasons":{"items":{"type":"string"},"type":"array","title":"Holdreasons"},"ledgerUpdated":{"type":"boolean","title":"Ledgerupdated"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","providerOrderId","recognitionStatus","holdReasons","ledgerUpdated","message"],"title":"SquareOrderRecheckResponse","description":"Current result of one owner-requested authoritative Square recheck."},"SquareReviewResponse":{"properties":{"sales":{"$ref":"#/components/schemas/SaleListRecord"},"unattachedTenders":{"items":{"$ref":"#/components/schemas/CommerceTenderObservationRecord"},"type":"array","title":"Unattachedtenders"},"settlements":{"items":{"$ref":"#/components/schemas/ProcessorSettlementGroupRecord"},"type":"array","title":"Settlements"},"balanceEvents":{"items":{"$ref":"#/components/schemas/ProcessorBalanceEventRecord"},"type":"array","title":"Balanceevents"}},"type":"object","required":["sales","unattachedTenders","settlements","balanceEvents"],"title":"SquareReviewResponse","description":"Visible, non-additive queues blocking or qualifying Square accounting.\n\nReason: POR-2468 -- this is not a Sales Batch queue. Batches remain leftover\nstorage below HTTP; review lists Sales, unattached Tenders, payouts, and\nbalance events only."},"StaleDocumentsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentListItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"StaleDocumentsResponse"},"StartAuditEmailChallengeRequest":{"properties":{"state":{"type":"string","maxLength":512,"minLength":32,"title":"State"},"challengeId":{"type":"string","maxLength":128,"minLength":32,"title":"Challengeid"},"codeDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Codedigest"}},"type":"object","required":["state","challengeId","codeDigest"],"title":"StartAuditEmailChallengeRequest"},"StatementBalanceRequest":{"properties":{"statementBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Statementbalance"},"statementStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementstartdate"},"statementEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementenddate"}},"type":"object","required":["statementBalance"],"title":"StatementBalanceRequest","description":"Request body for saving a statement balance."},"StatementCloseDayRequest":{"properties":{"statementCloseDay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statementcloseday"}},"type":"object","title":"StatementCloseDayRequest","description":"Request to set the statement close day for a bank/CC account.\n\nReason: POR-316 — credit cards close mid-month. null resets to calendar month end."},"StatementReliabilityAccountModel":{"properties":{"accountName":{"type":"string","title":"Accountname"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["accountName","amount"],"title":"StatementReliabilityAccountModel"},"StatementReliabilityFindingModel":{"properties":{"tier":{"type":"integer","title":"Tier"},"code":{"type":"string","title":"Code"},"severity":{"type":"string","enum":["error","warning"],"title":"Severity"},"title":{"type":"string","title":"Title"},"message":{"type":"string","title":"Message"},"amount":{"type":"number","title":"Amount"},"accountClass":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountclass"},"accounts":{"items":{"$ref":"#/components/schemas/StatementReliabilityAccountModel"},"type":"array","title":"Accounts","default":[]}},"type":"object","required":["tier","code","severity","title","message","amount"],"title":"StatementReliabilityFindingModel"},"StatementReliabilityModel":{"properties":{"status":{"type":"string","enum":["ok","needs_review","unreliable"],"title":"Status"},"findings":{"items":{"$ref":"#/components/schemas/StatementReliabilityFindingModel"},"type":"array","title":"Findings"}},"type":"object","required":["status","findings"],"title":"StatementReliabilityModel"},"StoredAuditAction":{"properties":{"label":{"type":"string","enum":["Do this week","Structural"],"title":"Label"},"title":{"type":"string","maxLength":180,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":240,"minLength":1,"title":"Body"}},"additionalProperties":false,"type":"object","required":["label","title","body"],"title":"StoredAuditAction"},"StoredAuditFinding":{"properties":{"tag":{"type":"string","maxLength":40,"minLength":1,"title":"Tag"},"fact":{"type":"string","maxLength":240,"minLength":1,"title":"Fact"},"consequence":{"type":"string","maxLength":300,"minLength":1,"title":"Consequence"}},"additionalProperties":false,"type":"object","required":["tag","fact","consequence"],"title":"StoredAuditFinding","description":"Backward-compatible shape for reports generated before copy was tightened."},"StructuredOnboardingStepRequest":{"properties":{"step_id":{"type":"string","title":"Step Id"},"values":{"additionalProperties":true,"type":"object","title":"Values","default":{}},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"mark_complete":{"type":"boolean","title":"Mark Complete","default":false},"current_step_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Step Id"}},"type":"object","required":["step_id"],"title":"StructuredOnboardingStepRequest","description":"Save a POR-788 structured onboarding step."},"StuckFeedbackRequest":{"properties":{"message":{"type":"string","title":"Message"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"toolsCalled":{"items":{"type":"string"},"type":"array","title":"Toolscalled","default":[]},"userMessagePreview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usermessagepreview"}},"type":"object","required":["message"],"title":"StuckFeedbackRequest"},"SubExpr-Input":{"properties":{"op":{"type":"string","const":"sub","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"SubExpr"},"SubExpr-Output":{"properties":{"op":{"type":"string","const":"sub","title":"Op"},"args":{"prefixItems":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}}],"type":"array","maxItems":2,"minItems":2,"title":"Args"}},"additionalProperties":false,"type":"object","required":["op","args"],"title":"SubExpr"},"SubscriptionBatchOptions":{"properties":{"createMissingCustomers":{"type":"boolean","title":"Createmissingcustomers","default":true},"skipDuplicates":{"type":"boolean","title":"Skipduplicates","default":true}},"type":"object","title":"SubscriptionBatchOptions","description":"Options for the direct batch endpoint."},"SubscriptionBatchRequest":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"options":{"$ref":"#/components/schemas/SubscriptionBatchOptions","default":{"createMissingCustomers":true,"skipDuplicates":true}},"importFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importfilename"}},"type":"object","required":["rows"],"title":"SubscriptionBatchRequest","description":"Direct batch import request — one shot, no dataset_id."},"SubscriptionCreate":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"type":"string","title":"Customername"},"subscriptionName":{"type":"string","title":"Subscriptionname"},"revenueSegmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegmentid"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"totalContractValue":{"type":"number","title":"Totalcontractvalue"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"commissionRatePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commissionratepct"},"paymentSchedule":{"type":"string","title":"Paymentschedule","default":"monthly"},"paymentStatus":{"type":"string","title":"Paymentstatus","default":"unpaid"},"recognitionMode":{"type":"string","title":"Recognitionmode","default":"unbilled"},"status":{"type":"string","title":"Status","default":"active"},"externalIds":{"items":{"type":"string"},"type":"array","title":"Externalids"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"importFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importfilename"}},"type":"object","required":["customerName","subscriptionName","totalContractValue","startDate","endDate"],"title":"SubscriptionCreate","description":"Create subscription request."},"SubscriptionDetailResponse":{"properties":{"subscription":{"$ref":"#/components/schemas/SubscriptionReadModel"},"schedule":{"items":{"$ref":"#/components/schemas/ScheduleEntryResponse"},"type":"array","title":"Schedule","default":[]},"transactions":{"items":{},"type":"array","title":"Transactions","default":[]},"linkedInvoices":{"items":{"$ref":"#/components/schemas/SubscriptionLinkedInvoice"},"type":"array","title":"Linkedinvoices","default":[]},"linkedPayments":{"items":{"$ref":"#/components/schemas/SubscriptionLinkedPayment"},"type":"array","title":"Linkedpayments","default":[]},"allEntriesPosted":{"type":"boolean","title":"Allentriesposted","default":false},"postedEntryCount":{"type":"integer","title":"Postedentrycount","default":0},"unpostedEntryCount":{"type":"integer","title":"Unpostedentrycount","default":0},"hasOutstandingPostedEntries":{"type":"boolean","title":"Hasoutstandingpostedentries","default":false},"validityStatusDisplay":{"type":"string","title":"Validitystatusdisplay","default":"valid"},"outstandingPostedEntries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Outstandingpostedentries","default":[]}},"type":"object","required":["subscription"],"title":"SubscriptionDetailResponse","description":"Full subscription detail with related data.\n\nReason: Nested structure - frontend flattens in fetch function.\nCleaner separation between subscription data and related arrays.\nMoved from router to repo layer as part of get_detail extraction."},"SubscriptionFileParseResult":{"properties":{"subscriptions":{"items":{"$ref":"#/components/schemas/ParsedSubscription"},"type":"array","title":"Subscriptions"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"totalCount":{"type":"integer","title":"Totalcount"},"validCount":{"type":"integer","title":"Validcount"},"totalContractValue":{"type":"number","title":"Totalcontractvalue"},"monthlyRecurringRevenue":{"type":"number","title":"Monthlyrecurringrevenue"}},"type":"object","required":["subscriptions","errors","warnings","totalCount","validCount","totalContractValue","monthlyRecurringRevenue"],"title":"SubscriptionFileParseResult","description":"Result of parsing a subscription CSV/XLSX file."},"SubscriptionLinkedInvoice":{"properties":{"id":{"type":"string","title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuedate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"type":"number","title":"Amount","default":0},"amountPaid":{"type":"number","title":"Amountpaid","default":0},"amountDue":{"type":"number","title":"Amountdue","default":0},"status":{"type":"string","title":"Status","default":"open"},"qboInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboinvoiceid"}},"type":"object","required":["id"],"title":"SubscriptionLinkedInvoice","description":"Invoice linked to a subscription.\n\nReason: Returned in subscription detail for the Invoices tab.\nMatches frontend SubscriptionLinkedInvoice type.\nMoved from router to repo layer as part of get_detail extraction."},"SubscriptionLinkedPayment":{"properties":{"id":{"type":"string","title":"Id"},"paymentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentdate"},"amount":{"type":"number","title":"Amount","default":0},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"appliedAmount":{"type":"number","title":"Appliedamount","default":0},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoiceid"},"status":{"type":"string","title":"Status","default":"completed"}},"type":"object","required":["id"],"title":"SubscriptionLinkedPayment","description":"Payment linked to a subscription (via invoice).\n\nReason: Returned in subscription detail for the Payments tab.\nPayments are linked to invoices which are linked to subscriptions (event-based).\nMoved from router to repo layer as part of get_detail extraction."},"SubscriptionListResponse":{"properties":{"subscriptions":{"items":{"$ref":"#/components/schemas/SubscriptionReadModel"},"type":"array","title":"Subscriptions"},"stats":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatsResponse"},{"type":"null"}]},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["subscriptions","total","offset","limit"],"title":"SubscriptionListResponse","description":"Subscription list response with pagination."},"SubscriptionMatch":{"properties":{"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"subscriptionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionname"},"confidence":{"type":"number","title":"Confidence","default":0.0},"matchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchtype"}},"type":"object","title":"SubscriptionMatch","description":"Subscription match suggestion during import preview.\n\nReason: Shows users which invoices will auto-link to subscriptions after import."},"SubscriptionModificationResponse":{"properties":{"id":{"type":"string","title":"Id"},"fieldName":{"type":"string","title":"Fieldname"},"previousValue":{"anyOf":[{},{"type":"null"}],"title":"Previousvalue"},"newValue":{"anyOf":[{},{"type":"null"}],"title":"Newvalue"},"eventType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eventtype"},"effectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectivedate"},"amountChange":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amountchange"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"modifiedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modifiedbyemail"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"createdAt":{"type":"string","title":"Createdat"}},"type":"object","required":["id","fieldName","createdAt"],"title":"SubscriptionModificationResponse","description":"A single contract-change event for a subscription.\n\nReason: Extracted from typed modifications first, with entity_change_log as\nhistorical fallback. The metadata JSONB field stores event_type,\neffective_date, amount_change, reason."},"SubscriptionModifyRequest":{"properties":{"amountChange":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amountchange","description":"Change in contract amount (negative for reductions)"},"newEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newenddate","description":"New contract end date (YYYY-MM-DD)"},"eventType":{"type":"string","enum":["upsell","contraction","early_termination","extension"],"title":"Eventtype","description":"Type of contract change: upsell, contraction, early_termination, extension"},"effectiveDate":{"type":"string","title":"Effectivedate","description":"When this contract change takes effect (YYYY-MM-DD)"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Optional reason for the contract change"}},"type":"object","required":["eventType","effectiveDate"],"title":"SubscriptionModifyRequest","description":"Request to modify a subscription contract.\n\nReason: Captures contract changes with event type tracking for row-version\naudit and revenue recognition impact. Per Notion spec, changes can affect:\n- Contract amount (positive=upsell, negative=contraction)\n- End date (earlier=early_termination, later=extension)"},"SubscriptionReadModel":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"type":"string","title":"Customername"},"subscriptionName":{"type":"string","title":"Subscriptionname"},"revenueSegmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegmentid"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"contractAmount":{"type":"number","title":"Contractamount"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"originalContractAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Originalcontractamount"},"originalStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originalstartdate"},"originalEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originalenddate"},"commissionRatePct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commissionratepct"},"monthlyAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthlyamount"},"annualAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annualamount"},"contractTermMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contracttermmonths"},"paymentSchedule":{"type":"string","title":"Paymentschedule"},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentstatus"},"invoiceSent":{"type":"boolean","title":"Invoicesent","default":false},"invoiceSentDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoicesentdate"},"status":{"type":"string","title":"Status"},"validityStatus":{"type":"string","title":"Validitystatus","default":"valid"},"validityReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validityreason"},"validityEffectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validityeffectivedate"},"canonicalSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonicalsubscriptionid"},"canonicalRelationshipType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonicalrelationshiptype"},"recognitionStoppedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recognitionstoppedat"},"recognitionStoppedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recognitionstoppedreason"},"postedEntriesAcceptedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedentriesacceptedat"},"postedEntriesAcceptedReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedentriesacceptedreason"},"postedEntriesAcceptedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedentriesacceptedby"},"postedEntriesAcceptedFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedentriesacceptedfingerprint"},"recognitionMode":{"type":"string","title":"Recognitionmode"},"qboCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbocustomerid"},"externalIds":{"items":{"type":"string"},"type":"array","title":"Externalids"},"isUnbilledWrittenOff":{"type":"boolean","title":"Isunbilledwrittenoff","default":false},"unbilledWrittenOffAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledwrittenoffat"},"unbilledWrittenOffReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledwrittenoffreason"},"unbilledWrittenOffAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unbilledwrittenoffamount"},"unbilledWrittenOffType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledwrittenofftype"},"unbilledWrittenOffDebitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledwrittenoffdebitaccountid"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"importBatchId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importbatchid"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"rawData":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rawdata"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"},"currentMode":{"type":"string","title":"Currentmode"},"balancesIncluded":{"type":"boolean","title":"Balancesincluded","default":false},"unbilledBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unbilledbalance","default":0},"deferredBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deferredbalance","default":0},"arBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Arbalance","default":0},"totalRecognized":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalrecognized","default":0},"totalInvoiced":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalinvoiced","default":0},"totalPaid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalpaid","default":0},"outstandingAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Outstandingamount","default":0},"currentImpactSuppressed":{"type":"boolean","title":"Currentimpactsuppressed","default":false},"hasOutstandingPostedEntries":{"type":"boolean","title":"Hasoutstandingpostedentries","default":false},"postedEntriesOutstandingCount":{"type":"integer","title":"Postedentriesoutstandingcount","default":0},"postedEntriesOutstandingAmount":{"type":"number","title":"Postedentriesoutstandingamount","default":0.0},"validityStatusDisplay":{"type":"string","title":"Validitystatusdisplay","default":"valid"},"outstandingPostedEntries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Outstandingpostedentries"},"postedEntriesEvidenceFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedentriesevidencefingerprint"},"operationalProjection":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Operationalprojection"},"modifications":{"anyOf":[{"items":{"$ref":"#/components/schemas/SubscriptionModificationResponse"},"type":"array"},{"type":"null"}],"title":"Modifications"}},"type":"object","required":["id","companyId","customerName","subscriptionName","contractAmount","startDate","paymentSchedule","status","recognitionMode","createdAt","updatedAt","currentMode"],"title":"SubscriptionReadModel","description":"Subscription read/display projection with computed balances and history."},"SubscriptionStatsResponse":{"properties":{"total":{"type":"integer","title":"Total","default":0},"active":{"type":"integer","title":"Active","default":0},"pending":{"type":"integer","title":"Pending","default":0},"completed":{"type":"integer","title":"Completed","default":0},"churned":{"type":"integer","title":"Churned","default":0},"optedOut":{"type":"integer","title":"Optedout","default":0},"mrr":{"type":"number","title":"Mrr","default":0},"arr":{"type":"number","title":"Arr","default":0},"avgContractValue":{"type":"number","title":"Avgcontractvalue","default":0},"totalContractValue":{"type":"number","title":"Totalcontractvalue","default":0},"totalUnbilledBalance":{"type":"number","title":"Totalunbilledbalance","default":0},"totalDeferredBalance":{"type":"number","title":"Totaldeferredbalance","default":0},"totalArBalance":{"type":"number","title":"Totalarbalance","default":0},"earliestStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Earlieststartdate"}},"type":"object","title":"SubscriptionStatsResponse","description":"Subscription statistics.\n\nReason: Single stats model used for both stats endpoint AND embedded in list response.\nMatches frontend SubscriptionStats interface exactly."},"SubscriptionSuggestion":{"properties":{"id":{"type":"string","title":"Id"},"subscriptionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionname"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"totalContractValue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalcontractvalue"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"}},"type":"object","required":["id"],"title":"SubscriptionSuggestion","description":"Subscription matching suggestion."},"SubscriptionUpdate":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"subscriptionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionname"},"revenueSegmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegmentid"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"totalContractValue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Totalcontractvalue"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"paymentSchedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentschedule"},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentstatus"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"externalIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Externalids"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},"type":"object","title":"SubscriptionUpdate","description":"Update subscription request."},"SuccessResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"SuccessResponse"},"SuggestNumbersRequest":{"properties":{"mode":{"type":"string","enum":["fill_gaps","full_renumber"],"title":"Mode","default":"fill_gaps"}},"type":"object","title":"SuggestNumbersRequest","description":"Request body for the suggest-numbers endpoint."},"SuggestNumbersResponse":{"properties":{"suggestions":{"items":{"$ref":"#/components/schemas/SuggestionItem"},"type":"array","title":"Suggestions"},"summary":{"$ref":"#/components/schemas/SuggestNumbersSummary"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["suggestions","summary"],"title":"SuggestNumbersResponse","description":"Response for the suggest-numbers endpoint."},"SuggestNumbersSummary":{"properties":{"unchanged":{"type":"integer","title":"Unchanged"},"new":{"type":"integer","title":"New"},"changed":{"type":"integer","title":"Changed"},"conflicts":{"type":"integer","title":"Conflicts"}},"type":"object","required":["unchanged","new","changed","conflicts"],"title":"SuggestNumbersSummary","description":"Summary statistics for the suggest-numbers response."},"Suggestion":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"}},"type":"object","required":["id","label"],"title":"Suggestion"},"SuggestionItem":{"properties":{"accountId":{"type":"string","title":"Accountid"},"accountName":{"type":"string","title":"Accountname"},"currentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currentnumber"},"suggestedNumber":{"type":"string","title":"Suggestednumber"},"cluster":{"type":"string","title":"Cluster"},"changed":{"type":"boolean","title":"Changed"},"classificationSource":{"type":"string","title":"Classificationsource"}},"type":"object","required":["accountId","accountName","currentNumber","suggestedNumber","cluster","changed","classificationSource"],"title":"SuggestionItem","description":"A single account number suggestion in the response."},"SumExpr-Input":{"properties":{"op":{"type":"string","const":"sum","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"SumExpr"},"SumExpr-Output":{"properties":{"op":{"type":"string","const":"sum","title":"Op"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"value":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Value"},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},"type":"array","maxItems":12,"title":"Rowfilters","description":"Row predicates applied before aggregating (all must match). Bind a toolbar control to match a filtered table; never inherited."}},"additionalProperties":false,"type":"object","required":["op","dataRef"],"title":"SumExpr"},"SyncAllResponse":{"properties":{"accounts":{"anyOf":[{"$ref":"#/components/schemas/app__api__qbo__SyncResponse"},{"type":"null"}]},"transactions":{"anyOf":[{"$ref":"#/components/schemas/app__api__qbo__SyncResponse"},{"type":"null"}]},"summary":{"anyOf":[{"$ref":"#/components/schemas/SyncSummary"},{"type":"null"}]},"success":{"type":"boolean","title":"Success"},"skipped":{"type":"boolean","title":"Skipped","default":false},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"}},"type":"object","required":["success"],"title":"SyncAllResponse"},"SyncJobPublicResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"label":{"type":"string","title":"Label"},"syncType":{"type":"string","title":"Synctype"},"status":{"type":"string","title":"Status"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startedat"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completedat"},"recordsSynced":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recordssynced"},"recordsFailed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recordsfailed"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"},"resultJson":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resultjson"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","companyId","label","syncType","status"],"title":"SyncJobPublicResponse","description":"Polling-safe view of sync_jobs rows."},"SyncJobStartResponse":{"properties":{"syncJobId":{"type":"string","title":"Syncjobid"},"syncType":{"type":"string","title":"Synctype"},"status":{"type":"string","title":"Status"}},"type":"object","required":["syncJobId","syncType","status"],"title":"SyncJobStartResponse","description":"Response returned when HTTP work is queued for porter-jobs."},"SyncStatusResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"sync_type":{"type":"string","title":"Sync Type"},"records_synced":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Records Synced"},"records_failed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Records Failed"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"post_sync_errors":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Post Sync Errors"}},"type":"object","required":["id","status","sync_type"],"title":"SyncStatusResponse"},"SyncSummary":{"properties":{"transactions_changed":{"type":"integer","title":"Transactions Changed","default":0},"transactions_deleted":{"type":"integer","title":"Transactions Deleted","default":0},"customers_synced":{"type":"integer","title":"Customers Synced","default":0},"vendors_synced":{"type":"integer","title":"Vendors Synced","default":0}},"type":"object","title":"SyncSummary","description":"Reason: Human-readable summary of what actually changed during sync,\nso the frontend can show meaningful toast messages instead of raw totals."},"SyncTransactionsResponse":{"properties":{"synced":{"type":"integer","title":"Synced"},"modified":{"type":"integer","title":"Modified"},"removed":{"type":"integer","title":"Removed"}},"type":"object","required":["synced","modified","removed"],"title":"SyncTransactionsResponse","description":"Response for transaction sync."},"TableAction":{"properties":{"actionKey":{"type":"string","maxLength":80,"minLength":1,"title":"Actionkey","description":"Saved ontologyActions key to execute from the table action rail. The referenced action title supplies the visible button and modal title; form controls provide declared runtime attributes."},"form":{"items":{"$ref":"#/components/schemas/TableActionFormField"},"type":"array","maxItems":20,"minItems":1,"title":"Form","description":"Transient modal fields. Each control key is sent as a named attribute to the saved ontology action when the user submits."}},"additionalProperties":false,"type":"object","required":["actionKey","form"],"title":"TableAction"},"TableActionFormField":{"properties":{"control":{"oneOf":[{"$ref":"#/components/schemas/TextControlSpec"},{"$ref":"#/components/schemas/NumberControlSpec"},{"$ref":"#/components/schemas/MoneyControlSpec"},{"$ref":"#/components/schemas/PercentControlSpec"},{"$ref":"#/components/schemas/DateControlSpec"},{"$ref":"#/components/schemas/SelectControlSpec"},{"$ref":"#/components/schemas/SegmentedControlSpec"},{"$ref":"#/components/schemas/ToggleControlSpec"},{"$ref":"#/components/schemas/CheckboxControlSpec"},{"$ref":"#/components/schemas/SliderControlSpec"}],"title":"Control","description":"Transient form control rendered in the table-level action modal. The control key becomes the runtime attribute name passed to the saved ontology action; it does not create shared artifact state.","discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CheckboxControlSpec","date":"#/components/schemas/DateControlSpec","money":"#/components/schemas/MoneyControlSpec","number":"#/components/schemas/NumberControlSpec","percent":"#/components/schemas/PercentControlSpec","segmented":"#/components/schemas/SegmentedControlSpec","select":"#/components/schemas/SelectControlSpec","slider":"#/components/schemas/SliderControlSpec","text":"#/components/schemas/TextControlSpec","toggle":"#/components/schemas/ToggleControlSpec"}}},"required":{"type":"boolean","title":"Required","description":"Whether the modal must receive a non-blank value before submit.","default":false}},"additionalProperties":false,"type":"object","required":["control"],"title":"TableActionFormField"},"TableBlock-Input":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"table","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"height":{"anyOf":[{"type":"string","enum":["content","compact","standard","tall","viewport-half"]},{"type":"null"}],"title":"Height","description":"Optional table-owned bounded height. Use it when table rows should scroll inside the table instead of expanding the artifact page."},"columns":{"items":{"$ref":"#/components/schemas/TableColumn-Input"},"type":"array","maxItems":30,"minItems":1,"title":"Columns","description":"User-facing table columns. Keep technical identifiers and ordering keys out of the visible table; attach ordering keys to a semantic column with sortValue instead."},"rowActions":{"items":{"$ref":"#/components/schemas/TableRowAction-Input"},"type":"array","maxItems":6,"title":"Rowactions","description":"Optional explicit row commands backed by saved ontologyActions. Each binding supplies the row record id and declared attributes; the saved action owns tool selection, mutation semantics, and the visible command title. Declare one per command a user runs on a single tracker or worklist row when the operation is a discrete command rather than changing one field value; use a column edit binding for changing a field. Read-only reporting tables declare none."},"tableActions":{"items":{"$ref":"#/components/schemas/TableAction"},"type":"array","maxItems":4,"title":"Tableactions","description":"Optional table-level commands backed by saved ontologyActions. Each action opens a modal form and sends the submitted form values as declared attributes; the saved action owns tool selection, mutation semantics, and the visible command title."},"detail":{"anyOf":[{"$ref":"#/components/schemas/ArtifactDetailConfig-Input"},{"type":"null"}],"description":"Optional row detail opened from table row interaction. Use inline for expanded rows, popover for a row action, or drawer/modal for larger row inspection."},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Input"},{"type":"null"}],"description":"Optional row click interaction. Use this to set artifact-local context from the clicked row for downstream blocks and optionally open a configured detail surface."},"rowSelection":{"anyOf":[{"$ref":"#/components/schemas/ArtifactRowSelection-Input"},{"type":"null"}],"description":"Optional ephemeral single-row selection producer. Selection uses a stable row key and never persists in artifact state."},"selectionFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactSelectionFilter"},{"type":"null"}]},"rowFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},{"type":"null"}]},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Input"},"type":"array","maxItems":12,"title":"Rowfilters"},"requiredInputColumnIds":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Requiredinputcolumnids","description":"Visible table column ids whose evaluated cells must be present for a row to count as complete. Declare this only when operators need the local all-rows / missing-input view; it never supplies defaults or mutates data."},"requireComplete":{"type":"boolean","title":"Requirecomplete","default":false},"pivotColumns":{"anyOf":[{"$ref":"#/components/schemas/TablePivotColumns"},{"type":"null"}],"description":"Optional numeric cell columns derived from analyze.pivot output fields, so a category-by-period matrix never hand-writes one column per period. Requires requireComplete=true."},"totals":{"anyOf":[{"$ref":"#/components/schemas/TableTotals"},{"type":"null"}],"description":"Optional total row, and optional per-group subtotal rows, summed from the rows currently displayed after filters. Requires requireComplete=true."},"initialSort":{"anyOf":[{"$ref":"#/components/schemas/TableInitialSort"},{"type":"null"}],"description":"Required for new tables: default order using a visible columnId and direction. Bind sortValue when its label differs from the chronology or rank key; never rely on source return order."}},"additionalProperties":false,"type":"object","required":["type","id","dataRef","columns"],"title":"TableBlock"},"TableBlock-Output":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description","description":"Optional short explanation rendered directly below this element's title. Use for element-local context instead of a separate text element whose only purpose is to describe another element."},"type":{"type":"string","const":"table","title":"Type"},"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"dataRef":{"type":"string","maxLength":80,"minLength":1,"title":"Dataref"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Title"},"height":{"anyOf":[{"type":"string","enum":["content","compact","standard","tall","viewport-half"]},{"type":"null"}],"title":"Height","description":"Optional table-owned bounded height. Use it when table rows should scroll inside the table instead of expanding the artifact page."},"columns":{"items":{"$ref":"#/components/schemas/TableColumn-Output"},"type":"array","maxItems":30,"minItems":1,"title":"Columns","description":"User-facing table columns. Keep technical identifiers and ordering keys out of the visible table; attach ordering keys to a semantic column with sortValue instead."},"rowActions":{"items":{"$ref":"#/components/schemas/TableRowAction-Output"},"type":"array","maxItems":6,"title":"Rowactions","description":"Optional explicit row commands backed by saved ontologyActions. Each binding supplies the row record id and declared attributes; the saved action owns tool selection, mutation semantics, and the visible command title. Declare one per command a user runs on a single tracker or worklist row when the operation is a discrete command rather than changing one field value; use a column edit binding for changing a field. Read-only reporting tables declare none."},"tableActions":{"items":{"$ref":"#/components/schemas/TableAction"},"type":"array","maxItems":4,"title":"Tableactions","description":"Optional table-level commands backed by saved ontologyActions. Each action opens a modal form and sends the submitted form values as declared attributes; the saved action owns tool selection, mutation semantics, and the visible command title."},"detail":{"anyOf":[{"$ref":"#/components/schemas/ArtifactDetailConfig-Output"},{"type":"null"}],"description":"Optional row detail opened from table row interaction. Use inline for expanded rows, popover for a row action, or drawer/modal for larger row inspection."},"interaction":{"anyOf":[{"$ref":"#/components/schemas/ArtifactInteractionConfig-Output"},{"type":"null"}],"description":"Optional row click interaction. Use this to set artifact-local context from the clicked row for downstream blocks and optionally open a configured detail surface."},"rowSelection":{"anyOf":[{"$ref":"#/components/schemas/ArtifactRowSelection-Output"},{"type":"null"}],"description":"Optional ephemeral single-row selection producer. Selection uses a stable row key and never persists in artifact state."},"selectionFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactSelectionFilter"},{"type":"null"}]},"rowFilter":{"anyOf":[{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},{"type":"null"}]},"rowFilters":{"items":{"$ref":"#/components/schemas/ArtifactRowFilter-Output"},"type":"array","maxItems":12,"title":"Rowfilters"},"requiredInputColumnIds":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Requiredinputcolumnids","description":"Visible table column ids whose evaluated cells must be present for a row to count as complete. Declare this only when operators need the local all-rows / missing-input view; it never supplies defaults or mutates data."},"requireComplete":{"type":"boolean","title":"Requirecomplete","default":false},"pivotColumns":{"anyOf":[{"$ref":"#/components/schemas/TablePivotColumns"},{"type":"null"}],"description":"Optional numeric cell columns derived from analyze.pivot output fields, so a category-by-period matrix never hand-writes one column per period. Requires requireComplete=true."},"totals":{"anyOf":[{"$ref":"#/components/schemas/TableTotals"},{"type":"null"}],"description":"Optional total row, and optional per-group subtotal rows, summed from the rows currently displayed after filters. Requires requireComplete=true."},"initialSort":{"anyOf":[{"$ref":"#/components/schemas/TableInitialSort"},{"type":"null"}],"description":"Required for new tables: default order using a visible columnId and direction. Bind sortValue when its label differs from the chronology or rank key; never rely on source return order."}},"additionalProperties":false,"type":"object","required":["type","id","dataRef","columns"],"title":"TableBlock"},"TableColumn-Input":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"header":{"type":"string","maxLength":160,"minLength":1,"title":"Header"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"numberFormat":{"anyOf":[{"$ref":"#/components/schemas/FieldExpr"},{"type":"null"}],"description":"For kind=number only: saved row field returning money, number, or percent. Never infer format from display labels."},"sortValue":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Sortvalue","description":"Hidden row expression for sorting a visible column by a separate chronology or rank key. Never expose technical ordering keys as table columns."},"kind":{"type":"string","enum":["text","money","number","percent","date","relativeDate","badge","person","boolean"],"title":"Kind","description":"Cell display for the column value. text: plain text. money, number, percent: formatted figures. date: calendar date. relativeDate: preformatted relative text. badge: status pill toned by toneMap. person: a person's display name shown with an initials avatar, for owner, assignee, or originator columns. boolean: a read-only complete/incomplete check state for true/false values; it does not make the field editable (declare edit for that)."},"width":{"type":"string","enum":["fit","compact","amount","date","grow"],"title":"Width"},"overflow":{"type":"string","enum":["fit","truncate","wrap"],"title":"Overflow"},"align":{"anyOf":[{"type":"string","enum":["left","center","right"]},{"type":"null"}],"title":"Align","description":"Optional cell and header alignment override. Default when omitted: the renderer aligns money, number, and percent columns right; badge columns center; every other column left."},"filterMode":{"anyOf":[{"type":"string","const":"options"},{"type":"null"}],"title":"Filtermode","description":"For a text-like categorical column, render a searchable multi-select from distinct evaluated values in the complete table result. Omit to use the default kind-specific filter."},"tooltip":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Tooltip"},"toneMap":{"additionalProperties":{"type":"string","enum":["neutral","success","warning","error"]},"type":"object","title":"Tonemap"},"comparison":{"anyOf":[{"$ref":"#/components/schemas/ArtifactMetricComparison-Input"},{"type":"null"}],"description":"For kind=money only: show this amount's change against a comparable period in the same cell. prior is a row expression for the comparable-period amount; label names that period; favorableDirection says whether an increase or a decrease is good news for this figure. Use it where a reader needs the figure and its change together; omit it on plain amounts."},"drillTarget":{"anyOf":[{"$ref":"#/components/schemas/TableColumnDrillTarget-Input"},{"type":"null"}],"description":"Optional cell-level drill-in target. Use this for columns that display or identify an operational-model object; table rows themselves do not open default object detail drawers. On a tracker or worklist over operational-model records this is what makes the row openable, so declare it on the column that names or identifies the item; a table with editable columns but no drillTarget or cellBinding lets the user change the fields on screen and never see the rest of the record."},"cellBinding":{"anyOf":[{"$ref":"#/components/schemas/TableColumnCellBinding-Input"},{"type":"null"}],"description":"Optional cell-level data lineage binding. Use this for columns where each displayed value is an operational-model field on an owner record and may also be a link to a referenced record. Declaring it is what lets a clicked cell open that record, where its editable scalar fields can be changed in place; the renderer never infers record ownership from column ids or row values, so a tracker or worklist table authored without it stays read-only. Omit it on aggregate, period-comparison, and computed report columns, which own no record."},"edit":{"anyOf":[{"$ref":"#/components/schemas/TableColumnEdit-Input"},{"type":"null"}],"description":"Optional trusted row edit binding. The column value remains the display expression; edit declares the UI control, target record, and saved ontology action key used on commit. Declare it on the fields a user maintains from a tracker or worklist table — status, owner, priority, notes, next step — so the value commits in place instead of sending the user to another surface to change it. An edit binding makes one field writable and does NOT make the row openable, so a tracker still needs a drillTarget or cellBinding column beside it. Omit edit on identifiers, computed values, and read-only report figures."}},"additionalProperties":false,"type":"object","required":["id","header","value","kind","width","overflow"],"title":"TableColumn"},"TableColumn-Output":{"properties":{"id":{"type":"string","maxLength":80,"minLength":1,"title":"Id"},"header":{"type":"string","maxLength":160,"minLength":1,"title":"Header"},"value":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Value","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"numberFormat":{"anyOf":[{"$ref":"#/components/schemas/FieldExpr"},{"type":"null"}],"description":"For kind=number only: saved row field returning money, number, or percent. Never infer format from display labels."},"sortValue":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Sortvalue","description":"Hidden row expression for sorting a visible column by a separate chronology or rank key. Never expose technical ordering keys as table columns."},"kind":{"type":"string","enum":["text","money","number","percent","date","relativeDate","badge","person","boolean"],"title":"Kind","description":"Cell display for the column value. text: plain text. money, number, percent: formatted figures. date: calendar date. relativeDate: preformatted relative text. badge: status pill toned by toneMap. person: a person's display name shown with an initials avatar, for owner, assignee, or originator columns. boolean: a read-only complete/incomplete check state for true/false values; it does not make the field editable (declare edit for that)."},"width":{"type":"string","enum":["fit","compact","amount","date","grow"],"title":"Width"},"overflow":{"type":"string","enum":["fit","truncate","wrap"],"title":"Overflow"},"align":{"anyOf":[{"type":"string","enum":["left","center","right"]},{"type":"null"}],"title":"Align","description":"Optional cell and header alignment override. Default when omitted: the renderer aligns money, number, and percent columns right; badge columns center; every other column left."},"filterMode":{"anyOf":[{"type":"string","const":"options"},{"type":"null"}],"title":"Filtermode","description":"For a text-like categorical column, render a searchable multi-select from distinct evaluated values in the complete table result. Omit to use the default kind-specific filter."},"tooltip":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Tooltip"},"toneMap":{"additionalProperties":{"type":"string","enum":["neutral","success","warning","error"]},"type":"object","title":"Tonemap"},"comparison":{"anyOf":[{"$ref":"#/components/schemas/ArtifactMetricComparison-Output"},{"type":"null"}],"description":"For kind=money only: show this amount's change against a comparable period in the same cell. prior is a row expression for the comparable-period amount; label names that period; favorableDirection says whether an increase or a decrease is good news for this figure. Use it where a reader needs the figure and its change together; omit it on plain amounts."},"drillTarget":{"anyOf":[{"$ref":"#/components/schemas/TableColumnDrillTarget-Output"},{"type":"null"}],"description":"Optional cell-level drill-in target. Use this for columns that display or identify an operational-model object; table rows themselves do not open default object detail drawers. On a tracker or worklist over operational-model records this is what makes the row openable, so declare it on the column that names or identifies the item; a table with editable columns but no drillTarget or cellBinding lets the user change the fields on screen and never see the rest of the record."},"cellBinding":{"anyOf":[{"$ref":"#/components/schemas/TableColumnCellBinding-Output"},{"type":"null"}],"description":"Optional cell-level data lineage binding. Use this for columns where each displayed value is an operational-model field on an owner record and may also be a link to a referenced record. Declaring it is what lets a clicked cell open that record, where its editable scalar fields can be changed in place; the renderer never infers record ownership from column ids or row values, so a tracker or worklist table authored without it stays read-only. Omit it on aggregate, period-comparison, and computed report columns, which own no record."},"edit":{"anyOf":[{"$ref":"#/components/schemas/TableColumnEdit-Output"},{"type":"null"}],"description":"Optional trusted row edit binding. The column value remains the display expression; edit declares the UI control, target record, and saved ontology action key used on commit. Declare it on the fields a user maintains from a tracker or worklist table — status, owner, priority, notes, next step — so the value commits in place instead of sending the user to another surface to change it. An edit binding makes one field writable and does NOT make the row openable, so a tracker still needs a drillTarget or cellBinding column beside it. Omit edit on identifiers, computed values, and read-only report figures."}},"additionalProperties":false,"type":"object","required":["id","header","value","kind","width","overflow"],"title":"TableColumn"},"TableColumnCellBinding-Input":{"properties":{"kind":{"type":"string","const":"workflowRecord","title":"Kind","description":"Cell binding kind. workflowRecord means the clicked cell opens the operational-model drawer for the referenced record when present, otherwise for the owner record.","default":"workflowRecord"},"owner":{"$ref":"#/components/schemas/TableColumnRecordBinding-Input","description":"Record whose field produced this cell. The drawer opens this record when no referenced record identity is declared or resolvable."},"fieldKey":{"type":"string","maxLength":80,"minLength":1,"title":"Fieldkey","description":"Operational-model field key represented by this table cell."},"reference":{"anyOf":[{"$ref":"#/components/schemas/TableColumnRecordBinding-Input"},{"type":"null"}],"description":"Optional record displayed by this cell. When the referenced identity resolves, the drawer opens it instead of the owner record."},"label":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Label","description":"Optional row expression for the object link label. If omitted, the column display value is used."}},"additionalProperties":false,"type":"object","required":["owner","fieldKey"],"title":"TableColumnCellBinding"},"TableColumnCellBinding-Output":{"properties":{"kind":{"type":"string","const":"workflowRecord","title":"Kind","description":"Cell binding kind. workflowRecord means the clicked cell opens the operational-model drawer for the referenced record when present, otherwise for the owner record.","default":"workflowRecord"},"owner":{"$ref":"#/components/schemas/TableColumnRecordBinding-Output","description":"Record whose field produced this cell. The drawer opens this record when no referenced record identity is declared or resolvable."},"fieldKey":{"type":"string","maxLength":80,"minLength":1,"title":"Fieldkey","description":"Operational-model field key represented by this table cell."},"reference":{"anyOf":[{"$ref":"#/components/schemas/TableColumnRecordBinding-Output"},{"type":"null"}],"description":"Optional record displayed by this cell. When the referenced identity resolves, the drawer opens it instead of the owner record."},"label":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Label","description":"Optional row expression for the object link label. If omitted, the column display value is used."}},"additionalProperties":false,"type":"object","required":["owner","fieldKey"],"title":"TableColumnCellBinding"},"TableColumnDrillTarget-Input":{"properties":{"kind":{"type":"string","const":"workflowRecord","title":"Kind","description":"Cell drill-in target kind. workflowRecord opens the operational-model record drawer for the evaluated objectTypeKey plus declared record identity. Prefer cellBinding when the cell represents a field owned by one record and may display a reference to another record.","default":"workflowRecord"},"objectTypeKey":{"type":"string","maxLength":80,"minLength":1,"title":"Objecttypekey","description":"Operational-model object type key for the clicked cell target."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Recordid","description":"Row expression that resolves to the target workflow record id.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"label":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},{"type":"null"}],"title":"Label","description":"Optional row expression for the object link label. If omitted, the column display value is used."}},"additionalProperties":false,"type":"object","required":["objectTypeKey","recordId"],"title":"TableColumnDrillTarget"},"TableColumnDrillTarget-Output":{"properties":{"kind":{"type":"string","const":"workflowRecord","title":"Kind","description":"Cell drill-in target kind. workflowRecord opens the operational-model record drawer for the evaluated objectTypeKey plus declared record identity. Prefer cellBinding when the cell represents a field owned by one record and may display a reference to another record.","default":"workflowRecord"},"objectTypeKey":{"type":"string","maxLength":80,"minLength":1,"title":"Objecttypekey","description":"Operational-model object type key for the clicked cell target."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Recordid","description":"Row expression that resolves to the target workflow record id.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"label":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},{"type":"null"}],"title":"Label","description":"Optional row expression for the object link label. If omitted, the column display value is used."}},"additionalProperties":false,"type":"object","required":["objectTypeKey","recordId"],"title":"TableColumnDrillTarget"},"TableColumnEdit-Input":{"properties":{"controlKey":{"type":"string","maxLength":80,"minLength":1,"title":"Controlkey","description":"Artifact control key that defines the edit UI for this cell. The control is used as a per-row editor and is not itself the target Porter record."},"actionKey":{"type":"string","maxLength":80,"minLength":1,"title":"Actionkey","description":"Saved ontologyActions key to execute when this cell commits. The renderer sends only this key plus runtime value, recordId, and declared attributes. Every edit UI element must be connected to a mutation: the referenced action must bind record_id and control_value into the mutation payload, one action per editable field. For nullable override fields, use a display expression that falls back when the edited field is null; clearing a numeric, money, or percent cell sends explicit null as control_value. If no ontology-backed state exists to hold the edited value, create the appropriate domain-owned state before binding the artifact edit."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Recordid","description":"Row expression that resolves to the Porter/custom-object record id to edit.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"attributes":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"type":"object","maxProperties":20,"title":"Attributes","description":"Optional named runtime attributes passed to ontology action bindings. Values are evaluated in the edited row context."}},"additionalProperties":false,"type":"object","required":["controlKey","actionKey","recordId"],"title":"TableColumnEdit"},"TableColumnEdit-Output":{"properties":{"controlKey":{"type":"string","maxLength":80,"minLength":1,"title":"Controlkey","description":"Artifact control key that defines the edit UI for this cell. The control is used as a per-row editor and is not itself the target Porter record."},"actionKey":{"type":"string","maxLength":80,"minLength":1,"title":"Actionkey","description":"Saved ontologyActions key to execute when this cell commits. The renderer sends only this key plus runtime value, recordId, and declared attributes. Every edit UI element must be connected to a mutation: the referenced action must bind record_id and control_value into the mutation payload, one action per editable field. For nullable override fields, use a display expression that falls back when the edited field is null; clearing a numeric, money, or percent cell sends explicit null as control_value. If no ontology-backed state exists to hold the edited value, create the appropriate domain-owned state before binding the artifact edit."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Recordid","description":"Row expression that resolves to the Porter/custom-object record id to edit.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"attributes":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"type":"object","maxProperties":20,"title":"Attributes","description":"Optional named runtime attributes passed to ontology action bindings. Values are evaluated in the edited row context."}},"additionalProperties":false,"type":"object","required":["controlKey","actionKey","recordId"],"title":"TableColumnEdit"},"TableColumnRecordBinding-Input":{"properties":{"objectTypeKey":{"type":"string","maxLength":80,"minLength":1,"title":"Objecttypekey","description":"Operational-model object type key for a cell-bound record."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Recordid","description":"Row expression that resolves to the record id.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}}},"additionalProperties":false,"type":"object","required":["objectTypeKey","recordId"],"title":"TableColumnRecordBinding"},"TableColumnRecordBinding-Output":{"properties":{"objectTypeKey":{"type":"string","maxLength":80,"minLength":1,"title":"Objecttypekey","description":"Operational-model object type key for a cell-bound record."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Recordid","description":"Row expression that resolves to the record id.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}}},"additionalProperties":false,"type":"object","required":["objectTypeKey","recordId"],"title":"TableColumnRecordBinding"},"TableInitialSort":{"properties":{"columnId":{"type":"string","maxLength":80,"minLength":1,"title":"Columnid","description":"Table column id that defines the initial rendered row order before a user clicks another sortable header."},"direction":{"type":"string","enum":["asc","desc"],"title":"Direction","description":"Initial table sort direction for the selected column."}},"additionalProperties":false,"type":"object","required":["columnId","direction"],"title":"TableInitialSort"},"TablePivotColumns":{"properties":{"excludeFields":{"items":{"type":"string"},"type":"array","maxItems":30,"minItems":1,"title":"Excludefields","description":"Row fields that are NOT pivoted cells: the analyze.pivot index field and any other field on the wide rows (for example one merged in afterwards). Every other field on the result rows renders as one numeric column, headed by its field name, in the order the fields first appear, after the static columns."},"kind":{"type":"string","enum":["money","number","percent"],"title":"Kind","description":"Numeric presentation shared by every pivoted cell column."},"width":{"type":"string","enum":["fit","compact","amount","date","grow"],"title":"Width","description":"Width shared by every pivoted cell column; amount suits money cells."},"rowTotalHeader":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Rowtotalheader","description":"Optional header for a trailing column holding each row's sum across its pivoted cells, ignoring empty cells. Not allowed for percent cells; omit it when the pivoted cells are averages."}},"additionalProperties":false,"type":"object","required":["excludeFields","kind","width"],"title":"TablePivotColumns"},"TableRowAction-Input":{"properties":{"actionKey":{"type":"string","maxLength":80,"minLength":1,"title":"Actionkey","description":"Saved ontologyActions key to execute from this table row. The referenced action title supplies the visible command label, and the renderer sends only this key plus the evaluated recordId and declared attributes."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"title":"Recordid","description":"Row expression that resolves to the Porter or operational-model record id consumed by the saved ontology action.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"attributes":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Input"},{"$ref":"#/components/schemas/SubExpr-Input"},{"$ref":"#/components/schemas/MulExpr-Input"},{"$ref":"#/components/schemas/DivExpr-Input"},{"$ref":"#/components/schemas/SumExpr-Input"},{"$ref":"#/components/schemas/AvgExpr-Input"},{"$ref":"#/components/schemas/MinExpr-Input"},{"$ref":"#/components/schemas/MaxExpr-Input"},{"$ref":"#/components/schemas/CountExpr-Input"},{"$ref":"#/components/schemas/ConcatExpr-Input"},{"$ref":"#/components/schemas/FormatExpr-Input"},{"$ref":"#/components/schemas/CoalesceExpr-Input"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Input","avg":"#/components/schemas/AvgExpr-Input","coalesce":"#/components/schemas/CoalesceExpr-Input","concat":"#/components/schemas/ConcatExpr-Input","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Input","div":"#/components/schemas/DivExpr-Input","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Input","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Input","min":"#/components/schemas/MinExpr-Input","mul":"#/components/schemas/MulExpr-Input","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Input","sum":"#/components/schemas/SumExpr-Input"}}},"type":"object","maxProperties":20,"title":"Attributes","description":"Optional named runtime attributes passed to ontology action bindings. Values are evaluated in the selected row context."}},"additionalProperties":false,"type":"object","required":["actionKey","recordId"],"title":"TableRowAction"},"TableRowAction-Output":{"properties":{"actionKey":{"type":"string","maxLength":80,"minLength":1,"title":"Actionkey","description":"Saved ontologyActions key to execute from this table row. The referenced action title supplies the visible command label, and the renderer sends only this key plus the evaluated recordId and declared attributes."},"recordId":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"title":"Recordid","description":"Row expression that resolves to the Porter or operational-model record id consumed by the saved ontology action.","discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"attributes":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/LiteralExpr"},{"$ref":"#/components/schemas/FieldExpr"},{"$ref":"#/components/schemas/ControlExpr"},{"$ref":"#/components/schemas/InteractionExpr"},{"$ref":"#/components/schemas/SeriesExpr"},{"$ref":"#/components/schemas/AddExpr-Output"},{"$ref":"#/components/schemas/SubExpr-Output"},{"$ref":"#/components/schemas/MulExpr-Output"},{"$ref":"#/components/schemas/DivExpr-Output"},{"$ref":"#/components/schemas/SumExpr-Output"},{"$ref":"#/components/schemas/AvgExpr-Output"},{"$ref":"#/components/schemas/MinExpr-Output"},{"$ref":"#/components/schemas/MaxExpr-Output"},{"$ref":"#/components/schemas/CountExpr-Output"},{"$ref":"#/components/schemas/ConcatExpr-Output"},{"$ref":"#/components/schemas/FormatExpr-Output"},{"$ref":"#/components/schemas/CoalesceExpr-Output"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/AddExpr-Output","avg":"#/components/schemas/AvgExpr-Output","coalesce":"#/components/schemas/CoalesceExpr-Output","concat":"#/components/schemas/ConcatExpr-Output","control":"#/components/schemas/ControlExpr","count":"#/components/schemas/CountExpr-Output","div":"#/components/schemas/DivExpr-Output","field":"#/components/schemas/FieldExpr","format":"#/components/schemas/FormatExpr-Output","interaction":"#/components/schemas/InteractionExpr","literal":"#/components/schemas/LiteralExpr","max":"#/components/schemas/MaxExpr-Output","min":"#/components/schemas/MinExpr-Output","mul":"#/components/schemas/MulExpr-Output","series":"#/components/schemas/SeriesExpr","sub":"#/components/schemas/SubExpr-Output","sum":"#/components/schemas/SumExpr-Output"}}},"type":"object","maxProperties":20,"title":"Attributes","description":"Optional named runtime attributes passed to ontology action bindings. Values are evaluated in the selected row context."}},"additionalProperties":false,"type":"object","required":["actionKey","recordId"],"title":"TableRowAction"},"TableTotals":{"properties":{"label":{"type":"string","maxLength":60,"minLength":1,"title":"Label","description":"Label shown in the leading cells of the total row and each subtotal row.","default":"Total"},"columnIds":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Columnids","description":"Static money or number column ids whose displayed cells are summed in the total row. The first column holds the label, so it cannot be totaled. Do not total averages, rates, or other values that do not add."},"pivotColumns":{"type":"boolean","title":"Pivotcolumns","description":"When true, also sum every pivotColumns cell column and its row total column. Not allowed for percent pivotColumns.","default":false},"groupByColumnId":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Groupbycolumnid","description":"Optional static column id whose displayed value groups the rows. Each group keeps the current sort order inside it, is followed by its own subtotal row, and the final row becomes the grand total across every group."}},"additionalProperties":false,"type":"object","title":"TableTotals"},"TaxDepreciationSupportedYearCreate":{"properties":{"taxYear":{"type":"integer","title":"Taxyear"},"totalDepreciationAmount":{"type":"number","title":"Totaldepreciationamount"},"sourceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcedocumentid"},"sourceReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcereference"}},"type":"object","required":["taxYear","totalDepreciationAmount"],"title":"TaxDepreciationSupportedYearCreate","description":"Exact annual depreciation total supported by source evidence."},"TaxDepreciationTermsCreate":{"properties":{"method":{"type":"string","title":"Method"},"convention":{"type":"string","title":"Convention"},"recoveryPeriodMonths":{"type":"integer","title":"Recoveryperiodmonths"},"section179Amount":{"type":"number","title":"Section179Amount","default":0},"bonusDepreciationAmount":{"type":"number","title":"Bonusdepreciationamount","default":0},"supportedYears":{"items":{"$ref":"#/components/schemas/TaxDepreciationSupportedYearCreate"},"type":"array","title":"Supportedyears"}},"type":"object","required":["method","convention","recoveryPeriodMonths"],"title":"TaxDepreciationTermsCreate","description":"Structured tax-method terms for a canonical asset schedule."},"TaxDepreciationTermsResponse":{"properties":{"scheduleId":{"type":"string","title":"Scheduleid"},"companyId":{"type":"string","title":"Companyid"},"method":{"type":"string","title":"Method"},"convention":{"type":"string","title":"Convention"},"recoveryPeriodMonths":{"type":"integer","title":"Recoveryperiodmonths"},"section179Amount":{"type":"number","title":"Section179Amount"},"bonusDepreciationAmount":{"type":"number","title":"Bonusdepreciationamount"}},"type":"object","required":["scheduleId","companyId","method","convention","recoveryPeriodMonths","section179Amount","bonusDepreciationAmount"],"title":"TaxDepreciationTermsResponse","description":"Persisted tax-depreciation terms."},"TaxDepreciationYearResponse":{"properties":{"id":{"type":"string","title":"Id"},"scheduleId":{"type":"string","title":"Scheduleid"},"companyId":{"type":"string","title":"Companyid"},"taxYear":{"type":"integer","title":"Taxyear"},"serviceFraction":{"type":"number","title":"Servicefraction"},"beginningDepreciableBasis":{"type":"number","title":"Beginningdepreciablebasis"},"section179Amount":{"type":"number","title":"Section179Amount"},"bonusDepreciationAmount":{"type":"number","title":"Bonusdepreciationamount"},"regularDepreciationAmount":{"type":"number","title":"Regulardepreciationamount"},"totalDepreciationAmount":{"type":"number","title":"Totaldepreciationamount"},"endingDepreciableBasis":{"type":"number","title":"Endingdepreciablebasis"},"isSourceSupported":{"type":"boolean","title":"Issourcesupported"},"sourceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcedocumentid"},"sourceReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcereference"}},"type":"object","required":["id","scheduleId","companyId","taxYear","serviceFraction","beginningDepreciableBasis","section179Amount","bonusDepreciationAmount","regularDepreciationAmount","totalDepreciationAmount","endingDepreciableBasis","isSourceSupported"],"title":"TaxDepreciationYearResponse","description":"One annual tax-depreciation support row."},"TemporalBinding":{"properties":{"scope":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","title":"Scope"},"capability":{"type":"string","maxLength":160,"minLength":1,"title":"Capability"}},"additionalProperties":false,"type":"object","required":["scope","capability"],"title":"TemporalBinding"},"TemporalContract":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"scopes":{"patternProperties":{"^[A-Za-z_][A-Za-z0-9_]*$":{"$ref":"#/components/schemas/TemporalScope"}},"propertyNames":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"type":"object","maxProperties":32,"minProperties":1,"title":"Scopes"},"bindings":{"patternProperties":{"^[A-Za-z_][A-Za-z0-9_]*$":{"$ref":"#/components/schemas/TemporalBinding"}},"propertyNames":{"maxLength":64,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"type":"object","title":"Bindings"},"context_scope":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},{"type":"null"}],"title":"Context Scope"}},"additionalProperties":false,"type":"object","required":["scopes"],"title":"TemporalContract"},"TemporalScope":{"properties":{"selection":{"oneOf":[{"$ref":"#/components/schemas/PointScopeSelection"},{"$ref":"#/components/schemas/RangeScopeSelection"},{"$ref":"#/components/schemas/PeriodScopeSelection"},{"$ref":"#/components/schemas/LastClosedPeriodScopeSelection"},{"$ref":"#/components/schemas/PreviousPeriodScopeSelection"},{"$ref":"#/components/schemas/AllDatesScopeSelection"},{"$ref":"#/components/schemas/CurrentStateScopeSelection"},{"$ref":"#/components/schemas/UndatedScopeSelection"}],"title":"Selection","discriminator":{"propertyName":"kind","mapping":{"all_dates":"#/components/schemas/AllDatesScopeSelection","current_state":"#/components/schemas/CurrentStateScopeSelection","last_closed_period":"#/components/schemas/LastClosedPeriodScopeSelection","period":"#/components/schemas/PeriodScopeSelection","point":"#/components/schemas/PointScopeSelection","previous_period":"#/components/schemas/PreviousPeriodScopeSelection","range":"#/components/schemas/RangeScopeSelection","undated":"#/components/schemas/UndatedScopeSelection"}}},"control_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Control Id"}},"additionalProperties":false,"type":"object","required":["selection"],"title":"TemporalScope"},"TextControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"text","title":"Type"},"defaultValue":{"type":"string","maxLength":1000,"title":"Defaultvalue","default":""},"placeholder":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Placeholder"}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"TextControlSpec"},"TodayDateAnchor":{"properties":{"kind":{"type":"string","const":"today","title":"Kind"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"TodayDateAnchor"},"TodayDateExpression":{"properties":{"kind":{"type":"string","const":"today","title":"Kind"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"TodayDateExpression"},"ToggleControlSpec":{"properties":{"key":{"type":"string","maxLength":80,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":160,"minLength":1,"title":"Label"},"meaning":{"type":"string","maxLength":500,"minLength":1,"title":"Meaning"},"persist":{"type":"boolean","const":true,"title":"Persist","default":true},"replacementFor":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Replacementfor"},"type":{"type":"string","const":"toggle","title":"Type"},"defaultValue":{"type":"boolean","title":"Defaultvalue","default":false}},"additionalProperties":false,"type":"object","required":["key","label","meaning","type"],"title":"ToggleControlSpec"},"TransactionDetailResponse":{"properties":{"beginningBalance":{"type":"number","title":"Beginningbalance"},"netActivity":{"type":"number","title":"Netactivity"},"endingBalance":{"type":"number","title":"Endingbalance"},"transactions":{"items":{"$ref":"#/components/schemas/TransactionItem"},"type":"array","title":"Transactions"}},"type":"object","required":["beginningBalance","netActivity","endingBalance","transactions"],"title":"TransactionDetailResponse","description":"Response for the transaction detail endpoint."},"TransactionFlagResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"transactionId":{"type":"string","title":"Transactionid"},"transactionType":{"type":"string","title":"Transactiontype","default":"bank_transaction"},"flagType":{"type":"string","title":"Flagtype"},"flagReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flagreason"},"matchedPolicyClassId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedpolicyclassid"},"matchedPolicyClassType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedpolicyclasstype"},"suggestedValues":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Suggestedvalues"},"status":{"type":"string","title":"Status","default":"pending"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"},"resolvedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolvedby"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolvedat"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduleid"}},"type":"object","required":["id","companyId","transactionId","flagType"],"title":"TransactionFlagResponse","description":"A policy flag on a transaction."},"TransactionItem":{"properties":{"date":{"type":"string","title":"Date"},"description":{"type":"string","title":"Description"},"refNo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refno"},"amount":{"type":"number","title":"Amount"},"counterparty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transactionid"},"runningBalance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Runningbalance"}},"type":"object","required":["date","description","amount"],"title":"TransactionItem","description":"A single transaction line for the detail view."},"TransactionProvenance":{"properties":{"originSystem":{"type":"string","title":"Originsystem"},"originLabel":{"type":"string","title":"Originlabel"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"},"sourceIds":{"additionalProperties":{"type":"string"},"type":"object","title":"Sourceids"},"links":{"items":{"$ref":"#/components/schemas/ProvenanceLink"},"type":"array","title":"Links"},"audit":{"anyOf":[{"$ref":"#/components/schemas/ProvenanceAudit"},{"type":"null"}]}},"type":"object","required":["originSystem","originLabel"],"title":"TransactionProvenance","description":"Canonical \"where did this come from\" descriptor for a transaction."},"TransactionSearchCompanyError":{"properties":{"companyId":{"type":"string","title":"Companyid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"},"error":{"type":"string","title":"Error"}},"type":"object","required":["companyId","error"],"title":"TransactionSearchCompanyError","description":"Per-entity failure for a group-scoped search.\n\nReason: A partial group answer must name the entities that FAILED — a\nmissing member otherwise reads as 'zero matches', which is a lie."},"TransactionSearchCompanyTotal":{"properties":{"companyId":{"type":"string","title":"Companyid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["companyId","total"],"title":"TransactionSearchCompanyTotal","description":"Per-entity hit count for a group-scoped search."},"TransactionSearchResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TransactionSearchResult"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset","default":0},"limit":{"type":"integer","title":"Limit","default":20},"searchScopeComplete":{"type":"boolean","title":"Searchscopecomplete","default":false},"aggregateScopeComplete":{"type":"boolean","title":"Aggregatescopecomplete","default":true},"totalsByTransactionType":{"additionalProperties":{"type":"integer"},"type":"object","title":"Totalsbytransactiontype"},"availableSourceCounts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Availablesourcecounts"},"availableSources":{"items":{"type":"string"},"type":"array","title":"Availablesources"},"resultGuidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resultguidance"},"companyTotals":{"anyOf":[{"items":{"$ref":"#/components/schemas/TransactionSearchCompanyTotal"},"type":"array"},{"type":"null"}],"title":"Companytotals"},"companyErrors":{"anyOf":[{"items":{"$ref":"#/components/schemas/TransactionSearchCompanyError"},"type":"array"},{"type":"null"}],"title":"Companyerrors"}},"type":"object","required":["items","total"],"title":"TransactionSearchResponse","description":"Universal transaction search response, paginated or complete."},"TransactionSearchResult":{"properties":{"id":{"type":"string","title":"Id"},"transactionType":{"type":"string","enum":["bank_transaction","credit_card_transaction","invoice","bill","bill_payment","payment","journal_entry","sale"],"title":"Transactiontype"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"amountBasis":{"anyOf":[{"type":"string","const":"net"},{"type":"null"}],"title":"Amountbasis"},"amountMatchContext":{"anyOf":[{"$ref":"#/components/schemas/SaleAmountMatchContext"},{"type":"null"}]},"counterparty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"saleLifecycle":{"anyOf":[{"$ref":"#/components/schemas/SaleLifecycleContext"},{"type":"null"}]},"lineContext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linecontext"},"nativeRoute":{"type":"string","title":"Nativeroute"},"nativeEntityId":{"type":"string","title":"Nativeentityid"},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyid"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname"}},"type":"object","required":["id","transactionType","nativeRoute","nativeEntityId"],"title":"TransactionSearchResult","description":"Normalized search hit returned by every universal transaction search surface."},"TransactionTabRelevance":{"properties":{"bank":{"$ref":"#/components/schemas/NavigationSurfaceState"},"creditCards":{"$ref":"#/components/schemas/NavigationSurfaceState"},"invoices":{"$ref":"#/components/schemas/NavigationSurfaceState"},"bills":{"$ref":"#/components/schemas/NavigationSurfaceState"},"payments":{"$ref":"#/components/schemas/NavigationSurfaceState"},"journalEntries":{"$ref":"#/components/schemas/NavigationSurfaceState"}},"type":"object","required":["bank","creditCards","invoices","bills","payments","journalEntries"],"title":"TransactionTabRelevance","description":"Transactions page tabs keyed by the frontend route slugs."},"TrialBalanceResponse":{"properties":{"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"},"rows":{"items":{"$ref":"#/components/schemas/TrialBalanceRow"},"type":"array","title":"Rows"}},"type":"object","required":["startDate","endDate","rows"],"title":"TrialBalanceResponse"},"TrialBalanceRow":{"properties":{"qboAccountId":{"type":"string","title":"Qboaccountid"},"accountName":{"type":"string","title":"Accountname"},"debit":{"type":"number","title":"Debit"},"credit":{"type":"number","title":"Credit"},"balance":{"type":"number","title":"Balance"},"acctNum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acctnum"},"displayPriority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Displaypriority"},"displayPrioritySource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayprioritysource"},"parentQboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentqboaccountid"},"fullyQualifiedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullyqualifiedname"}},"type":"object","required":["qboAccountId","accountName","debit","credit","balance"],"title":"TrialBalanceRow"},"Uncertainty":{"properties":{"field":{"type":"string","title":"Field"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"suggestions":{"items":{"$ref":"#/components/schemas/Suggestion"},"type":"array","title":"Suggestions","default":[]},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["field","reason"],"title":"Uncertainty"},"UndatedScopeSelection":{"properties":{"kind":{"type":"string","const":"undated","title":"Kind"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"UndatedScopeSelection"},"UnifiedJEDetailItem":{"properties":{"id":{"type":"string","title":"Id"},"sourceId":{"type":"string","title":"Sourceid"},"sourceName":{"type":"string","title":"Sourcename"},"amount":{"type":"number","title":"Amount"},"fromUnbilled":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fromunbilled"},"fromDeferred":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fromdeferred"},"arAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aramount"},"revenueAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueamount"},"revenueSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenuesegment"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourcePeriod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceperiod"},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountname"},"calculatedAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calculatedamount"},"postedAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Postedamount"},"priorAdjustmentAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prioradjustmentamount"},"adjustmentAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adjustmentamount"},"varianceExplanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Varianceexplanation"},"postingType":{"anyOf":[{"type":"string","enum":["debit","credit"]},{"type":"null"}],"title":"Postingtype"},"isAddition":{"type":"boolean","title":"Isaddition","default":false}},"type":"object","required":["id","sourceId","sourceName","amount"],"title":"UnifiedJEDetailItem","description":"A source record contributing to a unified journal entry."},"UnifiedJEDetailLine":{"properties":{"account":{"type":"string","title":"Account"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accountid"},"qboAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qboaccountid"},"debit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Debit"},"credit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sourceType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcetype"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceid"},"sourceLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcelabel"},"partyType":{"anyOf":[{"type":"string","enum":["vendor","customer"]},{"type":"null"}],"title":"Partytype"},"partyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partyid"},"partyLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partylabel"},"lineKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linekey"},"revRecActivitySource":{"type":"string","enum":["schedule","non_schedule"],"title":"Revrecactivitysource","default":"non_schedule"}},"type":"object","required":["account"],"title":"UnifiedJEDetailLine","description":"A single debit/credit line in a unified journal entry."},"UnifiedJEDetailResponse":{"properties":{"entry":{"$ref":"#/components/schemas/UnifiedJournalEntryRow"},"lines":{"items":{"$ref":"#/components/schemas/UnifiedJEDetailLine"},"type":"array","title":"Lines","default":[]},"details":{"items":{"$ref":"#/components/schemas/UnifiedJEDetailItem"},"type":"array","title":"Details","default":[]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"supportingDetails":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supportingdetails"},"supportingDocuments":{"items":{"$ref":"#/components/schemas/LinkedDocumentResponse"},"type":"array","title":"Supportingdocuments"}},"type":"object","required":["entry"],"title":"UnifiedJEDetailResponse","description":"Full detail of a unified journal entry."},"UnifiedJournalEntriesListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/UnifiedJournalEntryRow"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"},"statusCounts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Statuscounts"},"sourceTypes":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Sourcetypes"},"sourceErrors":{"items":{"$ref":"#/components/schemas/UnifiedJournalEntriesSourceError"},"type":"array","title":"Sourceerrors"},"complete":{"type":"boolean","title":"Complete"},"postingStatusIntegrityErrors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Postingstatusintegrityerrors"}},"type":"object","required":["entries","total","offset","limit","complete"],"title":"UnifiedJournalEntriesListResponse","description":"Paginated list of unified journal entries."},"UnifiedJournalEntriesSourceError":{"properties":{"sourceType":{"type":"string","title":"Sourcetype"},"sourceLabel":{"type":"string","title":"Sourcelabel"},"errorType":{"type":"string","title":"Errortype"},"message":{"type":"string","title":"Message"}},"type":"object","required":["sourceType","sourceLabel","errorType","message"],"title":"UnifiedJournalEntriesSourceError","description":"Computed-source diagnostic for the unified journal entries list."},"UnifiedJournalEntryRow":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"sourceType":{"type":"string","title":"Sourcetype"},"sourceTypeLabel":{"type":"string","title":"Sourcetypelabel"},"periodYear":{"type":"integer","title":"Periodyear"},"periodMonth":{"type":"integer","title":"Periodmonth"},"periodLabel":{"type":"string","title":"Periodlabel"},"totalDebits":{"type":"number","title":"Totaldebits"},"totalCredits":{"type":"number","title":"Totalcredits"},"entryCount":{"type":"integer","title":"Entrycount"},"sourceItemCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sourceitemcount"},"lineCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Linecount"},"status":{"type":"string","title":"Status"},"postingStatus":{"anyOf":[{"$ref":"#/components/schemas/PostingStatus"},{"type":"null"}]},"qboDeliveryStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbodeliverystatus"},"jeDate":{"type":"string","title":"Jedate"},"jeMemo":{"type":"string","title":"Jememo"},"referenceUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referenceurl"},"exclusionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclusionid"},"exclusionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclusionreason"},"excludedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excludedbyemail"},"excludedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excludedat"},"expectedTotalDebits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expectedtotaldebits"},"expectedTotalCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expectedtotalcredits"},"expectedEntryCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expectedentrycount"},"postedJournalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postedjournalentryid"},"qboJournalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbojournalentryid"},"qboJournalEntryRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbojournalentryref"},"entryRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entryref","description":"Exact identifier accepted by journal-entry detail reads, when complete.","readOnly":true},"entryKind":{"anyOf":[{"type":"string","enum":["computed_period","generated_receipt","manual","imported"]},{"type":"null"}],"title":"Entrykind","description":"Classify an exact detail identity by ownership, when one exists.","readOnly":true},"journalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Journalentryid","description":"Return the durable journal-entry owner id, when materialized.","readOnly":true}},"type":"object","required":["id","companyId","sourceType","sourceTypeLabel","periodYear","periodMonth","periodLabel","totalDebits","totalCredits","entryCount","status","jeDate","jeMemo","entryRef","entryKind","journalEntryId"],"title":"UnifiedJournalEntryRow","description":"A row in the unified journal entries list. Each row = one source type + one month."},"UniqueRevenueSegmentsResponse":{"properties":{"revenueSegments":{"items":{"type":"string"},"type":"array","title":"Revenuesegments"}},"type":"object","required":["revenueSegments"],"title":"UniqueRevenueSegmentsResponse","description":"List of revenue segment keys known to the company."},"UnlinkMovementResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"unlinkedTransactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlinkedtransactionid"}},"type":"object","required":["success","message"],"title":"UnlinkMovementResponse"},"UnreconcileRequest":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"UnreconcileRequest","description":"Request body for withdrawing an open-period reconciliation assertion."},"UpdateAccountRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Description"},"semanticRoles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Semanticroles"}},"additionalProperties":false,"type":"object","title":"UpdateAccountRequest","description":"Request body for mutable account metadata."},"UpdateChannelPreferencesRequest":{"properties":{"slackEnabled":{"type":"boolean","title":"Slackenabled"},"emailEnabled":{"type":"boolean","title":"Emailenabled"},"smsEnabled":{"type":"boolean","title":"Smsenabled","default":false},"whatsappEnabled":{"type":"boolean","title":"Whatsappenabled","default":false}},"type":"object","required":["slackEnabled","emailEnabled"],"title":"UpdateChannelPreferencesRequest","description":"Body for PUT /{company_id}/preferences."},"UpdateClearingAccountRequest":{"properties":{"cashAccountId":{"type":"string","minLength":1,"title":"Cashaccountid"}},"additionalProperties":false,"type":"object","required":["cashAccountId"],"title":"UpdateClearingAccountRequest","description":"Set the COA account Porter credits when a charge from this processor lands."},"UpdateCloseItemRequest":{"properties":{"status":{"type":"string","title":"Status"},"resolutionType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolutiontype"},"resolutionNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolutionnote"}},"type":"object","required":["status"],"title":"UpdateCloseItemRequest","description":"Request to update one generated close checklist item."},"UpdateClosePeriodRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"attentionCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attentioncount"}},"type":"object","title":"UpdateClosePeriodRequest","description":"Request to update a close period."},"UpdateConversationRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"visibility":{"anyOf":[{"type":"string","enum":["private","company"]},{"type":"null"}],"title":"Visibility"}},"type":"object","title":"UpdateConversationRequest","description":"Request to update a conversation."},"UpdateManualJERequest":{"properties":{"entryDate":{"type":"string","title":"Entrydate"},"memo":{"type":"string","title":"Memo"},"lines":{"items":{"$ref":"#/components/schemas/ManualJELineInput"},"type":"array","minItems":2,"title":"Lines"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"supportingDetails":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supportingdetails"},"referenceUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referenceurl"},"supportingDocumentIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supportingdocumentids"}},"additionalProperties":false,"type":"object","required":["entryDate","memo","lines"],"title":"UpdateManualJERequest","description":"Full replacement request for an editable manual journal-entry draft."},"UpdateManualJEResponse":{"properties":{"id":{"type":"string","title":"Id"},"memo":{"type":"string","title":"Memo"},"entryDate":{"type":"string","title":"Entrydate"},"status":{"type":"string","title":"Status"},"totalDebits":{"type":"number","title":"Totaldebits"},"totalCredits":{"type":"number","title":"Totalcredits"},"lineCount":{"type":"integer","title":"Linecount"},"supportingDocumentIds":{"items":{"type":"string"},"type":"array","title":"Supportingdocumentids"}},"type":"object","required":["id","memo","entryDate","status","totalDebits","totalCredits","lineCount"],"title":"UpdateManualJEResponse","description":"Response after updating an editable manual journal-entry draft."},"UpdateNotificationResolutionRequest":{"properties":{"resolutionStatus":{"type":"string","enum":["needs_action","handled","dismissed"],"title":"Resolutionstatus"}},"type":"object","required":["resolutionStatus"],"title":"UpdateNotificationResolutionRequest","description":"Explicit action state; deliberately independent from read state."},"UpdatePaymentSettlementAccountRequest":{"properties":{"cashAccountId":{"type":"string","title":"Cashaccountid"}},"type":"object","required":["cashAccountId"],"title":"UpdatePaymentSettlementAccountRequest","description":"Body for changing a payment's settlement (cash/clearing/bank) account."},"UpdatePhoneNumberRequest":{"properties":{"phoneNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phonenumber"}},"type":"object","title":"UpdatePhoneNumberRequest"},"UpdateRoleRequest":{"properties":{"roleId":{"type":"string","title":"Roleid"}},"additionalProperties":false,"type":"object","required":["roleId"],"title":"UpdateRoleRequest","description":"Request to assign an exact role identity."},"UpdateScheduleResponse":{"properties":{"schedule":{"$ref":"#/components/schemas/ScheduleResponse"},"recalculation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recalculation"}},"type":"object","required":["schedule"],"title":"UpdateScheduleResponse","description":"Response after updating a schedule."},"UpdateSemanticRolesRequest":{"properties":{"semanticRoles":{"items":{"type":"string"},"type":"array","title":"Semanticroles"}},"type":"object","title":"UpdateSemanticRolesRequest","description":"Request body for user-curated account semantic roles."},"UpdateStatusRequest":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"UpdateStatusRequest","description":"Request to manually change a bank transaction's status.\n\nReason: POR-244 — editable status pill in detail drawer. Users can move transactions\nbetween workflow statuses with guardrails (preconditions and system-only restrictions)."},"UpdateSyncStartDateRequest":{"properties":{"syncStartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Syncstartdate"}},"type":"object","title":"UpdateSyncStartDateRequest","description":"Request body for updating sync_start_date."},"UpdateTenderAccountRequest":{"properties":{"accountId":{"type":"string","minLength":1,"title":"Accountid"}},"additionalProperties":false,"type":"object","required":["accountId"],"title":"UpdateTenderAccountRequest","description":"Choose an existing COA account for one non-clearing tender kind."},"UpdateTransactionRequest":{"properties":{"ruleExceptions":{"items":{"$ref":"#/components/schemas/RuleExceptionRequest"},"type":"array","title":"Ruleexceptions"},"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"proposedAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaccountid"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"cardholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cardholder"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"}},"type":"object","title":"UpdateTransactionRequest","description":"Request to update a credit card transaction.\n\nReason: Allows partial updates to transaction fields from the detail drawer."},"UploadResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"billDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billdate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"lineItems":{"items":{"$ref":"#/components/schemas/ExtractedLineItem"},"type":"array","title":"Lineitems"},"extractionConfidence":{"type":"string","title":"Extractionconfidence"},"missingFields":{"items":{"type":"string"},"type":"array","title":"Missingfields"},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentid"},"billId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billid"},"billStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billstatus"},"createdDraft":{"type":"boolean","title":"Createddraft","default":false},"updatedDraft":{"type":"boolean","title":"Updateddraft","default":false}},"type":"object","required":["filename","extractionConfidence"],"title":"UploadResponse","description":"Response from bill PDF upload with extracted data."},"UserEmailAddressResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"isPrimary":{"type":"boolean","title":"Isprimary"}},"type":"object","required":["id","email","isPrimary"],"title":"UserEmailAddressResponse"},"UserProfileResponse":{"properties":{"phoneNumbers":{"items":{"$ref":"#/components/schemas/VerifiedPhoneNumberResponse"},"type":"array","title":"Phonenumbers"},"smsCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smscompanyid"},"pendingPhoneNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pendingphonenumber"},"pendingPhoneNumberExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pendingphonenumberexpiresat"},"porterAiContact":{"$ref":"#/components/schemas/PorterAiContactResponse"}},"type":"object","title":"UserProfileResponse"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"profileImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profileimageurl"},"approvalStatus":{"type":"string","title":"Approvalstatus"},"essentialView":{"type":"boolean","title":"Essentialview"},"isInternal":{"type":"boolean","title":"Isinternal"},"canFindAnyCompany":{"type":"boolean","title":"Canfindanycompany"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","email","firstName","lastName","profileImageUrl","approvalStatus","essentialView","isInternal","canFindAnyCompany","createdAt","updatedAt"],"title":"UserResponse"},"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"},"VendorApAgingBuckets":{"properties":{"current":{"type":"number","title":"Current","default":0.0},"days130":{"type":"number","title":"Days130","default":0.0},"days3160":{"type":"number","title":"Days3160","default":0.0},"days6190":{"type":"number","title":"Days6190","default":0.0},"days90Plus":{"type":"number","title":"Days90Plus","default":0.0}},"type":"object","title":"VendorApAgingBuckets","description":"Open A/P for this vendor split by days past due."},"VendorCreate":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"qboVendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbovendorid"},"externalIds":{"items":{"type":"string"},"type":"array","title":"Externalids"},"vendorType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendortype"},"defaultAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultaccountid"},"defaultAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultaccountname"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","default":[]}},"type":"object","required":["name"],"title":"VendorCreate","description":"Create vendor request."},"VendorCreditCreate":{"properties":{"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"billDate":{"type":"string","title":"Billdate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"type":"number","title":"Amount"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms"},"lineItems":{"items":{"$ref":"#/components/schemas/BillLineItem"},"type":"array","title":"Lineitems"},"effectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effectivedate"}},"type":"object","required":["billDate","amount","lineItems"],"title":"VendorCreditCreate","description":"Request body for creating a vendor credit."},"VendorCreditMatchSuggestion":{"properties":{"vendorCredit":{"$ref":"#/components/schemas/BillReadModel"},"remainingCreditAmount":{"type":"number","title":"Remainingcreditamount"},"suggestedAmount":{"type":"number","title":"Suggestedamount"},"amountDifference":{"type":"number","title":"Amountdifference"},"matchStrength":{"type":"string","title":"Matchstrength"}},"type":"object","required":["vendorCredit","remainingCreditAmount","suggestedAmount","amountDifference","matchStrength"],"title":"VendorCreditMatchSuggestion","description":"Suggestion for applying an existing vendor credit to a bill."},"VendorListResponse":{"properties":{"vendors":{"items":{"$ref":"#/components/schemas/VendorReadModel"},"type":"array","title":"Vendors"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["vendors","total","offset","limit"],"title":"VendorListResponse","description":"Vendor list response with pagination info."},"VendorMerge":{"properties":{"sourceVendorIds":{"items":{"type":"string"},"type":"array","title":"Sourcevendorids"},"targetVendorId":{"type":"string","title":"Targetvendorid"}},"type":"object","required":["sourceVendorIds","targetVendorId"],"title":"VendorMerge","description":"Merge vendors request - combine duplicates."},"VendorReadModel":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"name":{"type":"string","title":"Name"},"normalizedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalizedname"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"qboVendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbovendorid"},"externalIds":{"items":{"type":"string"},"type":"array","title":"Externalids"},"vendorType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendortype"},"defaultAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultaccountid"},"defaultAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultaccountname"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","default":[]},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"},"transactionCount":{"type":"integer","title":"Transactioncount","default":0},"totalSpent":{"type":"number","title":"Totalspent","default":0},"supplierEvidenceStatus":{"type":"string","enum":["supplier","confirmed_non_supplier","unresolved"],"title":"Supplierevidencestatus","default":"unresolved"},"taxYear":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Taxyear"},"taxCandidateStatus":{"type":"string","title":"Taxcandidatestatus","default":"no_current_need"},"taxFormStatus":{"type":"string","title":"Taxformstatus","default":"missing"},"taxResidency":{"type":"string","title":"Taxresidency","default":"unknown"},"taxFilingEligibility":{"type":"string","title":"Taxfilingeligibility","default":"unknown"},"taxRequestStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxrequeststatus"},"taxPayeeRelationship":{"type":"string","title":"Taxpayeerelationship","default":"unknown"},"taxReviewReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxreviewreason"},"taxQualifyingAmount":{"type":"number","title":"Taxqualifyingamount","default":0},"taxExcludedCardAmount":{"type":"number","title":"Taxexcludedcardamount","default":0},"taxReviewAmount":{"type":"number","title":"Taxreviewamount","default":0}},"type":"object","required":["id","companyId","name","createdAt","updatedAt"],"title":"VendorReadModel","description":"Vendor read/display projection with computed rollup fields."},"VendorRelationshipBill":{"properties":{"id":{"type":"string","title":"Id"},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenumber"},"billDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billdate"},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duedate"},"amount":{"type":"number","title":"Amount","default":0.0},"amountDue":{"type":"number","title":"Amountdue","default":0.0},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["id"],"title":"VendorRelationshipBill","description":"A single recent bill row for the drawer activity list."},"VendorRelationshipSummary":{"properties":{"vendorId":{"type":"string","title":"Vendorid"},"vendorName":{"type":"string","title":"Vendorname"},"totalBilled":{"type":"number","title":"Totalbilled","default":0.0},"totalPaid":{"type":"number","title":"Totalpaid","default":0.0},"totalOwed":{"type":"number","title":"Totalowed","default":0.0},"billCount":{"type":"integer","title":"Billcount","default":0},"openBillCount":{"type":"integer","title":"Openbillcount","default":0},"firstBillDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstbilldate"},"lastBillDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastbilldate"},"aging":{"$ref":"#/components/schemas/VendorApAgingBuckets"},"recentBills":{"items":{"$ref":"#/components/schemas/VendorRelationshipBill"},"type":"array","title":"Recentbills"}},"type":"object","required":["vendorId","vendorName"],"title":"VendorRelationshipSummary","description":"Relationship overview for one vendor (spend + A/P + recent bills)."},"VendorTaxRefreshResult":{"properties":{"taxYear":{"type":"integer","title":"Taxyear"},"evaluatedPaymentCount":{"type":"integer","title":"Evaluatedpaymentcount"},"evaluatedVendorCount":{"type":"integer","title":"Evaluatedvendorcount"},"ruleVersion":{"type":"string","title":"Ruleversion"}},"type":"object","required":["taxYear","evaluatedPaymentCount","evaluatedVendorCount","ruleVersion"],"title":"VendorTaxRefreshResult"},"VendorUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"qboVendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qbovendorid"},"externalIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Externalids"},"vendorType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendortype"},"defaultAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultaccountid"},"defaultAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultaccountname"},"aliases":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Aliases"},"taxPayeeRelationship":{"anyOf":[{"type":"string","enum":["unknown","employee","nonemployee"]},{"type":"null"}],"title":"Taxpayeerelationship"}},"type":"object","title":"VendorUpdate","description":"Update vendor request."},"VendorsResponse":{"properties":{"vendors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Vendors"}},"type":"object","required":["vendors"],"title":"VendorsResponse"},"VerifiedPhoneNumberResponse":{"properties":{"phoneNumber":{"type":"string","title":"Phonenumber"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verifiedat"}},"type":"object","required":["phoneNumber"],"title":"VerifiedPhoneNumberResponse"},"VerifyAuditEmailChallengeRequest":{"properties":{"challengeId":{"type":"string","maxLength":128,"minLength":32,"title":"Challengeid"},"codeDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Codedigest"}},"type":"object","required":["challengeId","codeDigest"],"title":"VerifyAuditEmailChallengeRequest"},"VoidInvoiceRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"effectiveDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effectivedate"}},"type":"object","title":"VoidInvoiceRequest","description":"Request body for voiding an invoice."},"VoidRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"VoidRequest","description":"Request body for voiding a bill."},"WorkflowBrokenLinkResponse":{"properties":{"sourceKind":{"type":"string","title":"Sourcekind"},"sourceKey":{"type":"string","title":"Sourcekey"},"targetKind":{"type":"string","title":"Targetkind"},"targetType":{"type":"string","title":"Targettype"},"targetId":{"type":"string","title":"Targetid"},"required":{"type":"boolean","title":"Required"},"resolution":{"type":"string","title":"Resolution"},"relationshipId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationshipid"}},"type":"object","required":["sourceKind","sourceKey","targetKind","targetType","targetId","required","resolution"],"title":"WorkflowBrokenLinkResponse"},"WorkflowDefinitionArchiveSummary":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"workflowKey":{"type":"string","title":"Workflowkey"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"status":{"type":"string","title":"Status"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activeversionid"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","companyId","workflowKey","title","status"],"title":"WorkflowDefinitionArchiveSummary"},"WorkflowDefinitionDeleteResultResponse":{"properties":{"definition":{"$ref":"#/components/schemas/WorkflowDefinitionArchiveSummary"},"retiredVersion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Retiredversion"},"archived":{"type":"boolean","title":"Archived","default":true},"deletedCount":{"type":"integer","title":"Deletedcount","default":1}},"type":"object","required":["definition"],"title":"WorkflowDefinitionDeleteResultResponse"},"WorkflowDefinitionResponse":{"properties":{"id":{"type":"string","title":"Id"},"workflowKey":{"type":"string","title":"Workflowkey"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"status":{"type":"string","title":"Status"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activeversionid"},"versionId":{"type":"string","title":"Versionid"},"version":{"type":"integer","title":"Version"},"versionStatus":{"type":"string","title":"Versionstatus","default":"active"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishedversionid"},"dataAccessible":{"type":"boolean","title":"Dataaccessible","default":true},"artifactHash":{"type":"string","title":"Artifacthash"},"schemaVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schemaversion"},"objectTypes":{"items":{"$ref":"#/components/schemas/WorkflowObjectTypeResponse"},"type":"array","title":"Objecttypes"},"relationships":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Relationships"},"capabilities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Capabilities"},"automationRules":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Automationrules"},"rules":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rules"},"canonicalBindings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Canonicalbindings"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","workflowKey","title","status","versionId","version","artifactHash","objectTypes"],"title":"WorkflowDefinitionResponse"},"WorkflowDefinitionsResponse":{"properties":{"definitions":{"items":{"$ref":"#/components/schemas/WorkflowDefinitionResponse"},"type":"array","title":"Definitions"}},"type":"object","required":["definitions"],"title":"WorkflowDefinitionsResponse"},"WorkflowFieldResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description"},"required":{"type":"boolean","title":"Required","default":false},"computed":{"type":"boolean","title":"Computed","default":false},"enumValues":{"items":{"type":"string"},"type":"array","title":"Enumvalues"},"targetObjectType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetobjecttype"},"targetEntity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetentity"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Itemtype"},"itemFields":{"items":{"$ref":"#/components/schemas/WorkflowFieldResponse"},"type":"array","title":"Itemfields"},"source":{"type":"string","title":"Source","default":"source_fact"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["key","label","type","description"],"title":"WorkflowFieldResponse"},"WorkflowModelDocumentPreviewResponse":{"properties":{"objectKey":{"type":"string","title":"Objectkey"},"recordId":{"type":"string","title":"Recordid"},"templateKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Templatekey"},"templateTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Templatetitle"},"recordTitle":{"type":"string","title":"Recordtitle"},"html":{"type":"string","title":"Html"}},"type":"object","required":["objectKey","recordId","recordTitle","html"],"title":"WorkflowModelDocumentPreviewResponse"},"WorkflowModelGraph":{"properties":{"workflowKey":{"type":"string","title":"Workflowkey"},"definitionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionid"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Versionid"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"versionStatus":{"type":"string","title":"Versionstatus","default":"active"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishedversionid"},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draftversionid"},"nodes":{"items":{"$ref":"#/components/schemas/WorkflowModelGraphNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/WorkflowModelGraphEdge"},"type":"array","title":"Edges"},"layout":{"additionalProperties":true,"type":"object","title":"Layout"}},"type":"object","required":["workflowKey","nodes","edges"],"title":"WorkflowModelGraph"},"WorkflowModelGraphDocumentDataSource":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title","default":""},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["key"],"title":"WorkflowModelGraphDocumentDataSource"},"WorkflowModelGraphDocumentMethod":{"properties":{"name":{"type":"string","title":"Name"},"tool":{"type":"string","title":"Tool"},"category":{"type":"string","title":"Category","default":"query"}},"type":"object","required":["name","tool"],"title":"WorkflowModelGraphDocumentMethod"},"WorkflowModelGraphDocumentTemplate":{"properties":{"key":{"type":"string","title":"Key","default":"document"},"title":{"type":"string","title":"Title","default":"Document Template"},"description":{"type":"string","title":"Description","default":""},"renderable":{"type":"boolean","title":"Renderable","default":true},"templateVersion":{"type":"integer","title":"Templateversion","default":1},"dataSourceCount":{"type":"integer","title":"Datasourcecount","default":0},"dataSources":{"items":{"$ref":"#/components/schemas/WorkflowModelGraphDocumentDataSource"},"type":"array","title":"Datasources"},"method":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelGraphDocumentMethod"},{"type":"null"}]},"downloadMethod":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelGraphDocumentMethod"},{"type":"null"}]},"attachMethod":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelGraphDocumentMethod"},{"type":"null"}]}},"type":"object","title":"WorkflowModelGraphDocumentTemplate"},"WorkflowModelGraphDocumentTemplateDetail":{"properties":{"key":{"type":"string","title":"Key","default":"document"},"title":{"type":"string","title":"Title","default":"Document Template"},"description":{"type":"string","title":"Description","default":""},"templateVersion":{"type":"integer","title":"Templateversion","default":1},"html":{"type":"string","title":"Html"},"css":{"type":"string","title":"Css","default":""},"dataSources":{"items":{"$ref":"#/components/schemas/WorkflowModelGraphDocumentTemplateDetailDataSource"},"type":"array","title":"Datasources"}},"type":"object","required":["html"],"title":"WorkflowModelGraphDocumentTemplateDetail"},"WorkflowModelGraphDocumentTemplateDetailDataSource":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title","default":""},"description":{"type":"string","title":"Description","default":""},"program":{"additionalProperties":true,"type":"object","title":"Program"}},"type":"object","required":["key","program"],"title":"WorkflowModelGraphDocumentTemplateDetailDataSource"},"WorkflowModelGraphDocumentTemplateDetailResponse":{"properties":{"objectKey":{"type":"string","title":"Objectkey"},"documentTemplate":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelGraphDocumentTemplateDetail"},{"type":"null"}]}},"type":"object","required":["objectKey"],"title":"WorkflowModelGraphDocumentTemplateDetailResponse"},"WorkflowModelGraphEdge":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"label":{"type":"string","title":"Label"},"kind":{"type":"string","title":"Kind"},"cardinality":{"type":"string","title":"Cardinality"}},"type":"object","required":["source","target","label","kind","cardinality"],"title":"WorkflowModelGraphEdge"},"WorkflowModelGraphField":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description","default":""},"required":{"type":"boolean","title":"Required","default":false},"computed":{"type":"boolean","title":"Computed","default":false},"enumValues":{"items":{"type":"string"},"type":"array","title":"Enumvalues"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"targetObjectType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetobjecttype"},"targetEntity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetentity"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Itemtype"},"optionsSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optionssource"},"source":{"type":"string","title":"Source","default":"source_fact"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["key","label","type"],"title":"WorkflowModelGraphField"},"WorkflowModelGraphFieldUpdateRequest":{"properties":{"key":{"type":"string","title":"Key"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"enumValues":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enumvalues"}},"type":"object","required":["key"],"title":"WorkflowModelGraphFieldUpdateRequest"},"WorkflowModelGraphNode":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"pluralLabel":{"type":"string","title":"Plurallabel","default":""},"description":{"type":"string","title":"Description","default":""},"kind":{"type":"string","title":"Kind"},"documentTemplate":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelGraphDocumentTemplate"},{"type":"null"}]},"documentTemplates":{"items":{"$ref":"#/components/schemas/WorkflowModelGraphDocumentTemplate"},"type":"array","title":"Documenttemplates"},"fields":{"items":{"$ref":"#/components/schemas/WorkflowModelGraphField"},"type":"array","title":"Fields"}},"type":"object","required":["id","label","kind"],"title":"WorkflowModelGraphNode"},"WorkflowModelGraphObjectUpdateRequest":{"properties":{"workflowKey":{"type":"string","title":"Workflowkey"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"pluralLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plurallabel"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"fields":{"items":{"$ref":"#/components/schemas/WorkflowModelGraphFieldUpdateRequest"},"type":"array","title":"Fields"},"documentTemplate":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Documenttemplate"},"documentTemplates":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Documenttemplates"},"clearDocumentTemplate":{"type":"boolean","title":"Cleardocumenttemplate","default":false},"clearDocumentTemplateKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleardocumenttemplatekey"}},"type":"object","required":["workflowKey"],"title":"WorkflowModelGraphObjectUpdateRequest"},"WorkflowModelGraphsResponse":{"properties":{"graphs":{"items":{"$ref":"#/components/schemas/WorkflowModelGraph"},"type":"array","title":"Graphs"}},"type":"object","required":["graphs"],"title":"WorkflowModelGraphsResponse"},"WorkflowModelLayoutSaveRequest":{"properties":{"workflowKey":{"type":"string","title":"Workflowkey"},"layout":{"additionalProperties":true,"type":"object","title":"Layout"}},"type":"object","required":["workflowKey"],"title":"WorkflowModelLayoutSaveRequest"},"WorkflowModelLayoutSaveResponse":{"properties":{"layout":{"additionalProperties":true,"type":"object","title":"Layout"}},"type":"object","required":["layout"],"title":"WorkflowModelLayoutSaveResponse"},"WorkflowModelRequiredTestsResponse":{"properties":{"status":{"type":"string","title":"Status"},"enforced":{"type":"boolean","title":"Enforced"}},"type":"object","required":["status","enforced"],"title":"WorkflowModelRequiredTestsResponse"},"WorkflowModelTestCaseResponse":{"properties":{"id":{"type":"string","title":"Id"},"caseId":{"type":"string","title":"Caseid"},"category":{"type":"string","title":"Category"},"title":{"type":"string","title":"Title"},"successCriteria":{"type":"string","title":"Successcriteria"},"required":{"type":"boolean","title":"Required","default":true},"status":{"type":"string","title":"Status"},"request":{"additionalProperties":true,"type":"object","title":"Request"},"assertion":{"additionalProperties":true,"type":"object","title":"Assertion"}},"type":"object","required":["id","caseId","category","title","successCriteria","status"],"title":"WorkflowModelTestCaseResponse"},"WorkflowModelTestRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"definitionId":{"type":"string","title":"Definitionid"},"definitionVersionId":{"type":"string","title":"Definitionversionid"},"suiteId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suiteid"},"suiteKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suitekey"},"dryRunMode":{"type":"string","title":"Dryrunmode"},"status":{"type":"string","title":"Status"},"totalCount":{"type":"integer","title":"Totalcount"},"passedCount":{"type":"integer","title":"Passedcount"},"failedCount":{"type":"integer","title":"Failedcount"},"dryRun":{"additionalProperties":true,"type":"object","title":"Dryrun"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startedat"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completedat"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","companyId","definitionId","definitionVersionId","dryRunMode","status","totalCount","passedCount","failedCount"],"title":"WorkflowModelTestRunResponse"},"WorkflowModelTestSuiteResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"definitionId":{"type":"string","title":"Definitionid"},"suiteKey":{"type":"string","title":"Suitekey"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"required":{"type":"boolean","title":"Required","default":true},"status":{"type":"string","title":"Status"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"latestRun":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelTestRunResponse"},{"type":"null"}]},"caseCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Casecount"},"cases":{"items":{"$ref":"#/components/schemas/WorkflowModelTestCaseResponse"},"type":"array","title":"Cases"}},"type":"object","required":["id","companyId","definitionId","suiteKey","title","status"],"title":"WorkflowModelTestSuiteResponse"},"WorkflowModelTestsResponse":{"properties":{"workflowKey":{"type":"string","title":"Workflowkey"},"definitionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionid"},"definitionVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionversionid"},"definitionVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Definitionversion"},"definitionVersionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definitionversionstatus"},"latestRun":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelTestRunResponse"},{"type":"null"}]},"requiredTests":{"anyOf":[{"$ref":"#/components/schemas/WorkflowModelRequiredTestsResponse"},{"type":"null"}]},"total":{"type":"integer","title":"Total","default":0},"suites":{"items":{"$ref":"#/components/schemas/WorkflowModelTestSuiteResponse"},"type":"array","title":"Suites"}},"type":"object","required":["workflowKey"],"title":"WorkflowModelTestsResponse"},"WorkflowObjectDocumentTemplateResponse":{"properties":{"key":{"type":"string","title":"Key","default":"document"},"title":{"type":"string","title":"Title","default":"Document Template"},"description":{"type":"string","title":"Description","default":""},"renderable":{"type":"boolean","title":"Renderable","default":true},"templateVersion":{"type":"integer","title":"Templateversion","default":1},"dataSourceCount":{"type":"integer","title":"Datasourcecount","default":0}},"type":"object","title":"WorkflowObjectDocumentTemplateResponse"},"WorkflowObjectTypeResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"pluralLabel":{"type":"string","title":"Plurallabel"},"description":{"type":"string","title":"Description"},"fields":{"items":{"$ref":"#/components/schemas/WorkflowFieldResponse"},"type":"array","title":"Fields"},"reviewRequiredByDefault":{"type":"boolean","title":"Reviewrequiredbydefault","default":true},"documentTemplate":{"anyOf":[{"$ref":"#/components/schemas/WorkflowObjectDocumentTemplateResponse"},{"type":"null"}]},"documentTemplates":{"items":{"$ref":"#/components/schemas/WorkflowObjectDocumentTemplateResponse"},"type":"array","title":"Documenttemplates"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"recordCount":{"type":"integer","title":"Recordcount","default":0}},"type":"object","required":["key","label","pluralLabel","description","fields"],"title":"WorkflowObjectTypeResponse"},"WorkflowRecordFileDiscardResponse":{"properties":{"mediaId":{"type":"string","title":"Mediaid"},"discarded":{"type":"boolean","title":"Discarded","default":true}},"type":"object","required":["mediaId"],"title":"WorkflowRecordFileDiscardResponse"},"WorkflowRecordFileDownloadResponse":{"properties":{"url":{"type":"string","title":"Url"},"expiresInSeconds":{"type":"integer","title":"Expiresinseconds"}},"type":"object","required":["url","expiresInSeconds"],"title":"WorkflowRecordFileDownloadResponse"},"WorkflowRecordFileFinalizeRequest":{"properties":{"mediaId":{"type":"string","title":"Mediaid"},"filename":{"type":"string","title":"Filename"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contenttype"}},"type":"object","required":["mediaId","filename"],"title":"WorkflowRecordFileFinalizeRequest"},"WorkflowRecordFilePrepareRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contenttype"}},"type":"object","required":["filename"],"title":"WorkflowRecordFilePrepareRequest"},"WorkflowRecordFilePrepareResponse":{"properties":{"mediaId":{"type":"string","title":"Mediaid"},"filename":{"type":"string","title":"Filename"},"contentType":{"type":"string","title":"Contenttype"},"uploadUrl":{"type":"string","title":"Uploadurl"},"maxBytes":{"type":"integer","title":"Maxbytes"}},"type":"object","required":["mediaId","filename","contentType","uploadUrl","maxBytes"],"title":"WorkflowRecordFilePrepareResponse"},"WorkflowRecordPatchRequest":{"properties":{"values":{"additionalProperties":true,"type":"object","title":"Values"}},"type":"object","title":"WorkflowRecordPatchRequest"},"WorkflowRecordRelationshipPatchRequest":{"properties":{"targetKind":{"type":"string","enum":["workflow_record","canonical_record"],"title":"Targetkind","default":"workflow_record"},"targetRecordId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetrecordid"},"targetEntity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetentity"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetid"}},"type":"object","title":"WorkflowRecordRelationshipPatchRequest"},"WorkflowRecordResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"definitionId":{"type":"string","title":"Definitionid"},"definitionVersionId":{"type":"string","title":"Definitionversionid"},"objectTypeKey":{"type":"string","title":"Objecttypekey"},"values":{"additionalProperties":true,"type":"object","title":"Values"},"derivedValues":{"additionalProperties":true,"type":"object","title":"Derivedvalues"},"reviewStatus":{"type":"string","title":"Reviewstatus","default":"needs_review"},"createdBySource":{"type":"string","title":"Createdbysource","default":"mcp"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"relationships":{"items":{"$ref":"#/components/schemas/WorkflowRelationshipResponse"},"type":"array","title":"Relationships"},"brokenRelationships":{"items":{"$ref":"#/components/schemas/WorkflowBrokenLinkResponse"},"type":"array","title":"Brokenrelationships"}},"type":"object","required":["id","companyId","definitionId","definitionVersionId","objectTypeKey"],"title":"WorkflowRecordResponse"},"WorkflowRecordsResponse":{"properties":{"records":{"items":{"$ref":"#/components/schemas/WorkflowRecordResponse"},"type":"array","title":"Records"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["records","total"],"title":"WorkflowRecordsResponse"},"WorkflowRelationshipResponse":{"properties":{"id":{"type":"string","title":"Id"},"companyId":{"type":"string","title":"Companyid"},"definitionId":{"type":"string","title":"Definitionid"},"fromRecordId":{"type":"string","title":"Fromrecordid"},"relationshipKey":{"type":"string","title":"Relationshipkey"},"targetKind":{"type":"string","title":"Targetkind"},"targetRecordId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetrecordid"},"targetEntity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetentity"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetid"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"createdByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdbyemail"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"}},"type":"object","required":["id","companyId","definitionId","fromRecordId","relationshipKey","targetKind"],"title":"WorkflowRelationshipResponse"},"WorkflowVersionOptionResponse":{"properties":{"definitionId":{"type":"string","title":"Definitionid"},"workflowKey":{"type":"string","title":"Workflowkey"},"title":{"type":"string","title":"Title"},"versionId":{"type":"string","title":"Versionid"},"version":{"type":"integer","title":"Version"},"versionStatus":{"type":"string","title":"Versionstatus"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishedversionid"},"dataAccessible":{"type":"boolean","title":"Dataaccessible","default":false},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["definitionId","workflowKey","title","versionId","version","versionStatus"],"title":"WorkflowVersionOptionResponse"},"WorkflowVersionsResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/WorkflowVersionOptionResponse"},"type":"array","title":"Versions"},"defaultVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultversionid"}},"type":"object","required":["versions"],"title":"WorkflowVersionsResponse"},"WorkspaceSaveRequest":{"properties":{"config":{"additionalProperties":true,"type":"object","title":"Config"},"expectedRevision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expectedrevision"}},"type":"object","required":["config"],"title":"WorkspaceSaveRequest"},"WorkspaceSaveResponse":{"properties":{"id":{"type":"string","title":"Id"},"modelDefinitionId":{"type":"string","title":"Modeldefinitionid"},"state":{"type":"string","title":"State"},"boundDefinitionHash":{"type":"string","title":"Bounddefinitionhash"},"workspaceHash":{"type":"string","title":"Workspacehash"},"revision":{"type":"integer","title":"Revision"}},"type":"object","required":["id","modelDefinitionId","state","boundDefinitionHash","workspaceHash","revision"],"title":"WorkspaceSaveResponse"},"WriteOffAccountsResponse":{"properties":{"badDebtAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baddebtaccountid"},"badDebtAccountName":{"type":"string","title":"Baddebtaccountname","default":"Bad Debt Expense"},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenueaccountid"},"revenueAccountName":{"type":"string","title":"Revenueaccountname","default":"Revenue"},"unbilledAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unbilledaccountid"},"unbilledAccountName":{"type":"string","title":"Unbilledaccountname","default":"Unbilled Revenue"},"availableAccounts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Availableaccounts","default":[]}},"type":"object","title":"WriteOffAccountsResponse","description":"Response with default accounts for the write-off dialog.\n\nReason: POR-275 — Frontend needs to populate account dropdowns with\ncorrect defaults based on write-off type and subscription's product type."},"WriteOffInvoiceRequest":{"properties":{"reason":{"type":"string","title":"Reason"},"effectiveDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effectivedate"},"writeOffType":{"type":"string","enum":["bad_debt","revenue_reversal"],"title":"Writeofftype","default":"bad_debt"}},"type":"object","required":["reason"],"title":"WriteOffInvoiceRequest","description":"Request body for writing off an invoice as bad debt.\n\nReason: POR-192 — Write-off requires a reason (unlike void which is optional)."},"WriteOffUnbilledRequest":{"properties":{"reason":{"type":"string","title":"Reason"},"effectiveDate":{"type":"string","format":"date","title":"Effectivedate"},"writeOffType":{"type":"string","enum":["bad_debt","revenue_reversal"],"title":"Writeofftype","default":"bad_debt"},"debitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Debitaccountid"},"creditAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creditaccountid"}},"type":"object","required":["reason","effectiveDate"],"title":"WriteOffUnbilledRequest","description":"Request body for writing off unbilled revenue on a subscription.\n\nReason: POR-274 — Supports two write-off types: bad_debt (default) and revenue_reversal.\nBad debt keeps revenue intact; revenue reversal reverses recognized revenue."},"app__api__bank_transactions__BulkCategorizeRequest":{"properties":{"transactionIds":{"items":{"type":"string"},"type":"array","title":"Transactionids"},"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorname"},"transactionType":{"anyOf":[{"$ref":"#/components/schemas/BankTransactionType"},{"type":"null"}]},"ruleExceptions":{"items":{"$ref":"#/components/schemas/BulkRuleExceptionRequest"},"type":"array","title":"Ruleexceptions"}},"type":"object","required":["transactionIds"],"title":"BulkCategorizeRequest","description":"Request to bulk update transaction categorization fields.\n\nReason: POR-1973 widened the existing bulk endpoint into the same\nrow-update boundary used by AI/MCP so account-only and party-only edits do\nnot grow separate transaction mutation surfaces."},"app__api__bank_transactions__BulkCategorizeResponse":{"properties":{"updatedCount":{"type":"integer","title":"Updatedcount"},"message":{"type":"string","title":"Message"}},"type":"object","required":["updatedCount","message"],"title":"BulkCategorizeResponse","description":"Response for bulk categorize."},"app__api__bank_transactions__BulkExcludeRequest":{"properties":{"transactionIds":{"items":{"type":"string"},"type":"array","title":"Transactionids"}},"type":"object","required":["transactionIds"],"title":"BulkExcludeRequest","description":"Request to bulk exclude transactions.\n\nReason: POR-27 requires bulk exclude action from bank transactions table."},"app__api__bank_transactions__BulkExcludeResponse":{"properties":{"excludedCount":{"type":"integer","title":"Excludedcount"},"message":{"type":"string","title":"Message"}},"type":"object","required":["excludedCount","message"],"title":"BulkExcludeResponse","description":"Response for bulk exclude."},"app__api__bank_transactions__BulkPostRequest":{"properties":{"transactionIds":{"items":{"type":"string"},"type":"array","title":"Transactionids"}},"type":"object","required":["transactionIds"],"title":"BulkPostRequest","description":"Request to bulk post transactions to QBO."},"app__api__bank_transactions__ExcludeRequest":{"properties":{"reason":{"type":"string","title":"Reason","default":"Excluded by user"}},"type":"object","title":"ExcludeRequest","description":"Request to exclude a bank transaction."},"app__api__bank_transactions__SyncResponse":{"properties":{"synced":{"type":"integer","title":"Synced"},"modified":{"type":"integer","title":"Modified"},"removed":{"type":"integer","title":"Removed"},"message":{"type":"string","title":"Message"}},"type":"object","required":["synced","modified","removed","message"],"title":"SyncResponse","description":"Response for transaction sync."},"app__api__bills__SyncResponse":{"properties":{"synced":{"type":"integer","title":"Synced"}},"type":"object","required":["synced"],"title":"SyncResponse","description":"Response for sync operations."},"app__api__companies__SuccessMessageResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SuccessMessageResponse","description":"Response model for simple success messages."},"app__api__company_users__SuccessMessageResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SuccessMessageResponse","description":"Simple success response."},"app__api__credit_cards__BulkCategorizeRequest":{"properties":{"categoryAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categoryaccountid"},"proposedAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedaccountid"},"itemIds":{"items":{"type":"string"},"type":"array","title":"Itemids"},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendorid"},"counterpartyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterpartyname"},"ruleExceptions":{"items":{"$ref":"#/components/schemas/BulkRuleExceptionRequest"},"type":"array","title":"Ruleexceptions"}},"type":"object","required":["itemIds"],"title":"BulkCategorizeRequest","description":"Request to bulk update credit card transaction fields."},"app__api__credit_cards__BulkCategorizeResponse":{"properties":{"updated":{"type":"integer","title":"Updated"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["updated","failed"],"title":"BulkCategorizeResponse","description":"Response for bulk categorize."},"app__api__credit_cards__BulkExcludeRequest":{"properties":{"itemIds":{"items":{"type":"string"},"type":"array","title":"Itemids"}},"type":"object","required":["itemIds"],"title":"BulkExcludeRequest","description":"Request to bulk exclude credit card transactions."},"app__api__credit_cards__BulkExcludeResponse":{"properties":{"excluded":{"type":"integer","title":"Excluded"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["excluded","failed"],"title":"BulkExcludeResponse","description":"Response for bulk exclude."},"app__api__credit_cards__BulkPostRequest":{"properties":{"itemIds":{"items":{"type":"string"},"type":"array","title":"Itemids"}},"type":"object","required":["itemIds"],"title":"BulkPostRequest","description":"Request to bulk post credit card transactions to QBO."},"app__api__credit_cards__ExcludeRequest":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"ExcludeRequest","description":"Request to exclude a credit card transaction."},"app__api__invoices__SyncResponse":{"properties":{"synced":{"type":"integer","title":"Synced"}},"type":"object","required":["synced"],"title":"SyncResponse","description":"Response for sync operations."},"app__api__qbo__SyncResponse":{"properties":{"synced":{"type":"integer","title":"Synced"},"failed":{"type":"integer","title":"Failed"},"job_id":{"type":"string","title":"Job Id"},"deleted":{"type":"integer","title":"Deleted","default":0}},"type":"object","required":["synced","failed","job_id"],"title":"SyncResponse"},"app__api__subscriptions__LinkCustomerRequest":{"properties":{"customerId":{"type":"string","title":"Customerid"}},"type":"object","required":["customerId"],"title":"LinkCustomerRequest","description":"Request to link subscription to customer."},"app__repositories__invoices__InvoiceModification":{"properties":{"id":{"type":"string","title":"Id"},"fieldName":{"type":"string","title":"Fieldname"},"previousValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previousvalue"},"newValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newvalue"},"modifiedAt":{"type":"string","title":"Modifiedat"},"modifiedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modifiedby"},"modifiedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modifiedbyemail"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["id","fieldName","modifiedAt"],"title":"InvoiceModification","description":"Invoice field-change history entry."},"app__services__invoices__linking__LinkCustomerRequest":{"properties":{"customerId":{"type":"string","title":"Customerid"}},"type":"object","required":["customerId"],"title":"LinkCustomerRequest","description":"Request body for linking invoice to customer."},"app__services__invoices__responses__InvoiceModification":{"properties":{"id":{"type":"string","title":"Id"},"fieldName":{"type":"string","title":"Fieldname"},"previousValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previousvalue"},"newValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Newvalue"},"modifiedAt":{"type":"string","title":"Modifiedat"}},"type":"object","required":["id","fieldName","modifiedAt"],"title":"InvoiceModification","description":"Invoice modification history entry for audit trail."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"PorterOAuth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://api.buildwithporter.com/mcp/authorize","tokenUrl":"https://api.buildwithporter.com/mcp/token","scopes":{"read:companies":"Read company and workspace metadata available to the authenticated user.","read:ledger":"Read accounting ledger, account, transaction, and reconciliation state.","read:reports":"Read financial reports, close outputs, and reporting evidence.","read:workflows":"Read finance workflow, automation, and task state.","write:transactions":"Create or update approved accounting transaction workflows.","write:workflows":"Create or update approved finance workflow and automation state.","write:settings":"Create or update approved company configuration and integration settings.","mcp:tools":"Use Porter's MCP tool surface for approved clients."}}}}}},"servers":[{"url":"https://api.buildwithporter.com","description":"Porter API"}],"externalDocs":{"description":"Porter developer resources","url":"https://buildwithporter.com/developers"},"x-porter-api-policy":{"version":"0.1.0","rate_limit":{"limit":100,"window_seconds":60},"deprecation":{"headers":["Deprecation","Sunset","Link"],"documentation":"https://buildwithporter.com/developers"}}}