{"openapi":"3.1.0","info":{"title":"GET /api/v1/advisory-firms","version":"1.0.0","description":"List advisory firms"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/advisory-firms":{"get":{"tags":["advisory-firms"],"summary":"List advisory firms","description":"List advisory firms for a user. Defaults to the authenticated user; pass `user_id` to filter by a different user.","operationId":"list_advisory_firms_api_v1_advisory_firms_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter firms by this user's memberships","title":"User Id"},"description":"Filter firms by this user's memberships"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination","title":"Cursor"},"description":"Cursor for pagination"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Pagination limit","title":"Limit"},"description":"Pagination limit"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","description":"Pagination direction: 'next' or 'prev'","default":"next","title":"Direction"},"description":"Pagination direction: 'next' or 'prev'"},{"name":"include_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include total count (expensive - avoid if possible)","default":false,"title":"Include Total Count"},"description":"Whether to include total count (expensive - avoid if possible)"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.","title":"Sort By"},"description":"Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None."},{"name":"descending","in":"query","required":false,"schema":{"type":"boolean","description":"Sort direction: true for descending (newest/largest first), false for ascending","default":true,"title":"Descending"},"description":"Sort direction: true for descending (newest/largest first), false for ascending"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisoryFirmListResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdvisoryFirmListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdvisoryFirmResponse"},"type":"array","title":"Items","description":"List of items"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of items (null when not calculated for performance)"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Pagination limit"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for next page"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor","description":"Cursor for previous page"},"has_next":{"type":"boolean","title":"Has Next","description":"Whether there are more items"},"has_prev":{"type":"boolean","title":"Has Prev","description":"Whether there are previous items"}},"type":"object","required":["items","has_next","has_prev"],"title":"AdvisoryFirmListResponse","description":"Paginated list of advisory firms."},"AdvisoryFirmResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Firm name."},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"Firm business address."},"ein":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ein","description":"Tax Employer Identification Number."},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url","description":"URL or S3 key for the firm logo."},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id","description":"Stripe customer ID for subscription billing."},"client_messaging_enabled":{"type":"boolean","title":"Client Messaging Enabled","description":"Whether clients can use the messaging portal.","default":false},"ap_automation_enabled":{"type":"boolean","title":"Ap Automation Enabled","description":"Whether clients see the AP automation bills page in the client portal.","default":false},"client_visible_integrations":{"items":{"type":"string"},"type":"array","title":"Client Visible Integrations","description":"Integration IDs visible to clients in the client portal."},"id":{"type":"string","title":"Id","description":"Advisory firm UUID."},"slack_connected":{"type":"boolean","title":"Slack Connected","description":"Whether a Slack webhook URL is configured.","default":false},"slack_webhook_url_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slack Webhook Url Masked","description":"Masked Slack webhook URL (never exposes the full secret)."}},"type":"object","required":["name","id"],"title":"AdvisoryFirmResponse","description":"Response schema for an advisory firm.","example":{"address":"100 Financial District, Suite 500, San Francisco, CA 94105","ein":"12-3456789","id":"019ab37c-firm-7000-8000-000000000001","name":"Smith & Associates CPA","slack_connected":false,"stripe_customer_id":"cus_abc123xyz"}},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}