{"openapi":"3.1.0","info":{"title":"PATCH /api/v1/advisory-firms/{firm_id}/account-map/{entry_id}","version":"1.0.0","description":"Update an account map entry"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/advisory-firms/{firm_id}/account-map/{entry_id}":{"patch":{"tags":["intercompany-cleanup"],"summary":"Update an account map entry","operationId":"update_account_map_entry_api_v1_advisory_firms__firm_id__account_map__entry_id__patch","parameters":[{"name":"firm_id","in":"path","required":true,"schema":{"type":"string","title":"Firm Id"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry 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/AccountMapEntryUpdate"}}}},"responses":{"200":{"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":{"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."},"AccountMapEntryUpdate":{"properties":{"entity_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Role"},"display_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Display Name"},"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":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Known Description Strings"}},"type":"object","title":"AccountMapEntryUpdate","description":"Patch a map entry (role assignment is the common path)."},"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":[]}]}