{"openapi":"3.1.0","info":{"title":"GET /api/v1/advisory-firms/{firm_id}/account-map","version":"1.0.0","description":"Get the firm Account Master Map"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/advisory-firms/{firm_id}/account-map":{"get":{"tags":["intercompany-cleanup"],"summary":"Get the firm Account Master Map","description":"Every map entry for the firm, auto-seeded from all Plaid/Teal accounts across the firm's businesses that have no entry yet, with ingestion coverage windows computed from transaction data. Only ``entity_role`` requires human input.","operationId":"get_account_map_api_v1_advisory_firms__firm_id__account_map_get","parameters":[{"name":"firm_id","in":"path","required":true,"schema":{"type":"string","title":"Firm Id"}},{"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/SuccessEnvelope_AccountMapListResponse_"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountMapEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"advisory_firm_id":{"type":"string","title":"Advisory Firm Id"},"business_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"teal_source_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Teal Source Account Id"},"entity_role":{"type":"string","title":"Entity Role"},"display_name":{"type":"string","title":"Display Name"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"in_our_data":{"type":"boolean","title":"In Our Data"},"coverage_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coverage Start"},"coverage_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coverage End"},"known_description_strings":{"items":{"type":"string"},"type":"array","title":"Known Description Strings"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_external_stub":{"type":"boolean","title":"Is External Stub"}},"type":"object","required":["id","advisory_firm_id","entity_role","display_name","in_our_data","is_external_stub"],"title":"AccountMapEntryResponse","description":"One row of the firm Account Master Map."},"AccountMapListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AccountMapEntryResponse"},"type":"array","title":"Entries"},"count":{"type":"integer","title":"Count"},"unmapped_count":{"type":"integer","title":"Unmapped Count","description":"Entries still missing an entity_role assignment","default":0}},"type":"object","required":["count"],"title":"AccountMapListResponse","description":"The full (auto-seeded) Account Master Map for a firm."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_AccountMapListResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/AccountMapListResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[AccountMapListResponse]"},"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":[]}]}