CalculationDetails
At the core of MRE functionality is generating reports on a calculation request. A calculation request may be sent towards a generate report endpoint, in which case the calculation request is immediately calculated against the engine's logic, or the calculation request is sent to a create session endpoint for the MyCRM integration, in which case that calculation is deferred for later and just stored in the database.
In both of those cases, the calculation request contains a Details object which defines the key input parameters for the calculation.
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$defs": {
"Lender": {
"type": [
"string",
"null"
],
"description": "The [lender (bank)](https://docs.blackfin.tools/books/mortgagerecenginemycrm/page/lenders) which the existing loan is with/from - eg. 'Westpac' this field is only present if LoanType=Existing",
"enum": [
null,
"AbodeMortgagesLimited",
"AccessHomeLoansLimited",
"Accuro",
"AIA",
"AlliedDunbar",
"AMBL",
"AMPLifetrack",
"AMPRPP",
"ANZ",
"Argosy",
"ASAPFinanceLimited",
"ASB",
"AscendFinance",
"AssetFinanceSelect",
"AsteronLife",
"AvantiFinance",
"BankofChinaNewZealandLimited",
"BasecorpFinance",
"BasecorpFinance",
"Bluestone",
"BNZ",
"CBS",
"CFML",
"ChinaConstructionBankNewZealandLimited",
"Cigna",
"CommixGroupLimited",
"CressidaCapital",
"DBR",
"DBRLimited",
"EconomyHomeLoans",
"FamilyFinance",
"FidelityLife",
"FirstMortgageTrust",
"FreedomMortgages",
"FreedomMortgagesLtd",
"GEMoney",
"GemHomeLoans",
"GeneralFinance",
"GoldBandFinance",
"Greenwich",
"HeartlandBank",
"HeartlandBankONHOLD",
"HomeTrustMortgagesCentralWestLtd",
"HSBC",
"IndustrialandCommercialBankofChinaNewZealandLimited",
"Kiwibank",
"KMMHO",
"LibertyFinancial",
"LibertyFinancialLimited",
"MARAC",
"MetroMoneyLtd",
"MortgageNorth",
"MTF",
"MutualFinanceLimited",
"NationalBank",
"NBS",
"Neo",
"NIB",
"NZFinance",
"NZGuardianTrust",
"NZCUSouth",
"NZF",
"OriginANZ",
"Other",
"OtherLenders",
"OtherNonBankLenders",
"Oxford",
"PacificHomeLoans",
"PacificRetailFinance",
"PartnersLife",
"Pepper",
"PFS",
"PinnacleLife",
"Pioneer",
"Presto",
"PropertyEquityFinance",
"PropertyFinanceSecuritiesLimited",
"PROSPA",
"Provident",
"PublicTrust",
"RESIMAC",
"SBSBank",
"SCF",
"SelectHomeLoan",
"Simplify",
"SouthernCross",
"SouthernCross",
"SouthernCrossBuildingSociety",
"SouthernCrossFinanceLtd",
"Sovereign",
"SuperBank",
"TasmanMortgages",
"TheCooperativeBank",
"Tower",
"TrustUs",
"TSB",
"UDCFinance",
"UnitedHomeLoans",
"Unity",
"Westpac",
"WizardHomeloans",
"XEMoneyTransfer",
"ZipBusiness"
],
"default": null
},
"Frequency": {
"type": "string",
"enum": [
"Yearly",
"HalfYearly",
"Quarterly",
"Monthly",
"Fortnightly",
"Weekly"
]
},
"FrequencyOrNull": {
"type": [
"string",
"null"
],
"enum": [
null,
"Yearly",
"HalfYearly",
"Quarterly",
"Monthly",
"Fortnightly",
"Weekly"
]
}
},
"title": "Mortgage Recommendation Engine - Calculation RequestDetails Payload",
"description": "Schema for calculation requestdetails fields passed into the generate report endpoint. This payload contains all the financial and property information needed to calculate mortgage recommendations across multiple lenders.",
"type": "object",
"properties": {
"Details": {
"type": "object",
"description": "Main details object containing loan and applicant party information for mortgage calculation",
"properties": {
"Loan": {
"type": "array",
"description": "Array of loan objects representing loans being applied for or existing loans. Each loan represents a mortgage application with associated security/property details.",
"items": {
"type": "object",
"description": "Loan object represents the loan user is applying for or an existing loan. Contains all loan-specific details including amount, terms, and security information.",
"properties": {
"LoanId": {
"type": "integer",
"description": "Unique identifier for the loan, starting from 1 and incremented for each loan in the request",
"minimum": 1
},
"LoanType": {
"type": "string",
"description": "Type of loan - whether it's a new application or existing loan being refinanced",
"enum": [
"New",
"Existing"
]
},
"Lender": {
"type"$ref": "string",
"description": "Name of the lender providing the loan (e.g., 'BNZ', 'ANZ', 'ASB'). Maps to [API_Lender](https://airtable.com/appK16RVohBeqXaxe/tblaNIihjJ5c4Bcsy/viwX3xYVBjz5hWj58?blocks=hide) table."#/$defs/Lender"
},
"LendingAction": {
"type": [
"string",
"null"
],
"description": "TypeDefines of lendingwhat action beingthe performed"applicant wants to take on an existing loan, only set if LoanType=Existing",
"enum": [
null,
"Purchase"None",
"Refinance",
"TopUp"
],
"Construction"]default": null
},
"LiabilityType": {
"type": "string",
"description": "TypeThe type of liability/loan.loan Forbeing mostapplied mortgage applications this will be 'HomeLoan'. Maps to [API_LiabilityType](https://airtable.com/appK16RVohBeqXaxe/tblgtZaep3FzFuO75/viw61jHaxh7QIIXiv?blocks=hide) table."for",
"enum": [
"HomeLoan"
],
"PersonalLoan",default": "CreditCard", "StudentLoan", "BusinessLoan"]HomeLoan"
},
"LoanAmount": {
"type": "number",
"description": "AmountThe amount of the loan (in $) being applied for"requested",
"minimum": 0,
"examples": [
500000,
852000]852000
]
},
"TopUpAmount": {
"type": [
"number",
"null"
],
"description": "Additional top-up amount if applicable, null if not applicable",
"minimum": 0
},
"TotalTermMonths": {
"type": "integer",
"description": "Total term length of the loan in months, including any interest-only period",
"minimum": 1,
"examples": [
360,
300,
240]240
]
},
"InterestOnlyTermMonths": {
"type": "integer",
"description": "Number of months for interest-only payments at the start of the loan term",
"minimum": 0,
"examples": [
0,
12,
24]24
]
},
"Security": {
"type": "object",
"description": "Security/property details for the loan. Contains all property-related information used for LVR calculations and risk assessment.",
"properties": {
"Value": {
"type": "number",
"description": "Value of the security/property used for LVR calculations",
"minimum": 0,
"examples": [
600000,
1170000]1170000
]
},
"IsRBNZExempt": {
"type": "boolean",
"description": "Whether the property is exempt from RBNZ (Reserve Bank of New Zealand) lending restrictions"
},
"Location": {
"type": [
"string",
"null"
],
"description": "Property location/address. Can be null for privacy or when not required",
"examples": [
"13 Zealandia Road, Whangaparaoa Auckland 0930, New Zealand",
null]null
]
},
"PropertyType": {
"type": "array",
"description": "ArrayUp to three levels of property typecategorisation. classifications.[0] Severalarray valuesitem mayis belevel used1, to[1] narrowis downlevel the2, selection[2] is level 3. See [property type](e.g.,https://docs.blackfin.tools/books/mortgagerecenginemycrm/page/loan-security-property-types) Residential Property + Terraced housing + Unit Title). Used for Max LVR calculations."table",
"items": {
"type": [
"string",
"null"
],
"enum": [
null,
"ResidentialProperty",
"CommercialProperty", "Rural", "Lifestyle"FreeHoldResidential",
"TerracedHousing",
"UnitTitle"FeeSimpleCrossLease",
"Apartment", "House"UnitTitle",
"Townhouse",
"Residential"LifestyleBlock",
"FreeHold Residential"0to10ha",
"LeaseHoldover10ha",
Residential""LeaseholdResidential",
"Apartments",
"Freehold Apartment"FreeholdApartment",
"Leasehold Apartment"over50sqm",
"Serviced Apartment"40to50sqm",
"Student Accommodation"38to40sqm",
"Vacant Land"under38sqm",
"Serviced Vacant Land"LeaseholdApartment",
"UnservicedServicedApartment",
Vacant"StudentAccommodation",
Land""BedsitterStudioWarehouseApartments",
"NewBuildConstruction",
"FixedPriceContracts",
"LabourOnlySelfOwnerBuild",
"Relocations",
"VacantLand",
"ServicedVacantLand",
"UnservicedVacantLand",
"LifestyleWithoutDwelling",
"Other",
"MultipleDwellingsOnOneTitle",
"3Dwellings",
"4Dwellings",
"5Dwellings",
"6Dwellings",
"7OrMoreDwellings"
]
},
"examples"default": [["ResidentialProperty"], ["Residential", "TerracedHousing", "UnitTitle"]]
},
"SecurityType": {
"type": "string",
"description": "Type of security -Defines whether it'sthe anSecurity existingis propertyalready owned by the Applicant or new construction"not",
"enum": [
"Existing",
"New"Proposed"
]
},
"UsageType": {
"type": [
"string",
"null"
],
"description": "How the property will be used.used Also- referred to aseg. 'PurchaseOwner type'. Affects LVR limits and lending criteria.Occupied'",
"enum": [
null,
"OwnerOccupied",
"Investment"InvestmentProperty"
],
"Holiday"]default": null
},
"ValuationType": {
"type": [
"string",
"null"
],
"description": "Type of valuation performed on the property"
}
},
"required": [
"Value",
"IsRBNZExempt",SecurityType"
"PropertyType", "SecurityType", "UsageType"]
}
},
"required": [
"LoanId",
"LoanType",
"LiabilityType", "LoanAmount",
"TotalTermMonths",
"InterestOnlyTermMonths", "Security"]
},
"minItems": 1
},
"ApplicantParty": {
"type": "array",
"description": "Array of applicant party objects. This object groups applicants into a party (e.g., a married couple is 1 party). At the moment, only 1 party at a time is supported. Contains all applicant financial information including income, expenses, and liabilities.",
"items": {
"type": "object",
"description": "Represents a group of applicants applying together for the loan, with their combined financial information",
"properties": {
"Applicant": {
"type": "array",
"description": "Array of individual applicants in the party. Each applicant is a person applying for the loan.",
"items": {
"type": "object",
"description": "Individual applicant information",
"properties": {
"ApplicantId": {
"type": "integer",
"description": "UniqueNumerical identifier for the applicant,individual Applicant, typically an incremental ID starting from 1 and incremented with each applicant in the request. Used as a reference in income, expense, and liability records."1",
"minimum": 1,
"examples": [1, 2]1
},
"Name": {
"type": "string",
"description": "NameFull name of the applicant",individual "examples": ["John Smith", "Monique", "Nick"]Applicant"
}
},
"required": [
"ApplicantId",
"Name"]
},
"minItems": 1
},
"Expense": {
"type": "array",
"description": "Array of expense objects for the applicant party. Expenses can be linked to specific applicants or shared across the party.",
"items": {
"type": "object",
"description": "Individual expense item with type, amount, and frequency",
"properties": {
"ApplicantId": {
"type": [
"integer",
"null"
],
"description": "Reference to specific applicant for applicant-specific expenses, or null for shared expenses across the party"
},
"ExpenseType": {
"type": "string",
"description": "Type/category of expense. Maps to [API_ExpenseType](https://airtable.com/appK16RVohBeqXaxe/tblK69O5ItAWWYGIv/viwNHJCL9qZ0tsSZR?blocks=hide) table for validation and processing.",
"enum": [
"ChildCare",
"ChildMaintenance",
"HigherEducationAndVocationalTraining",
"OtherEducation",
"PrivateSchoolCosts",
"PublicSchoolCosts",
"Groceries",
"OtherGroceries",
"BuildingInsurance",
"ContentsInsurance",
"HealthInsurance",
"IncomeProtection",
"LifeInsurance",
"OtherInsurance",
"VehicleInsurance",
"BodyCorporateInvestmentProperty",
"BuildingInsuranceInvestmentProperty",
"CouncilRatesInvestmentProperty",
"ElectricityAndGasInvestmentProperty",
"OtherInvestmentPropertyExpense",
"RepairsAndMaintenanceInvestmentProperty",
"RunningCostsInvestmentProperty",
"WaterAndSewerInvestmentProperty",
"MedicalAndHealth",
"NaturalTherapies",
"OtherMedical",
"Board",
"OtherOngoingRent",
"Rent",
"Kiwisaver",
"Other",
"RegularDonations",
"VoluntarySaving",
"VoluntarySuper",
"ClothingAndFootwear",
"Cosmetics",
"DryCleaning",
"OtherPersonalCare",
"PersonalCare",
"BodyCorporatePrimaryResidence",
"CouncilRatesPrimaryResidence",
"ElectricityAndGasPrimaryResidence",
"FurnishingsAndElectrical",
"HomeOperation",
"HomeRepairs",
"OtherPrimaryResidenceExpense",
"WaterAndSewerPrimaryResidence",
"AlcoholTobacco",
"CinemaConcertsMemberships",
"DiningOut",
"Gambling",
"GiftsAndMiscellaneous",
"GymSports",
"OtherRecreationalAndEntertainment",
"Pets",
"TravelAndHolidays",
"ContentsInsuranceSecondaryResidence",
"BodyCorporateSecondaryResidence",
"BuildingInsuranceSecondaryResidence",
"CouncilRatesSecondaryResidence",
"ElectricityAndGasSecondaryResidence",
"OtherSecondaryResidenceExpense",
"RepairsAndMaintenanceSecondaryResidence",
"RunningCostsSecondaryResidence",
"WaterAndSewerSecondaryResidence",
"HomeMobilePhone",
"InternetPayTVAndMediaStreamingSubscriptions",
"OtherTelephoneAndInternet",
"Petrol",
"PublicTransport",
"Registration",
"TaxiRideSharing",
"TollsParking",
"VehicleMaintenance"
]
},
"Frequency": {
"type": "string",
"description": "Frequency of the expense. Maps to [API_Frequency](https://airtable.com/appK16RVohBeqXaxe/tbldIWnNaLIwSxMXW/viwsb8Z6mo4a2IWeq) table.",
"enum": [
"Weekly",
"Fortnightly",
"Monthly",
"Quarterly",
"HalfYearly",
"Yearly"
]
},
"Amount": {
"type": "number",
"description": "Amount of the expense in the specified frequency",
"minimum": 0,
"examples": [
250.0,
1250,
800,
3000]3000
]
}
},
"required": [
"ExpenseType",
"Frequency",
"Amount"
]
}
},
"Income": {
"type": "array",
"description": "Array of income objects for the applicant party. Income defines a certain group/category of income that can be linked to a specific applicant or represent common income in the party.",
"items": {
"type": "object",
"description": "Individual income item with type, amount, frequency, and additional attributes",
"properties": {
"ApplicantId": {
"type": [
"integer",
"null"
],
"description": "Reference to specific applicant for applicant-specific income, or null for shared income across the party"
},
"IncomeType": {
"type": "string",
"description": "Type/category of income. 'Code' representation that maps to [API_IncomeType](https://airtable.com/appK16RVohBeqXaxe/tblUMOVEDTQHzRUQO/viwPpM8vU5jhXmmmF?blocks=hide) table.",
"enum": [
"CarAllowance",
"Companycar",
"DisabilityAllowance",
"WorkAllowance",
"Bonus",
"Commission",
"CompanyProfitBeforeTax",
"ChildSupport",
"FamilyAllowance",
"Other",
"UnemployedAllowance",
"WidowAllowance",
"Annuities",
"Dividends",
"Interest",
"OtherIncome",
"OtherNetIncome",
"WorkersCompensation",
"RegularOvertime",
"BoarderIncome",
"RentalIncome",
"ForeignIncome",
"SalaryWages",
"PrivatePension",
"Superannuation"
]
},
"Frequency": {
"type": "string",
"description": "Frequency of the income. Maps to [API_Frequency](https://airtable.com/appK16RVohBeqXaxe/tbldIWnNaLIwSxMXW/viwsb8Z6mo4a2IWeq) table.",
"enum": [
"Weekly",
"Fortnightly",
"Monthly",
"Quarterly",
"HalfYearly",
"Yearly",
"Annually"
]
},
"Amount": {
"type": "number",
"description": "Amount of the income in the specified frequency",
"minimum": 0,
"examples": [
80000.0,
568359,
500,
2000]2000
]
},
"AmountType": {
"type": "string",
"description": "Whether the amount is gross (before tax) or net (after tax)",
"enum": [
"Gross",
"Net"
],
"description": "Type of income amount - Net or Gross, defaults to Gross",
"default": "Gross"
},
"Attributes": {
"type": "array",
"description": "Additional attributesinformation that further defineabout the income. Used for specific income types like rental income or boarder income."income",
"items": {
"anyOf": [
{
"title": "Kiwisaver",
"type": "object",
"description": "Kiwisaver (set on SalaryWages)",
"properties": {
"name": {
"type"const": "string",
"description": "Name of the attribute",
"enum": [
"PropertyCountry", "IsTaxExempt", "PropertyBuildDate", "BoarderIncomeType",
"Kiwisaver", "KiwisaverContribution"
]
},
"value": {
"type": ["string", "boolean",
"number"]default": false
}
}
},
{
"title": "KiwisaverContribution",
"type": "object",
"description": "Value of the attribute. Can be stringKiwisaverContribution (e.g.,set 'Offshore'),on booleanSalaryWages, (e.g.,if Kiwisaver=true), or number (e.g., 0.05)",
"examples"properties": {
"name": {
"const": "KiwisaverContribution"
},
"value": {
"type": "number",
"description": "Percentage value represented as a float - 0.06 for 6% contribution"
}
}
},
{
"title": "PropertyCountry",
"type": "object",
"description": "PropertyCountry (set on RentalIncome)",
"properties": {
"name": {
"const": "PropertyCountry"
},
"value": {
"type": "string",
"enum": [
"NZ",
"Offshore"
]
}
}
},
{
"title": "PropertyBuildDate",
"type": "object",
"description": "PropertyBuildDate (set on RentalIncome)",
"properties": {
"name": {
"const": "PropertyBuildDate"
},
"value": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Date in ISO format: YYYY-MM-DD"
}
}
},
{
"title": "SalePurchaseDate",
"type": "object",
"description": "SalePurchaseDate (set on RentalIncome)",
"properties": {
"name": {
"const": "SalePurchaseDate"
},
"value": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Date in ISO format: YYYY-MM-DD"
}
}
},
{
"title": "IsTaxExempt",
"type": "object",
"description": "IsTaxExempt (set on RentalIncome)",
"properties": {
"name": {
"const": "IsTaxExempt"
},
"value": {
"type": "boolean"
}
}
},
{
"title": "BoarderIncomeType",
"type": "object",
"description": "BoarderIncomeType (set on BoarderIncome)",
"properties": {
"name": {
"const": "BoarderIncomeType"
},
"value": {
"type": "string",
"enum": [
"AllInclusive",
"RoomChargeOnly",
true, false, 0.05, "2021-03-27"]
}
},
"required":}
["name", "value"]
}
}
},
"required": [
"ApplicantId",
"IncomeType",
"Frequency",
"Amount",
"AmountType", "Attributes"]
}
},
"Liability": {
"type": "array",
"description": "ArrayOne ofor more existing liabilityliabilities objects(debts) forbeing declared by the applicant party. Represents existing liabilities like loans, credit cards, etc. The Limit is used for limit loans and credit cards. Balance is how much of the loan is left to pay.",
"items": {
"type": "object",
"description": "Individual liability/debt with repayment details",
"properties": {
"ApplicantId": {
"type": ["integer", "null"],
"description": "ReferenceThe toID specificof the individual applicant forwho applicant-specificthe liabilities,liability orbelongs nullto. for\n\nRequired sharedwhen liabilities"`LiabilityType` is StudentLoan."
},
"LoanId": {
"type": [
"integer",
"null"
],
"description": "ReferenceThe toID associated loan if this liability is related to a loan inof the Loanconnected array"loan"
},
"LiabilityType": {
"type": "string",
"description": "TypeThe type of liability.liability Mapsbeing todeclaired [API_LiabilityType](https://airtable.com/appK16RVohBeqXaxe/tblgtZaep3FzFuO75/viw61jHaxh7QIIXiv?blocks=hide)- table.eg. 'Mortgage' or 'CreditCard'",
"enum": [
"ATOCentrelinkDebt",
"ChargeCard",
"CommercialBill",
"ContingentLiability",
"CourtRuledChildMaintenance",
"CourtRuledOtherDebt",
"CreditCard",
"StudentLoan",
"HirePurchase",
"Lease",
"LineOfCredit",
"LoanAsGuarantor",
"Maintenance",
"Other",
"Loan",
"OutstandingTaxAU",
"Overdraft",
"PersonalLoan",
"CarLoan",
"StoreCard",
"Mortgage",
"HomeLoan",
"BusinessLoan",
"OutstandingTaxNZ",
"BuyNowPayLater"
]
},
"RepaymentAmount": {
"type": [
"number",
"null"
],
"description": "RegularThe amount (in $) which is being regularly repaid.\n\nRequired when `LiabilityType` is one of `BuyNowPayLater`, `StudentLoan`, `Overdraft`, `BusinessLoan`, `CarLoan`, `PersonalLoan`, `HomeLoan`, `LineOfCredit`, `LoanAsGuarantor`, `Mortgage`, or `Other`.",
"default": null
},
"RepaymentFrequency": {
"$ref": "#/$defs/FrequencyOrNull",
"description": "The frequency with which the applicant pays the liability - eg. 'Weekly'\n\nRequired when `LiabilityType` is one of `BuyNowPayLater`, `StudentLoan`, `Overdraft`, `BusinessLoan`, `CarLoan`, `PersonalLoan`, `HomeLoan`, `LineOfCredit`, `LoanAsGuarantor`, `Mortgage`, or `Other`."
},
"Limit": {
"type": [
"number",
"null"
],
"description": "The amount of the liability's limi (in $) - eg. the credit card limit.\n\nRequired when `LiabilityType` is one of `BuyNowPayLater` or `Overdraft`",
"default": null
},
"Balance": {
"type": [
"number",
"null"
],
"description": "The amount of the liability's balance (in $) - ie. the remaining amount owed.\n\nRequired when `LiabilityType` is one of `BuyNowPayLater`, `StudentLoan`, `BusinessLoan`, `CarLoan`, `PersonalLoan`, `HomeLoan`, `LineOfCredit`, `LoanAsGuarantor`, `Mortgage`, or `Other`.",
"default": null
},
"InterestRate": {
"type": [
"number",
"null"
],
"description": "The rate of interest being charged (in %) on the liability - eg. 0.05 (=5%).\n\nRequired when `LiabilityType` is one of `HomeLoan`, `LineOfCredit`, `LoanAsGuarantor`, or `Mortgage`.",
"default": null
},
"RepaymentType": {
"type": [
"string",
"null"
],
"enum": [
null,
"PrincipalInterest",
"InterestOnly"
],
"description": "The repayment amount"structure - either 'Principal & Interest' (default) or 'Interest Only'",
"minimum"default": 0,null
},
"examples"StartDate": {
"type": [2095,
10000,"string",
222.0,"null"
600.0]],
"format": "YYYY-MM-DD",
"description": "Start date of the loan",
"default": null
},
"TotalTermMonths": {
"type": [
"integer",
"null"
],
"description": "The loan's total term in months.\n\nRequired when `LiabilityType` is one of `HomeLoan`, `LineOfCredit`, `LoanAsGuarantor`, or `Mortgage`. ",
"default": null
},
"InterestOnlyTermMonths": {
"type": [
"integer",
"null"
],
"description": "The loan's interest only total term in months",
"default": null
},
"Lender": {
"$ref": "#/$defs/Lender"
},
"IsRevolvingCredit": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether the liability is a revolving credit",
"default": false
}
},
"required": [
"LiabilityType"
],
"allOf": [
{
"if": {
"properties": {
"LiabilityType": {
"const": "BuyNowPayLater"
}
}
},
"then": {
"required": [
"RepaymentAmount",
"RepaymentFrequency",
"Balance",
"Limit"
],
"properties": {
"RepaymentAmount": {
"type": "number"
},
"RepaymentFrequency": {
"type": "string"
},
"description"Balance": {
"type": "Frequency of repayments. Maps to [API_Frequency](https://airtable.com/appK16RVohBeqXaxe/tbldIWnNaLIwSxMXW/viwsb8Z6mo4a2IWeq) table.",
"enum": ["Weekly", "Fortnightly", "Monthly", "Quarterly", "HalfYearly", "Yearly"]number"
},
"Limit": {
"type": "number"
}
}
}
},
{
"if": {
"properties": {
"LiabilityType": {
"const": "StudentLoan"
}
}
},
"description"then": {
"required": [
"ApplicantId",
"RepaymentAmount",
"RepaymentFrequency",
"Balance"
],
"properties": {
"RepaymentAmount": {
"type": "Creditnumber"
limit (for limit loans, credit cards) or original loan amount. For credit cards, someone may have a limit of $5000 (Limit) but only use $3000 (Balance)."},
"minimum"RepaymentFrequency": 0,{
"examples"type": [15000, 852000, 10000]"string"
},
"Balance": {
"type": "number"
}
}
}
},
{
"if": {
"properties": {
"LiabilityType": {
"const": "Overdraft"
}
}
},
"description"then": {
"required": [
"RepaymentAmount",
"RepaymentFrequency",
"Limit"
],
"properties": {
"RepaymentAmount": {
"type": "Currentnumber"
outstanding balance - how much is still owed"},
"minimum"RepaymentFrequency": 0,{
"examples"type": "string"
},
"Limit": {
"type": "number"
}
}
}
},
{
"if": {
"properties": {
"LiabilityType": {
"enum": [10000,
852000,"BusinessLoan",
5000,"CarLoan",
20000]"PersonalLoan",
"Other"
]
}
}
},
"then": {
"required": [
"RepaymentAmount",
"RepaymentFrequency",
"Balance"
],
"properties": {
"RepaymentAmount": {
"type": "number"
},
"RepaymentFrequency": {
"type": "string"
},
"Balance": {
"type": "number"
}
}
}
},
{
"if": {
"properties": {
"LiabilityType": {
"enum": [
"HomeLoan",
"LineOfCredit",
"LoanAsGuarantor",
"Mortgage"
]
}
}
},
"then": {
"required": [
"RepaymentAmount",
"RepaymentFrequency",
"Balance",
"InterestRate",
"TotalTermMonths"
],
"properties": {
"RepaymentAmount": {
"type": "number"
},
"RepaymentFrequency": {
"type": "string"
},
"Balance": {
"type": "number"
},
"InterestRate": {
"type": "number",
"description": "Interest rate as a decimal (e.g., 0.05 for 5%, 0.062 for 6.2%)",
"minimum": 0,
"maximum": 1,
"examples": [0.05, 0.062, 0.12, 0.068]
},
"RepaymentType": {
"type": "string",
"enum": ["InterestOnly","PrincipalInterest"],
"description": "Type of repayment structure."
},
"StartDate": {
"type": ["string", "null"],
"description": "Start date of the liability in ISO format (YYYY-MM-DD)",
"format": "date",
"examples": ["2020-01-01", "2019-06-01", "2018-08-15", null]
},
"TotalTermMonths": {
"type": "integer",
"description": "Total term of the liability in months",
"minimum": 1,
"examples": [360, 300, 1]
},
"InterestOnlyTermMonths": {
"type": "integer",
"description": "Interest-only period in months",
"minimum": 0,
"examples": [0, 360]
},
"Lender":}
{}
"type": "string",
"description": "Name of the lender. Maps to [API_Lender](https://airtable.com/appK16RVohBeqXaxe/tblaNIihjJ5c4Bcsy/viwX3xYVBjz5hWj58?blocks=hide) table.",
"examples": ["BNZ", "ANZ", "ASB", "Kiwibank", "TSB"]
},
"IsRevolvingCredit": {
"type": "boolean",
"description": "Whether this is a revolving credit facility"
}
},
"required"default": ["LiabilityType", "RepaymentAmount", "RepaymentFrequency", "Limit", "Balance", "InterestRate", "RepaymentType", "TotalTermMonths", "InterestOnlyTermMonths", "Lender", "IsRevolvingCredit"]
}
},
"NumberOfDependents": {
"type": "integer",
"description": "Number of dependents (children, etc.) in the applicant party",
"minimum": 0,
"examples": [
0,
1,
4]4
]
},
"NumberOfVehicles": {
"type": "integer",
"description": "Number of vehicles owned by the applicant party",
"minimum": 0,
"examples": [
0,
1,
2]2
]
}
},
"required": [
"Applicant",
"Expense",
"Income",
"Liability",
"NumberOfDependents",
"NumberOfVehicles"
]
},
"minItems": 1,
"maxItems": 1
}
},
"required": [
"Loan",
"ApplicantParty"]
},
"Lenders": {
"type": "string",
"description": "Comma-separated list of lender codes to include in the calculation. If no Lenders are passed, the calculation will return ASB, ANZ, BNZ, Sovereign and Westpac by default. Available lenders include: aia, anz, asb, bnz, co-op, kiwibank, liberty, resimac, sbs, select, tsb, westpac.",
"pattern": "^[a-z,-]+$",
"examples": ["anz,asb,bnz,co-op,kiwibank,liberty,sbs,tsb,westpac", "anz,asb,bnz", "westpac"]
}
},
"required": ["Details", "Lenders"],
"additionalProperties": false,
"examples": [
{
"Details": {
"Loan": [
{
"LoanId": 1,
"LoanType": "Existing",
"Lender": "BNZ",
"LendingAction": "Refinance",
"LiabilityType": "HomeLoan",
"LoanAmount": 852000,
"TopUpAmount": null,
"TotalTermMonths": 360,
"InterestOnlyTermMonths": 0,
"Security": {
"Value": 1170000,
"IsRBNZExempt": false,
"Location": "13 Zealandia Road, Whangaparaoa Auckland 0930, New Zealand",
"PropertyType": ["ResidentialProperty"],
"SecurityType": "Existing",
"UsageType": "OwnerOccupied",
"ValuationType": null
}
}
],
"ApplicantParty": [
{
"Applicant": [
{
"ApplicantId": 1,
"Name": "Monique"
},
{
"ApplicantId": 2,
"Name": "Nick"
}
],
"Expense": [
{
"ApplicantId": 1,
"ExpenseType": "HealthInsurance",
"Frequency": "Monthly",
"Amount": 1250
},
{
"ApplicantId": 1,
"ExpenseType": "Groceries",
"Frequency": "Monthly",
"Amount": 3000
}
],
"Income": [
{
"ApplicantId": 1,
"IncomeType": "OtherIncome",
"Frequency": "Yearly",
"Amount": 568359,
"AmountType": "Gross",
"Attributes": []
}
],
"Liability": [
{
"ApplicantId": 1,
"LoanId": null,
"LiabilityType": "CreditCard",
"RepaymentAmount": 10000,
"RepaymentFrequency": "Monthly",
"Limit": 15000,
"Balance": 10000,
"InterestRate": 0,
"RepaymentType": "PrincipalInterest",
"StartDate": null,
"TotalTermMonths": 1,
"InterestOnlyTermMonths": 0,
"Lender": "BNZ",
"IsRevolvingCredit": false
}
],
"NumberOfDependents": 4,
"NumberOfVehicles": 0
}
]
},
"Lenders": "anz,asb,bnz,co-op,kiwibank,liberty,sbs,tsb,westpac"
}
]
}