Get the cash-flow analysis of a bank connection
curl --request GET \
--url https://app.sahlfinancial.com/api/v1/partner/bank-connections/{connection_id}/analysis \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sahlfinancial.com/api/v1/partner/bank-connections/{connection_id}/analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sahlfinancial.com/api/v1/partner/bank-connections/{connection_id}/analysis"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"income_regularity": {
"score": 0.93,
"pattern": "monthly_25th",
"employer": "OCP GROUP",
"day_of_month": 25,
"consecutive_months": 9,
"risk": "low"
},
"risk_flags": {
"overdrafts": 0,
"bounced_checks": 0,
"gambling_transactions": 0,
"large_cash_withdrawals": 1,
"debt_payments_detected": 2,
"flagged_items": [
"Large cash withdrawal of 5000 MAD on 14/02"
]
},
"savings_rate": 0.35,
"estimated_dti": 0.31,
"avg_end_of_month_balance": 9000,
"avg_balance": 21000,
"monthly_income": 18000,
"monthly_expenses": 11700
}{
"detail": "<string>"
}{
"detail": {
"code": "bank_scope_not_allowed",
"message": "This workspace is not enabled for the partner bank API."
}
}{
"detail": "Bank connection not found"
}{
"detail": {
"code": "bank_connect_unavailable",
"message": "Bank connection is not available yet. No bank data provider is live for this workspace."
}
}{
"detail": [
{
"type": "missing",
"loc": [
"body",
"bank_code"
],
"msg": "Field required",
"input": {}
}
]
}{
"code": "rate_limit_exceeded",
"message": "Too many requests. Please slow down."
}Get the cash-flow analysis of a bank connection
Required scope: bank:read.
Growth plan. Switched on per workspace by Sahl: until then a key cannot be issued with this scope and calls answer 403 bank_scope_not_allowed. No bank data provider is live: data is a sandbox simulation (send X-Sahl-Environment: sandbox), and in production create, refresh, transactions and analysis answer 409 bank_connect_unavailable.
Simulated cash-flow analysis, sandbox only today. In production: 409 bank_connect_unavailable.
Get the cash-flow analysis of a bank connection
curl --request GET \
--url https://app.sahlfinancial.com/api/v1/partner/bank-connections/{connection_id}/analysis \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sahlfinancial.com/api/v1/partner/bank-connections/{connection_id}/analysis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.sahlfinancial.com/api/v1/partner/bank-connections/{connection_id}/analysis"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"income_regularity": {
"score": 0.93,
"pattern": "monthly_25th",
"employer": "OCP GROUP",
"day_of_month": 25,
"consecutive_months": 9,
"risk": "low"
},
"risk_flags": {
"overdrafts": 0,
"bounced_checks": 0,
"gambling_transactions": 0,
"large_cash_withdrawals": 1,
"debt_payments_detected": 2,
"flagged_items": [
"Large cash withdrawal of 5000 MAD on 14/02"
]
},
"savings_rate": 0.35,
"estimated_dti": 0.31,
"avg_end_of_month_balance": 9000,
"avg_balance": 21000,
"monthly_income": 18000,
"monthly_expenses": 11700
}{
"detail": "<string>"
}{
"detail": {
"code": "bank_scope_not_allowed",
"message": "This workspace is not enabled for the partner bank API."
}
}{
"detail": "Bank connection not found"
}{
"detail": {
"code": "bank_connect_unavailable",
"message": "Bank connection is not available yet. No bank data provider is live for this workspace."
}
}{
"detail": [
{
"type": "missing",
"loc": [
"body",
"bank_code"
],
"msg": "Field required",
"input": {}
}
]
}{
"code": "rate_limit_exceeded",
"message": "Too many requests. Please slow down."
}Authorizations
API key created in the console. Scopes: kyc:extract, kyc:verify, kyc:eid; bank:read, bank:write (Growth plan, enabled per workspace by Sahl).