{"openapi":"3.1.0","info":{"title":"AbaNinja Finances API - Bank Accounts","version":"3.0.0","x-domain-id":"finances"},"servers":[{"url":"https://api.abaninja.ch","description":"The AbaNinja API server"}],"tags":[{"name":"bank-accounts","description":"Manage bank accounts","x-displayName":"Bank Accounts"}],"security":[{"ApiToken":[]}],"paths":{"/accounts/{accountUuid}/finances/v2/bank-accounts":{"get":{"tags":["bank-accounts"],"summary":"Get bank accounts","description":"Get bank accounts of account","operationId":"finances_list_bank_accounts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"type":"array","items":{"title":"Bank Account Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankAddress":{"type":["string","null"]},"bankCity":{"type":["string","null"]},"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"qrBill":{"properties":{"active":{"type":"boolean"},"qrIban":{"type":["string","null"]},"besrId":{"type":["string","null"]}},"type":"object"},"isActive":{"type":"boolean"},"isDefault":{"type":"boolean"},"bankId":{"type":"number","format":"int64"},"bankLastSync":{"type":["string","null"],"format":"date-time"},"bankSyncStatus":{"type":["string","null"]},"bankConnectionType":{"type":["string","null"],"enum":["ABABANK","BLINK","DEEPCLOUD","OAUTH","YAPEAL","TEMPORARY"]},"accAccountUuid":{"type":"string","format":"uuid"},"paymentOrderExportStatusSetting":{"type":"string","enum":["PENDENT","FINISHED"]},"eBankingImportSetting":{"type":"string","enum":["ALL","CREDITS_ONLY","DEBITS_ONLY"]},"eBankingImportPayrolls":{"type":"boolean"},"eBankingImportCollectivePayments":{"type":"boolean"},"id":{"type":"number","format":"int64","deprecated":true}},"type":"object"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/finances"]}],"x-legacy-operation-id":"2f50ca4206d23e7df2c4784dd244a9f3","x-required-scopes":["finances"]},"post":{"tags":["bank-accounts"],"summary":"Create bank account","description":"Create a bank account for an account","operationId":"finances_create_bank_accounts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create bank account","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/bank-account.schema.json","description":"A Schema for creating bank accounts in AbaNinja","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"bankName":{"type":["null","string"],"maxLength":255},"bankAddress":{"type":["null","string"],"maxLength":255},"bankCity":{"type":["null","string"],"maxLength":255,"description":"postal code & town of the bank institute"},"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$","example":"CHF"},"qrBill":{"type":"object","properties":{"active":{"type":"boolean","default":false},"qrIban":{"type":["null","string"],"pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}"},"besrId":{"type":["null","string"],"pattern":"^[0-9]{6,8}$"}}},"isActive":{"type":"boolean","default":true,"description":"Activate/Deactivate bank account for usage in AbaNinja. Default: active"},"isDefault":{"type":"boolean","default":false,"description":"Set if bank account should be used as default."},"paymentOrderExportStatusSetting":{"type":"string","default":"FINISHED","description":"Set the status of the payment orders for this bank account when they are exported manually","enum":["FINISHED","PENDENT"]},"eBankingImportSetting":{"type":"string","default":"ALL","description":"Set which transaction types will be imported when a bank statement file is imported.","enum":["ALL","CREDITS_ONLY","DEBITS_ONLY"]},"eBankingImportPayrolls":{"type":"boolean","default":true,"description":"Control whether or not payroll transactions should be imported. Note: eBankingImportSetting has priority over this"},"eBankingImportCollectivePayments":{"type":"boolean","default":true,"description":"Control whether or not collective payment transactions should be imported. Note: eBankingImportSetting has priority over this"}},"required":["name","iban","currencyCode"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Bank Account Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankAddress":{"type":["string","null"]},"bankCity":{"type":["string","null"]},"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"qrBill":{"properties":{"active":{"type":"boolean"},"qrIban":{"type":["string","null"]},"besrId":{"type":["string","null"]}},"type":"object"},"isActive":{"type":"boolean"},"isDefault":{"type":"boolean"},"bankId":{"type":"number","format":"int64"},"bankLastSync":{"type":["string","null"],"format":"date-time"},"bankSyncStatus":{"type":["string","null"]},"bankConnectionType":{"type":["string","null"],"enum":["ABABANK","BLINK","DEEPCLOUD","OAUTH","YAPEAL","TEMPORARY"]},"accAccountUuid":{"type":"string","format":"uuid"},"paymentOrderExportStatusSetting":{"type":"string","enum":["PENDENT","FINISHED"]},"eBankingImportSetting":{"type":"string","enum":["ALL","CREDITS_ONLY","DEBITS_ONLY"]},"eBankingImportPayrolls":{"type":"boolean"},"eBankingImportCollectivePayments":{"type":"boolean"},"id":{"type":"number","format":"int64","deprecated":true}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":201},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/finances"]}],"x-legacy-operation-id":"da821be7b9aed2f563a4c75800341229","x-required-scopes":["finances"]}},"/accounts/{accountUuid}/finances/v2/bank-accounts/{bankAccountUuid}":{"get":{"tags":["bank-accounts"],"summary":"Get bank account","description":"Get bank account of account","operationId":"finances_get_bank_accounts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"bankAccountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Bank Account Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankAddress":{"type":["string","null"]},"bankCity":{"type":["string","null"]},"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"qrBill":{"properties":{"active":{"type":"boolean"},"qrIban":{"type":["string","null"]},"besrId":{"type":["string","null"]}},"type":"object"},"isActive":{"type":"boolean"},"isDefault":{"type":"boolean"},"bankId":{"type":"number","format":"int64"},"bankLastSync":{"type":["string","null"],"format":"date-time"},"bankSyncStatus":{"type":["string","null"]},"bankConnectionType":{"type":["string","null"],"enum":["ABABANK","BLINK","DEEPCLOUD","OAUTH","YAPEAL","TEMPORARY"]},"accAccountUuid":{"type":"string","format":"uuid"},"paymentOrderExportStatusSetting":{"type":"string","enum":["PENDENT","FINISHED"]},"eBankingImportSetting":{"type":"string","enum":["ALL","CREDITS_ONLY","DEBITS_ONLY"]},"eBankingImportPayrolls":{"type":"boolean"},"eBankingImportCollectivePayments":{"type":"boolean"},"id":{"type":"number","format":"int64","deprecated":true}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/finances"]}],"x-legacy-operation-id":"28db5c076b14ff5e52055ada9aae42a1","x-required-scopes":["finances"]},"patch":{"tags":["bank-accounts"],"summary":"Update bank account","description":"Update a bank account for an account","operationId":"finances_update_bank_accounts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"bankAccountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update bank account","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/bank-account.schema.json","description":"A Schema for creating bank accounts in AbaNinja","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"bankName":{"type":["null","string"],"maxLength":255},"bankAddress":{"type":["null","string"],"maxLength":255},"bankCity":{"type":["null","string"],"maxLength":255,"description":"postal code & town of the bank institute"},"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$","example":"CHF"},"qrBill":{"type":"object","properties":{"active":{"type":"boolean","default":false},"qrIban":{"type":["null","string"],"pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}"},"besrId":{"type":["null","string"],"pattern":"^[0-9]{6,8}$"}}},"isActive":{"type":"boolean","default":true,"description":"Activate/Deactivate bank account for usage in AbaNinja. Default: active"},"isDefault":{"type":"boolean","default":false,"description":"Set if bank account should be used as default."},"paymentOrderExportStatusSetting":{"type":"string","default":"FINISHED","description":"Set the status of the payment orders for this bank account when they are exported manually","enum":["FINISHED","PENDENT"]},"eBankingImportSetting":{"type":"string","default":"ALL","description":"Set which transaction types will be imported when a bank statement file is imported.","enum":["ALL","CREDITS_ONLY","DEBITS_ONLY"]},"eBankingImportPayrolls":{"type":"boolean","default":true,"description":"Control whether or not payroll transactions should be imported. Note: eBankingImportSetting has priority over this"},"eBankingImportCollectivePayments":{"type":"boolean","default":true,"description":"Control whether or not collective payment transactions should be imported. Note: eBankingImportSetting has priority over this"}},"required":["name","iban","currencyCode"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Bank Account Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"bankName":{"type":["string","null"]},"bankAddress":{"type":["string","null"]},"bankCity":{"type":["string","null"]},"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"qrBill":{"properties":{"active":{"type":"boolean"},"qrIban":{"type":["string","null"]},"besrId":{"type":["string","null"]}},"type":"object"},"isActive":{"type":"boolean"},"isDefault":{"type":"boolean"},"bankId":{"type":"number","format":"int64"},"bankLastSync":{"type":["string","null"],"format":"date-time"},"bankSyncStatus":{"type":["string","null"]},"bankConnectionType":{"type":["string","null"],"enum":["ABABANK","BLINK","DEEPCLOUD","OAUTH","YAPEAL","TEMPORARY"]},"accAccountUuid":{"type":"string","format":"uuid"},"paymentOrderExportStatusSetting":{"type":"string","enum":["PENDENT","FINISHED"]},"eBankingImportSetting":{"type":"string","enum":["ALL","CREDITS_ONLY","DEBITS_ONLY"]},"eBankingImportPayrolls":{"type":"boolean"},"eBankingImportCollectivePayments":{"type":"boolean"},"id":{"type":"number","format":"int64","deprecated":true}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/finances"]}],"x-legacy-operation-id":"8c8cfe73399698203bfc2f4d95f97e3a","x-required-scopes":["finances"]},"delete":{"tags":["bank-accounts"],"summary":"Delete bank account","description":"Delete a bank account for an account","operationId":"finances_delete_bank_accounts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"bankAccountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/finances"]}],"x-legacy-operation-id":"10aa535b7ce17c7ddf0f6294e837bcaf","x-required-scopes":["finances"]}}},"components":{"securitySchemes":{"ApiToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Create tokens in Settings > API Token."}}}}