{"openapi":"3.0.0","info":{"version":"v1","title":"Account Closure API","description":"Account Closure API allows the consumer to close Fortis financial accounts.\n"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/fortisbank/account-closure-api/v1"},{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/apipeople/account-closure-api/v1"},{"description":"SwaggerHub API Auto Environment","url":"https://apim.workato.com/fortispb-dev/account-closure/api/v1"},{"description":"Fortis Development Environment","url":"https://dev.api.fortisbankus.com/account-closure/api/v1"}],"tags":[{"name":"APIs","description":"A set of APIs to close financial accounts."}],"paths":{"/close":{"post":{"summary":"Close financial account","description":"This API close Fortis financial accounts given accountId & accountType and closure proof document.\n","operationId":"postAccountClosure","parameters":[{"name":"x-correlation-id","in":"header","required":true,"description":"A UUID value compliant with RFC 4122 used to identify an API Request. The value is echoed back in the response header. See [Authentication](/api/authentication/#correlation-id) for more details.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/closeAccountRequestBody"}}}},"responses":{"204":{"description":"Successful account closure response"},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"500":{"$ref":"#/components/responses/500"}},"security":[{"oAuth2_ClientCredentials":[]}],"tags":["APIs"]}}},"components":{"securitySchemes":{"oAuth2_ClientCredentials":{"type":"oauth2","description":"OAuth 2 [Client Credentials Flow](https://docs.workato.com/api-mgmt/oauth2.html#how-to-setup-oauth-2-0)","flows":{"clientCredentials":{"tokenUrl":"https://apim.workato.com/oauth2/token","scopes":{}}}}},"responses":{"400":{"description":"Bad Request.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"errorDetails":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"},{"type":"object","properties":{"code":{"example":400},"reason":{"example":"BAD_REQUEST"},"details":{"example":"Please verify input parameters."}}}]}}}]}}}},"401":{"description":"Unauthorized.\n\n  :::info 401 errors\n  There are two different error schemas for 401 errors, one when the API credentials sent are wrong or invalid and another one when the API credentials are valid but the operation is prohibited for the consumer.\n  :::\n","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"errorDetails":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"},{"type":"object","properties":{"code":{"example":401},"reason":{"example":"UNAUTHORIZED"},"details":{"example":"Permission denied."}}}]}}}]},{"type":"object","properties":{"error":{"type":"string","example":"Access to this API has been disallowed"}}}]}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"errorDetails":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"},{"type":"object","properties":{"code":{"example":404},"reason":{"example":"NOT_FOUND"},"details":{"example":"No records found."}}}]}}}]}}}},"409":{"description":"The API was unable to close the account due to an issue.\n","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"errorDetails":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"},{"type":"object","properties":{"code":{"example":409},"reason":{"example":"CONFLICT"},"details":{"example":"Core account can not be closed because it is in an inconsistent state","enum":["Core account can not be closed because it is in an inconsistent status","Core account cant not be closed, it was already closed and it's in an inconsistent status","Partial failure, please wait and resubmit."]}}}]}}}]}}}},"500":{"description":"API Internal Error.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"errorDetails":{"allOf":[{"$ref":"#/components/schemas/ErrorDetails"},{"type":"object","properties":{"code":{"example":500},"reason":{"example":"INTERNAL_SERVER_ERROR"},"details":{"example":"Internal API Error, please contact support."}}}]}}}]}}}}},"parameters":{"xCorrelationId":{"name":"x-correlation-id","in":"header","required":true,"description":"A UUID value compliant with RFC 4122 used to identify an API Request. The value is echoed back in the response header. See [Authentication](/api/authentication/#correlation-id) for more details.","schema":{"type":"string","minLength":36,"maxLength":36}},"xTimestamp":{"name":"x-timestamp","in":"header","required":true,"description":"The timestamp used to support the message signature. Should contain only numbers.\n:::warning  Rejected Timestamps\nRequests with timestamp > 5min will be rejected\n:::\n","schema":{"type":"string","example":"1746197323"}}},"schemas":{"closeAccountRequestBody":{"description":"JSON Payload for available check images search response.","type":"object","properties":{"accountId":{"type":"string","maxLength":16,"minLength":1,"example":1010035226},"accountType":{"type":"string","example":"D","enum":["D"]},"document":{"type":"object","properties":{"name":{"type":"string","example":"closure_proof.pdf","minLength":4},"extension":{"type":"string","example":"pdf","enum":["pdf"],"default":"pdf"},"content":{"type":"string","example":"ZG9jdW1lbnQgY29udGVudA=="}},"required":["name","content"]}},"required":["accountId","accountType","document"]},"Error":{"required":["apiName","version","correlationId","timestamp","errorDetails"],"properties":{"apiName":{"type":"string","example":"Account Closure API"},"version":{"type":"string","example":"v1"},"correlationId":{"type":"string","example":"679751e0-36ba-49a1-b992-599c75beec66"},"timestamp":{"type":"string","example":"2025-06-05T10:12:43.642286-07:00"},"errorDetails":{"type":"object","properties":{"code":{"type":"string"},"reason":{"type":"string"},"details":{"type":"string"}}}}},"ErrorDetails":{"type":"object","properties":{"code":{"type":"string","description":"HTTP standard error code."},"reason":{"type":"string","description":"Integration error identification code."},"details":{"type":"string","description":"Error description."}}}}}}