{"openapi":"3.1.0","info":{"title":"POST /api/v1/advisory-firms/{firm_id}/account-map","version":"1.0.0","description":"Add an external account stub to the map"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/advisory-firms/{firm_id}/account-map":{"post":{"tags":["intercompany-cleanup"],"summary":"Add an external account stub to the map","description":"Registers an account the firm does not ingest (e.g. the parent company's card) so orphan classification can point at it.","operationId":"create_account_map_entry_api_v1_advisory_firms__firm_id__account_map_post","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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountMapEntryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_AccountMapEntryResponse_"}}}},"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 - Invalid data format","content":{"application/json":{"example":{"detail":[{"loc":["body","field"],"msg":"field required","type":"value_error.missing"}]}}}}}}}},"components":{"schemas":{"AccountMapEntryCreate":{"properties":{"display_name":{"type":"string","maxLength":255,"minLength":1,"title":"Display Name"},"entity_role":{"type":"string","title":"Entity Role","description":"operating | holding | fund | parent | external_related | other","default":"parent"},"business_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Id"},"last4":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Last4"},"account_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Account Type"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"known_description_strings":{"items":{"type":"string"},"type":"array","title":"Known Description Strings"}},"type":"object","required":["display_name"],"title":"AccountMapEntryCreate","description":"Add an external stub (e.g. parent's card we don't ingest)."},"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."},"SuccessEnvelope_AccountMapEntryResponse_":{"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/AccountMapEntryResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[AccountMapEntryResponse]"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}