# Left to Live Flow

A Left to Live is a mortgage calculation before or in conjunction with applying for a loan. This calculation considers a series of parameters to evaluate if the requested loan amount is acceptable giving the expected life costs, helping to ensure that an applicant won't take a loan that becomes a strain on their personal finances.

A Left to Live request is sent with some information about the applicant, like income, family size, other accommodations, etc. The result is a rating that represents how well the requested loan fits with their given situation:

- if the returned rate is positive, then the applicant can take the requested loan amount
- on the other hand, a negative value presents a loan that is considered an excessive financial burden (in this case a new loan amount is proposed, considering the applicant's situation)

As of Q2 2022, cost of cars is included in the calculation, read more in the cost of cars section.

## Response examples

Given the wide range of situations that can be expressed by a Left to Live calculation, here are some possible responses:

- a calculation with positive outcome (observe the
`success`

and`loan_amount_adjusted`

fields):`{ "debt_ratio": 1.7547, "left_to_live_value": 29912, "left_to_live_budget": 13200, "loans": [ { "loan_amount": 1175000, "interest_rate": 6.0000, "amortisation_amount": 0, "loan_type": "consumer_credit", "loan_cost": 5875 } ], "requested_loan_amount": 1175000, "success": true, "left_to_live_original_result": 16712, "left_to_live_result": 16712, "accepted_loan_amount": 1175000, "loan_amount_adjusted": false }`

- a calculation with positive outcome by means of a reduction of the offered loan compared to the requested amount
(observe the
`success`

,`loan_amount_adjusted`

,`requested_loan_amount`

and`loans[].loan_amount`

fields):`{ "debt_ratio": 2.2452, "left_to_live_value": 13224, "left_to_live_budget": 13200, "loans": [ { "loan_amount": 695218, "interest_rate": 6.0000, "amortisation_amount": 0, "loan_type": "consumer_credit", "loan_cost": 3476 } ], "requested_loan_amount": 1175000, "success": true, "left_to_live_original_result": -1656, "left_to_live_result": 24, "accepted_loan_amount": 695218, "loan_amount_adjusted": true }`

- a calculation with positive outcome by means of including a private loan to cover part of the original
requested loan amount (observe the
`success`

,`loan_amount_adjusted`

and`loans[].loan_type`

fields):`{ "debt_ratio": 1.4787, "left_to_live_value": 41814, "left_to_live_budget": 13200, "loans": [ { "loan_amount": 1700000, "interest_rate": 6.0000, "amortisation_amount": 1666, "loan_type": "consumer_credit", "loan_cost": 1917 }, { "loan_amount": 200000, "interest_rate": 11.5000, "amortisation_amount": 0, "loan_type": "blanco_loan", "loan_cost": 0 } ], "requested_loan_amount": 1900000, "success": true, "left_to_live_original_result": 28614, "left_to_live_result": 28614, "accepted_loan_amount": 1900000, "loan_amount_adjusted": false }`

- a calculation with negative outcome, due to a customer having unfavourable financial situation where not even the
minimum loan amount is offered by SBAB (observe the
`success`

and`error_message`

fields):`{ "debt_ratio": 0, "left_to_live_value": 0, "left_to_live_budget": 0, "loans": [], "requested_loan_amount": 1175000, "success": false, "error_message": "Max loan amount is less than 200000 which is minimum amount that can be lent out by SBAB", "left_to_live_original_result": -9303, "left_to_live_result": 0, "accepted_loan_amount": 0, "loan_amount_adjusted": true }`

- a failure (
`HTTP 400`

) by requesting a loan amount to collateral value ratio above the bank's limts:`[ { "message": "Loan Amount too high compared to Collateral Value. Maximum ratio is 95%, calculated loan distribution values: mortgage amount: 1700000 blanco amount: 200000 non approved amount: 100000", "property_path": "LoanAmount", "error_code": "Loan ratio is too high", "invalid_value": "LoanAmount: 1900000, CollateralValue: 2000000" } ]`