Saves a quote on a file, or changes one already saved, and prices it again. Use it for "save this as FHA 6.5 with seller credit", "keep that one", "update the FHA scenario to 7%", "make the conventional one the main scenario". Give `name` to create a new one and `scenario` to change an existing one; only the fields you pass change, the rest stay as they were. The main scenario is the one the file shows and the one the pre-approval letter is written from, and there is only one per file. To price without saving use price_scenario, to see what is saved view_scenarios, and to put two side by side compare_scenarios.
purchase_pricenumber- Purchase price or appraised value, in USD
down_payment_percentagenumber- Down payment as a percent of the purchase price
down_paymentnumber- Down payment in USD. When both this and the percentage are given, this one wins.
ratenumber- Interest rate, in percent (7 means 7%)
term_monthsinteger- Loan term in months: 360 for a 30-year
programstring- Loan program
underwritingstring- Whether the file is approved by the automated system (aus) or underwritten manually. It changes the FHA ratio caps.
interest_onlyboolean- Whether the payment is interest only
credit_scoreinteger- Representative FICO score, used to pick the MI factor
hoa_monthlynumber- HOA dues per month, in USD
property_taxes_annualnumber- Yearly property taxes in USD. Leave it out to estimate them from the purchase price.
hazard_annualnumber- Yearly hazard insurance in USD. Leave it out to estimate it from the purchase price.
flood_annualnumber- Yearly flood insurance in USD
mi_factornumber- Yearly mortgage insurance factor, in percent of the loan amount. Leave it out to use the table on file.
finance_upfront_mipboolean- FHA only: whether the upfront MIP is rolled into the loan amount (the usual) or paid in cash at closing.
second_liennumber- Second lien or HELOC amount, in USD
second_lien_paymentnumber- Monthly payment on the second lien, in USD
origination_pointsnumber- Loan origination charge, in points (percent of loan amount)
discount_pointsnumber- Discount points paid to buy the rate down
seller_creditnumber- Seller's credit, in USD
lender_creditnumber- Lender credit, in USD
earnest_moneynumber- Earnest money already deposited, in USD
appraisal_paidnumber- Appraisal fee already paid outside closing, in USD
hap_creditnumber- Down payment assistance or HAP, in USD
heloc_creditnumber- Money coming from a HELOC, in USD
reserves_after_closingnumber- Cash reserves the borrower must keep after closing, in USD
debts_paid_at_closingnumber- Credit cards or debts being paid off at closing, in USD
income_sheetobject- Income and monthly debts of up to four borrowers, as typed in the Income tab of the calculator
fee_overridesobject- Closing-cost settings for this scenario only, on top of the account's. Same keys as set_closing_costs; what is typed here wins.
ysp_pointsnumber- Yield spread premium the lender pays, in points of the loan amount. Shown in section A but never charged to the borrower.
property_addressstring- Property address
property_zipstring- Property ZIP code
loan_type_labelstring- Free-text loan type, e.g. "CF30 Conventional 30-Year Fixed Rate"
prepayment_penaltystring- Prepayment penalty, e.g. "None" or "3/2/1"
qualification_typestring- Agency the loan is qualified under
helocobject- HELOC "Symmetry" block of the calculator
mccobject- Florida Housing MCC (mortgage credit certificate)
vacatingobject- The primary residence the borrower is leaving and will rent out
loanstring- The file this quote belongs to, as the user says it: a borrower name, a property address, a loan number or the file id. Leave it out only for a quote taken before there is a file.
scenariostring- The saved scenario to change, by its name or its id. Leave it out to save a new one.
namestring- What to call it, the way it will be asked for later: "FHA 6.5 with seller credit". Required when saving a new one; renames when changing an existing one.
principalboolean- true makes this the main scenario of the file — the one it shows and the one the pre-approval letter uses. The one that was main before stops being it. Only works on a scenario tied to a file.
cleararray- Fields to remove from the scenario, by name ("seller_credit"), for "take the seller credit off" or "go back to estimating the taxes". Anything removed goes back to being estimated or to zero.