Skip to main content

httpsEngineCreateSession

Creates a new session from provided data.

When successful, returns a SessionID which can be used to load that session in the MRE UI.

Function performs basic validation on the structure of the request payload but does not impose strict rules based on what is required for generating a report. This means, that a successfully created session does not guarantee the data is complete for actual calculation in the UI. Data is loaded on a best-effort basis in the UI and then user is required to fill in the missing bits if needed.

Request


Type: POST
Path: /httpsEngineCreateSession

URL (development): https://us-central1-mortgage-rec-engine-dev-msec.cloudfunctions.net/httpsEngineCreateSession

Request payload is sent as HTTP JSON body.

Authentication

API Key required. HTTP Bearer Token authentication is used.

JSON Payload

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$defs": {
    "Lender"Benefit.benefitId": {
      "type": [
        "string",
        "null"
      ]integer",
      "description": "The [lenderid (bank)](https://docs.blackfin.tools/books/mortgagerecenginemycrm/page/lenders) whichof the existingbenefit loanto isbe with/from - eg. 'Westpac' this field is only present if LoanType=Existing"quoted",
      "enum"format": [
        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": nullint32"
    },
    "Frequency"Benefit.clientBenefitId": {
      "type": "string",
      "enum"description": ["Optional custom identifier provided by the requestor. This is returned with the result in the response."Yearly",
      "HalfYearly",nullable": "Quarterly",
        "Monthly",
        "Fortnightly",
        "Weekly"
      ]true
    },
    "FrequencyOrNull"Benefit.loading": {
      "type": [
        "string"number",
      "null"description": ]"<br /> Additional percentage loading multiplier, for example: <br /><br /> \r\n            `1.0` – no additional loading <br /> \r\n            `1.5` – 50% additional loading <br /> \r\n            `2.0` – 100% additional loading",
      "enum"format": [
        null,
        "Yearly"double",
      "HalfYearly",default": "Quarterly",
        "Monthly",
        "Fortnightly",
        "Weekly"
      ]
    }1
    },
    "title"Benefit.benefitProducts": {
      "type": "Requestarray",
      JSON"items": Payload"{
        "required": [
          "productId",
          "providerId"
        ],
        "type": "object",
        "properties": {
          "Session"providerId": {
            "type": "integer",
            "description": "The id of the provider whose product is being quoted.",
            "format": "int32"
          },
          "productId": {
            "type": "integer",
            "description": "The id of the product being quoted.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "description": "An array of one or more Product objects containing the details of the providers and products to be quoted for the current beneft."
    }
  },
  "required": [
    "clients",
    "settings"
  ],
  "type": "object",
  "properties": {
    "ExternalID"comboQuoteId": {
      "type": "string",
      "nullable": true,
      "description": "Optional user-provided ID to indicate that the request is one of multiple requests sent to calculate a 'Combo Quote', allowing BlackFin to group these requests together for analytics purposes."
    },
    "clients": {
      "type": "array",
      "items": {
        "required": [
          "age",
          "clientBenefits",
          "employedStatus",
          "gender",
          "occupationId",
          "smoker"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "ExternalFirst ID,name forof examplethe a user IDindividual to linkbe theinsured",
            session"nullable": to"
        }true
          },
          "required": [
        "ExternalID"
      ]
    },
    "Details"lastName": {
            "type": "object"string",
            "description": "ContainsLast detailsname forof mortgagethe calculation"indivual to be insured",
            "properties"nullable": {true
          "Loan": {
          "description": "Array of Loan objects"},
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "LoanId"age": {
            "type": "integer",
            "description": "NumericalCurrent age of the individual to be insured",
            "format": "int32"
          },
          "gender": {
            "type": "string",
            "description": "Gender of the individual to be insured: <br /><br />\r\n`F` – Female <br />\r\n`M` – Male"
          },
          "smoker": {
            "type": "boolean",
            "description": "Indicates whether the individual to be insured is a smoker: <br /><br />\r\n`false` – Non-smoker <br />\r\n`true` – Smoker <br />"
          },
          "employedStatus": {
            "type": "string",
            "description": "<br /> The employment status of the individual to be insured: <br /><br />\r\n            `Employed` <br />\r\n            `Self-employed` <br />\r\n            `Self-employed < 3 Years` <br />\r\n            `Non-earner` <br /><br />\r\n            This property is not required when quoting for Health Cover, Life Cover, Family Protection, and Trauma Cover",
            "default": "Employed"
          },
          "occupationId": {
            "type": "integer",
            "description": "The occupation class of the individual to be insured: <br /><br />\r\n`1` – Class 1 <br />\r\n`2` – Class 2 <br />\r\n`3` – Class 3 <br />\r\n`4` – Class 4 <br />\r\n`5` – Class 5 <br /><br />\r\nThis property is not required when quoting for Health Cover, Life Cover, Family Protection, or Trauma Cover.",
            "format": "int32"
          },
          "isChild": {
            "type": "boolean",
            "description": "<br /> Inidicates whether the individual to be insured is a child / dependent: <br /><br />\r\n            `false` – adult <br />\r\n            `true` – child / dependent",
            "default": false
          },
          "clientId": {
            "type": "string",
            "description": "Optional custom identifier forprovided by the Loan,requestor. typicallyThis anis incremental ID startingreturned with the result in the response.",
            "nullable": true
          },
          "clientBenefits": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "title": "1 – Health Cover",
                  "description": "benefitId=1",
                  "minimum"required": [
                    "benefitId",
                    "benefitProducts"
                  ],
                  "properties": {
                    "benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId"
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "excess": {
                      "type": "integer",
                      "description": "Defines the excess amount (in NZD) payable by the client under Health Cover, for example: <br /><br />\r\n`0` – nil excess <br />\r\n`250` – $250 excess <br />\r\n`500` – $500 excess etc",
                      "format": "int32",
                      "nullable": true
                    },
                    "gpPrescriptions": {
                      "type": "boolean",
                      "description": "Toggle the optional GP & Prescriptions benefit (under Health Cover) on and off : <br /><br />\r\n`false` – not included(default value) <br />\r\n`true` – include GP & Prescriptions",
                      "nullable": true
                    },
                    "specialistsTest": {
                      "type": "boolean",
                      "description": "<br /> Toggle the optional Specialists & Tests benefit (under Health Cover) on and off :  <br /><br />\r\n            `false` – not included(default value) <br />\r\n            `true` – include Specialists & Tests",
                      "default": false,
                      "nullable": true
                    },
                    "specialistsTestExcess": {
                      "type": "integer",
                      "description": "Defines the excess amount (in NZD) payable by the client under the Specialists & Tests benefit, if applicable. For example: <br /><br />\r\n`0` – nil excess <br />\r\n`250` – $250 excess <br /><br />\r\nIf not provided, the primary `Excess` value will be used.",
                      "format": "int32",
                      "nullable": true
                    },
                    "dentalOptical": {
                      "type": "boolean",
                      "description": "<br /> Toggle the optional Dental & Optical benefit (under Health Cover) on and off : <br /><br />\r\n            `false` – not included(default value) <br />\r\n            `true` – include Dental & Optical",
                      "default": false,
                      "nullable": true
                    }
                  }
                },
                {
                  "title": "2 – Life Cover",
                  "type": "object",
                  "description": "benefitId=2",
                  "required": [
                    "benefitId",
                    "benefitProducts",
                    "calcPeriod",
                    "coverAmount"
                  ],
                  "properties": {
                    "benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "LoanType"clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "number",
                      "description": "Amount of cover / sum insured, in New Zealand Dollars (NZD). Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    },
                    "calcPeriod": {
                      "type": "number",
                      "description": "<br /> The premium review term for the benefit: <br /><br />\r\n            `1` – Yearly Renewable <br />\r\n            `5`, `10`, `15` – Level for specified number of years <br />\r\n            `50`, `60`, `65`, `70` etc – Level to specified age",
                      "format": "double",
                      "default": 1
                    },
                    "futureInsurability": {
                      "type": "boolean",
                      "description": "<br /> Toggle the optional Future Insurability benefit (under Life Cover) on and off : <br /><br />\r\n            `false` – not included(default value) <br />\r\n            `true` – include Future Insurability",
                      "default": false,
                      "nullable": true
                    },
                    "indexed": {
                      "type": "boolean",
                      "description": "<br /> Toggle CPI Indexation on and off: <br /><br /> \r\n            `false` – no indexation <br /> \r\n            `true` – apply CPI indexation",
                      "default": true
                    }
                  }
                },
                {
                  "title": "3  – Family Protection(Life Income)",
                  "type": "object",
                  "description": "benefitId=3",
                  "required": [
                    "benefitId",
                    "benefitProducts",
                    "benefitPeriod",
                    "benefitPeriodType",
                    "coverAmount"
                  ],
                  "properties": {
                    "benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "number",
                      "description": "Amount of cover / sum insured, in New Zealand Dollars (NZD). Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    },
                    "benefitPeriod": {
                      "type": "integer",
                      "description": "Specifies the period of time for which the benefit will be payable – either as a specific number of years (eg. '5' years) or to a specific age (eg. age '65'). <br /><br /> See `benefitPeriodType` for definition.",
                      "format": "int32"
                    },
                    "benefitPeriodType": {
                      "type": "string",
                      "description": "Defines whether the applicant`benefitPeriod` alreadynumber hasis thisexpressed loanas: or<br if/><br it's/>\r\n`age` – to a newspecific loan",age <br />\r\n`term` – a fixed term (specific number of years) <br />"enum": [
                  "Existing",
                  "New"
                ]
                    },
                    "Lender": {
                "$ref": "#/$defs/Lender"
              },
              "LendingAction": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Defines what action the applicant wants to take on an existing loan, only set if LoanType=Existing",
                "enum": [
                  null,
                  "None",
                  "Refinance",
                  "TopUp"
                ],
                "default": null
              },
              "LiabilityType"indexed": {
                      "type": "string"boolean",
                      "description": "The<br type/> ofToggle loanCPI beingIndexation appliedon for",and "enum":off: [<br "HomeLoan"/><br ]/> \r\n            `false` – no indexation <br /> \r\n            `true` – apply CPI indexation",
                      "default": "HomeLoan"true
                    }
                  }
                },
                "LoanAmount": {
                  "type": [
                  "number",
                  "null"
                ],
                "description"title": "The4  amount ofTrauma the loan (in $) being requested"Cover",
                "default": null
              },
              "TopUpAmount": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The amount of the 'proposed increase' to the loan (in $) being requested",
                "default": null
              },
              "TotalTermMonths": {
                "type": "integer",
                "description": "The new loan's overall total term (expressed in months)",
                "minimum": 1
              },
              "InterestOnlyTermMonths": {
                "type": "integer",
                "description": "The new loan's optional 'Interest-Only' term (expressed in months)",
                "minimum": 0,
                "default": 0
              },
              "Security": {
                  "type": "object",
                  "description": "SecuritybenefitId=4",
                  for"required": the[
                    Loan""benefitId",
                    "benefitProducts",
                    "calcPeriod",
                    "coverAmount"
                  ],
                  "properties": {
                    "Value"benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "number",
                      "description": "The valueAmount of thecover property/ sum insured, in New Zealand Dollars (inNZD). $)Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    },
                    "IsRBNZExempt"calcPeriod": {
                      "type": "number",
                      "description": "<br /> The premium review term for the benefit: <br /><br />\r\n            `1` – Yearly Renewable <br />\r\n            `5`, `10`, `15` – Level for specified number of years <br />\r\n            `50`, `60`, `65`, `70` etc – Level to specified age",
                      "format": "double",
                      "default": 1
                    },
                    "accelerated": {
                      "type": "boolean",
                      "description": "Inidicates<br someone/> whoToggle isacceleration eligibleon and off for 90%Trauma lending.or DefaultTPD: =<br false./><br [See/>\r\n            also](https:`false` – standalone(default value) <br />\r\n            `true` – accelerated <br /www.rbnz.govt.nz/regulation-and-supervision/banks/macro-prudential-policy/loan-to-valuation-ratio-restrictions#:~:text=Loans%20to%20people%20building%20a,occupiers%20and%20residential%20property%20investors.)"><br />\r\n            Quote must also include a Life Cover benefit for the same client, in order to accelerate the Trauma or TPDs",
                      "default": falsefalse,
                      "nullable": true
                    },
                    "Location": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Address of the property",
                    "default": null
                  },
                  "PropertyType"traumaBuyback": {
                      "type": "array"boolean",
                      "description": "Up<br to/> threeToggle levelsthe ofoptional propertyTrauma categorisation.BuyBack [0]benefit array(under itemTrauma) ison leveland 1,off [1]: is<br level/><br 2,/>\r\n            [2]`false` is levelnot 3.included(default Seevalue)  [property<br type](https://docs.blackfin.tools/books/mortgagerecenginemycrm/page/loan-security-property-types)>\r\n            table"`true` – include Trauma BuyBack",
                      "items"default": false,
                      "nullable": true
                    },
                    "lifeBuyback": {
                      "type": [
                        "string"boolean",
                      "null"
                      ],description": "enum"<br /> Toggle the optional Life BuyBack benefit (under Trauma) on and off : [<br null,/><br />\r\n            `false` – not included(default value) <br />\r\n            `true` – include Life BuyBack Only applicable if `accelerated = true`"ResidentialProperty",
                        "FreeHoldResidential",
                        "TerracedHousing",
                        "FeeSimpleCrossLease",
                        "UnitTitle",
                        "Townhouse",
                        "LifestyleBlock",
                        "0to10ha",
                        "over10ha",
                        "LeaseholdResidential",
                        "Apartments",
                        "FreeholdApartment",
                        "over50sqm",
                        "40to50sqm",
                        "38to40sqm",
                        "under38sqm",
                        "LeaseholdApartment",
                        "ServicedApartment",
                        "StudentAccommodation",
                        "BedsitterStudioWarehouseApartments",
                        "NewBuildConstruction",
                        "FixedPriceContracts",
                        "LabourOnlySelfOwnerBuild",
                        "Relocations",
                        "VacantLand",
                        "ServicedVacantLand",
                        "UnservicedVacantLand",
                        "LifestyleWithoutDwelling",
                        "Other",
                        "MultipleDwellingsOnOneTitle",
                        "3Dwellings",
                        "4Dwellings",
                        "5Dwellings",
                        "6Dwellings",
                        "7OrMoreDwellings"
                      ]
                    },
                      "default": []false,
                      "nullable": true
                    },
                    "SecurityType"tpdAddon": {
                      "type": "boolean",
                      "description": "<br /> Toggle the optional TPD Add-On benefit (under Trauma) on and off : <br /><br />\r\n            `false` – not included(default value) <br />\r\n            `true` – include TPD Add-On <br /><br />\r\n            The `occupationType` property is required if including the TPD Add-On",
                      "default": false,
                      "nullable": true
                    },
                    "occupationType": {
                      "type": "string",
                      "description": "Defines whether the SecurityTPD isbenefit already owned bycovers the Applicantindividual's orinability not"to work in their current (own) occupation: <br /><br />\r\n`own` – own occupation <br />\r\n`any` – any occupation <br />",
                      "enum"nullable": [
                      "Existing",
                      "Proposed"
                    ]true
                    },
                    "UsageType": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "How the property will be used - eg. 'Owner Occupied'",
                    "enum": [
                      null,
                      "OwnerOccupied",
                      "InvestmentProperty"
                    ],
                    "default": null
                  },
                  "ValuationType": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The source of the valuation of the property. (Calculation logic coming soon)",
                    "enum": [
                      null,
                      "CouncilValuation",
                      "EVal",
                      "FullRegisteredValuation",
                      "SalePurchaseAgreement"
                    ],
                    "default": null
                  }
                },
                "required": [
                  "Value",
                  "SecurityType"
                ]
              }
            },
            "required": [
              "LoanId",
              "LoanType",
              "TotalTermMonths"
            ]
          }
        },
        "ApplicantParty"seriousTrauma": {
                      "type": "array"boolean",
                      "description": "One<br or/> moreToggle partiesthe optional Serious Trauma benefit (eg.under marriedTrauma) couple)on whoand areoff applying: <br /><br />\r\n            `false` – not included(default value) <br />\r\n            `true` – include Serious Trauma <br /><br />\r\n            The `seriousTraumaCoverAmount` is required if including the Serious Trauma benefit",
                      "default": false,
                      "nullable": true
                    },
                    "seriousTraumaCoverAmount": {
                      "type": "number",
                      "description": "Amount of cover (in New Zealand Dollars) for the homeoptional loan"Serious Trauma benefit. <br />\r\nOnly required if `seriousTrauma = true`",
                      "items"format": "double",
                      "nullable": true
                    },
                    "indexed": {
                      "type": "boolean",
                      "description": "<br /> Toggle CPI Indexation on and off: <br /><br /> \r\n            `false` – no indexation <br /> \r\n            `true` – apply CPI indexation",
                      "default": true
                    }
                  }
                },
                {
                  "title": "5  – Total & Permanent Disability",
                  "type": "object",
                  "description": "benefitId=5",
                  "required": [
                    "benefitId",
                    "benefitProducts",
                    "calcPeriod",
                    "coverAmount"
                  ],
                  "properties": {
                    "Applicant"benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "array"number",
                      "description": "OneAmount of cover / sum insured, in New Zealand Dollars (NZD). Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    },
                    "calcPeriod": {
                      "type": "number",
                      "description": "<br /> The premium review term for the benefit: <br /><br />\r\n            `1` – Yearly Renewable <br />\r\n            `5`, `10`, `15` – Level for specified number of years <br />\r\n            `50`, `60`, `65`, `70` etc – Level to specified age",
                      "format": "double",
                      "default": 1
                    },
                    "accelerated": {
                      "type": "boolean",
                      "description": "<br /> Toggle acceleration on and off for Trauma or moreTPD: individuals<br belonging/><br />\r\n            `false` – standalone(default value) <br />\r\n            `true` – accelerated <br /><br />\r\n            Quote must also include a Life Cover benefit for the same client, in order to accelerate the ApplicantTrauma Party"or TPDs",
                      "items"default": false,
                      "nullable": true
                    },
                    "occupationType": {
                      "type": "string",
                      "description": "Defines whether the TPD benefit covers the individual's inability to work in their current (own) occupation: <br /><br />\r\n`own` – own occupation <br />\r\n`any` – any occupation <br />",
                      "nullable": true
                    },
                    "indexed": {
                      "type": "boolean",
                      "description": "<br /> Toggle CPI Indexation on and off: <br /><br /> \r\n            `false` – no indexation <br /> \r\n            `true` – apply CPI indexation",
                      "default": true
                    }
                  }
                },
                {
                  "title": "6  – Income Protection",
                  "type": "object",
                  "description": "benefitId=6",
                  "required": [
                    "benefitId",
                    "benefitProducts",
                    "benefitPeriod",
                    "benefitPeriodType",
                    "coverAmount",
                    "weekWaitPeriod"
                  ],
                  "properties": {
                    "ApplicantId"benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "number",
                      "description": "Amount of cover / sum insured, in New Zealand Dollars (NZD). Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    },
                    "benefitPeriod": {
                      "type": "integer",
                      "description": "NumericalSpecifies identifierthe period of time for which the individualbenefit Applicant,will typicallybe anpayable incremental IDeither startingas witha 1"specific number of years (eg. '5' years) or to a specific age (eg. age '65'). <br /><br /> See `benefitPeriodType` for definition.",
                      "minimum"format": 1"int32"
                    },
                    "Name"benefitPeriodType": {
                      "type": "string",
                      "description": "FullDefines namewhether the `benefitPeriod` number is expressed as: <br /><br />\r\n`age` – to a specific age <br />\r\n`term` – a fixed term (specific number of years) <br />"
                    },
                    "booster": {
                      "type": "boolean",
                      "description": "<br /> Toggle the individualoptional Applicant"Booster benefit (under Income Protection) on and off : <br /><br />\r\n            `false` – not included(default value) <br />\r\n            `true` – include Booster <br />",
                      "default": false,
                      "nullable": true
                    },
                    "weekWaitPeriod": {
                      "type": "number",
                      "description": "Specifies the number of weeks after which the benefit will start to be paid",
                      "format": "double"
                    },
                    "indexed": {
                      "type": "boolean",
                      "description": "<br /> Toggle CPI Indexation on and off: <br /><br /> \r\n            `false` – no indexation <br /> \r\n            `true` – apply CPI indexation",
                      "default": true
                    }
                  }
                },
                {
                  "title": "7  – Mortgage Repayment Cover",
                  "type": "object",
                  "description": "benefitId=7",
                  "required": [
                    "ApplicantId"benefitId",
                    "benefitProducts",
                    "benefitPeriod",
                    "benefitPeriodType",
                    "coverAmount",
                    "weekWaitPeriod"
                  ],
                  }"properties": {
                    "benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "NumberOfDependents"clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "number",
                      "description": "Amount of cover / sum insured, in New Zealand Dollars (NZD). Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    },
                    "benefitPeriod": {
                      "type": "integer",
                      "description": "NumberSpecifies the period of dependentstime for which the benefit will be payable – either as a specific number of thisyears applicant(eg. party"'5' years) or to a specific age (eg. age '65'). <br /><br /> See `benefitPeriodType` for definition.",
                      "minimum"format": 0,
                "default": 0int32"
                    },
                    "NumberOfVehicles"benefitPeriodType": {
                      "type": "integer"string",
                      "description": "NumberDefines whether the `benefitPeriod` number is expressed as: <br /><br />\r\n`age` – to a specific age <br />\r\n`term` – a fixed term (specific number of ownedyears) vehicles<br by this applicant party",
                />"minimum": 0,
                "default": 0
                    },
                    "Expense"weekWaitPeriod": {
                      "type": "array"number",
                      "description": "OneSpecifies the number of weeks after which the benefit will start to be paid",
                      "format": "double"
                    },
                    "indexed": {
                      "type": "boolean",
                      "description": "<br /> Toggle CPI Indexation on and off: <br /><br /> \r\n            `false` – no indexation <br /> \r\n            `true` – apply CPI indexation",
                      "default": true
                    }
                  }
                },
                {
                  "title": "8  – Redundancy Cover",
                  "type": "object",
                  "description": "benefitId=8",
                  "required": [
                    "benefitId",
                    "benefitProducts",
                    "coverAmount"
                  ],
                  "properties": {
                    "benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "number",
                      "description": "Amount of cover / sum insured, in New Zealand Dollars (NZD). Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    },
                    "indexed": {
                      "type": "boolean",
                      "description": "<br /> Toggle CPI Indexation on and off: <br /><br /> \r\n            `false` – no indexation <br /> \r\n            `true` – apply CPI indexation",
                      "default": true
                    }
                  }
                },
                {
                  "title": "9  – Waiver of Premium",
                  "type": "object",
                  "description": "benefitId=9",
                  "required": [
                    "benefitId",
                    "benefitProducts",
                    "weekWaitPeriod"
                  ],
                  "properties": {
                    "benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "weekWaitPeriod": {
                      "type": "number",
                      "description": "Specifies the number of weeks after which the benefit will start to be paid",
                      "format": "double",
                      "nullable": true
                    }
                  }
                },
                {
                  "title": "10 – Special Injury",
                  "type": "object",
                  "description": "benefitId=10",
                  "required": [
                    "benefitId",
                    "benefitProducts",
                    "coverAmount"
                  ],
                  "properties": {
                    "benefitId": {
                      "$ref": "#/$defs/Benefit.benefitId",
                      "const": 1
                    },
                    "clientBenefitId": {
                      "$ref": "#/$defs/Benefit.clientBenefitId"
                    },
                    "loading": {
                      "$ref": "#/$defs/Benefit.loading"
                    },
                    "benefitProducts": {
                      "$ref": "#/$defs/Benefit.benefitProducts"
                    },
                    "coverAmount": {
                      "type": "number",
                      "description": "Amount of cover / sum insured, in New Zealand Dollars (NZD). Value is treated as: <br />\r\n* <b>Lump Sum</b> amount for Life, Trauma, TPD <br />\r\n* <b>Annual</b> cover for Income Protection <br />\r\n* <b>Monthly</b> amount/cover for Family Protection, Mortgage, Redundancy, Special Injury",
                      "format": "double"
                    }
                  }
                }
              ]
            },
            "description": "An array of one or more regularBenefit expensesobjects being declared bycontaining the applicantdetails party"of the insurance benefit(s) to be quoted for the current client. Not all properties are relevant for every benefit. <br /><br />\r\nSelect each `benefitId` from the dropdown below to see the relevant properties."
          }
        },
        "items"additionalProperties": false
      },
      "description": "An array of Client objects containing the details of the individuals to be insured"
    },
    "settings": {
      "required": [
        "paymentFrequency"
      ],
      "type": "object",
      "properties": {
        "ApplicantId"paymentFrequency": {
          "type": "integer",
          "description": "The IDdesired offrequency thefor individualpremium applicantpayments: who<br the/><br expense/>\r\n`1` belongs to"Annually <br />\r\n`12` – Monthly <br />\r\n`26` – Fortnightly",
          "minimum"format": 1"int32"
        },
        "ExpenseType": {
                      "type": "string",
                      "description": "The type of expense being declared - eg. 'Groceries'",
                      "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",
                        "Gambling2",
                        "GiftsAndMiscellaneous",
                        "GymSports",
                        "OtherRecreationalAndEntertainment",
                        "Pets",
                        "TravelAndHolidays",
                        "ContentsInsuranceSecondaryResidence",
                        "BodyCorporateSecondaryResidence",
                        "BuildingInsuranceSecondaryResidence",
                        "CouncilRatesSecondaryResidence",
                        "ElectricityAndGasSecondaryResidence",
                        "OtherSecondaryResidenceExpense",
                        "RepairsAndMaintenanceSecondaryResidence",
                        "RunningCostsSecondaryResidence",
                        "WaterAndSewerSecondaryResidence",
                        "HomeMobilePhone",
                        "InternetPayTVAndMediaStreamingSubscriptions",
                        "OtherTelephoneAndInternet",
                        "Petrol",
                        "PublicTransport",
                        "Registration",
                        "TaxiRideSharing",
                        "TollsParking",
                        "VehicleMaintenance"
                      ]
                    },
                    "Frequency": {
                      "$ref": "#/$defs/Frequency",
                      "description": "The frequency with which the applicant pays the expense - eg. 'Weekly'"
                    },
                    "Amount": {
                      "type": "number",
                      "description": "The amount of the expense (in $)"
                    }
                  },
                  "required": [
                    "ExpenseType",
                    "Amount",
                    "Frequency"
                  ]
                },
                "default": []
              },
              "Income"providerSettings": {
          "type": "array",
          "description": "One or more incomes being declared by the Applicant Party",
                "items": {
            "required": [
              "providerId"
            ],
            "type": "object",
            "properties": {
              "ApplicantId"providerId": {
                "type": "integer",
                "description": "The IDid of the individualprovider applicantfor whowhich settings are being applied. <br /><br />\r\nNote: at the incomecurrent belongstime, to"only the provider AIA (id=11) has any applicable settings here.",
                "minimum"format": 0"int32"
              },
              "IncomeType": {
                      "type": "string",
                      "description": "The type of income being declared - eg. 'Salary'",
                      "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": {
                      "$ref": "#/$defs/Frequency",
                      "description": "The frequency with which the applicant receives the income - eg. 'Monthly'"
                    },
                    "Amount": {
                      "type": "number",
                      "description": "The amount of the income (in $)"
                    },
                    "Attributes": {
                      "type": "array",
                      "description": "Additional information about the income",
                      "items": {
                        "anyOf": [
                          {
                            "title": "Kiwisaver",
                            "type": "object",
                            "description": "Kiwisaver (set on SalaryWages)",
                            "properties": {
                              "name": {
                                "const": "Kiwisaver"
                              },
                              "value"vitalityDiscountSelected": {
                "type": "boolean",
                "default": false
                              }
                            }
                          },
                          {
                            "title": "KiwisaverContribution",
                            "type": "object",
                            "description": "KiwisaverContributionToggle (setthe AIA Vitality scheme membership on SalaryWages,and ifoff Kiwisaver=true)"for all clients. Members of AIA's Vitality scheme receive a discount on their insurance premium: <br /><br />\r\n`false` – clients do not wish to join AIA Vitality <br />\r\n`true` – clients wish to join (or are already members of) AIA Vitality <br /><br />\r\n See related `vitalityFeeSelected` property below",
                "properties"default": {false,
                "name"nullable": {
                                "const": "KiwisaverContribution"true
              },
              "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",
                                "description": "Date in ISO format: YYYY-MM-DD"
                              }
                            }
                          },
                          {
                            "title": "SalePurchaseDate",
                            "type": "object",
                            "description": "SalePurchaseDate (set on RentalIncome)",
                            "properties": {
                              "name": {
                                "const": "SalePurchaseDate"
                              },
                              "value": {
                                "type": "string",
                                "description": "Date in ISO format: YYYY-MM-DD"
                              }
                            }
                          },
                          {
                            "title": "IsTaxExempt",
                            "type": "object",
                            "description": "IsTaxExempt (set on RentalIncome)",
                            "properties": {
                              "name": {
                                "const": "IsTaxExempt"
                              },
                              "value"vitalityFeeSelected": {
                "type": "boolean"
                              }
                            }
                          },
                          {
                            "title": "BoarderIncomeType",
                            "type": "object",
                "description": "BoarderIncomeTypeToggle (setthe applicability of the AIA Vitality fee, based on BoarderIncome)"whether the client(s) are already members of the scheme: <br /><br />\r\n`false` – clients are already paying AIA Vitality fee(existing members) <br />\r\n`true` – clients are not existing Vitality members, therefore the fee is applicable",
                "properties"nullable": {
                              "name": {
                                "const": "BoarderIncomeType"
                              },
                              "value": {
                                "type": "string",
                                "enum": [
                                  "AllInclusive",
                                  "RoomChargeOnly"
                                ]
                              }
                            }
                          }
                        ]
                      }true
              }
            },
            "required"additionalProperties": [
                    "ApplicantId",
                    "IncomeType",
                    "Frequency",
                    "Amount"
                  ]false
          },
                "default": []
              },
              "Liability": {
                "type": "array",
          "description": "OneAn oroptional morearray existingof liabilitiesprovider-specific (debts)settings. being<br declared/><br by/>\r\nNot theall applicantproviders party.have applicable settings(see below) however this may change in future.",
          "items"nullable": {
                  "type": "object",
                  "properties": {
                    "ApplicantId": {
                      "type": "integer",
                      "description": "The ID of the individual applicant who the liability belongs to. \n\nRequired when `LiabilityType` is StudentLoan."
                    },
                    "LoanId": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The ID of the connected loan"
                    },
                    "LiabilityType": {
                      "type": "string",
                      "description": "The type of liability being declaired - 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": "The 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"
                      ],
                      "description": "The repayment structure - either 'Principal & Interest' (default) or 'Interest Only'",
                      "default": null
                    },
                    "StartDate": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "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": falsetrue
        }
      },
      "required"additionalProperties": [false,
      "LiabilityType"
                  ],
                  "allOf": [
                    {
                      "if": {
                        "properties": {
                          "LiabilityType": {
                            "const"description": "BuyNowPayLater"Quote }Settings object. The settings entered here will be defined to the overall quote (ie. all clients and benefits)"
    }
  },
  "then"additionalProperties": {
                        "required": [
                          "RepaymentAmount",
                          "RepaymentFrequency",
                          "Balance",
                          "Limit"
                        ],
                        "properties": {
                          "RepaymentAmount": {
                            "type": "number"
                          },
                          "RepaymentFrequency": {
                            "type": "string"
                          },
                          "Balance": {
                            "type": "number"
                          },
                          "Limit": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "LiabilityType": {
                            "const": "StudentLoan"
                          }
                        }
                      },
                      "then": {
                        "required": [
                          "ApplicantId",
                          "RepaymentAmount",
                          "RepaymentFrequency",
                          "Balance"
                        ],
                        "properties": {
                          "RepaymentAmount": {
                            "type": "number"
                          },
                          "RepaymentFrequency": {
                            "type": "string"
                          },
                          "Balance": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "LiabilityType": {
                            "const": "Overdraft"
                          }
                        }
                      },
                      "then": {
                        "required": [
                          "RepaymentAmount",
                          "RepaymentFrequency",
                          "Limit"
                        ],
                        "properties": {
                          "RepaymentAmount": {
                            "type": "number"
                          },
                          "RepaymentFrequency": {
                            "type": "string"
                          },
                          "Limit": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "LiabilityType": {
                            "enum": [
                              "BusinessLoan",
                              "CarLoan",
                              "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"
                          },
                          "TotalTermMonths": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  ]
                },
                "default": []
              }
            }
          }
        }
      },
      "required": [
        "Loan",
        "ApplicantParty"
      ]
    },
    "Lenders": {
      "type": "array",
      "description": "[Lender codes](https://docs.blackfin.tools/books/mortgagerecenginemycrm/page/lenders) to include in calculation. If no Lenders are passed (empty array), the calc will return ASB, ANZ, BNZ, AIA and Westpac by default",
      "items": {
        "type": "string",
        "description": "",
        "enum": [
          "aia",
          "anz",
          "asb",
          "bnz",
          "co-op",
          "kiwibank",
          "resimac",
          "sbs",
          "select",
          "tsb",
          "westpac"
        ]
      }
    }
  },
  "required": [
    "Details",
    "Lenders"
  ]false
}
Examples
JSON Request Body
{
  "Session": {
    "ExternalID": ""
  },
  "Details": {
    "Loan": [
      {
        "LoanType": "New",
        "Lender": null,
        "LendingAction": null,
        "LiabilityType": "HomeLoan",
        "LoanAmount": 250000,
        "TopUpAmount": null,
        "TotalTermMonths": 180,
        "InterestOnlyTermMonths": 180,
        "Security": {
          "Value": 300000,
          "IsRBNZExempt": true,
          "Location": null,
          "PropertyType": [
            "ResidentialProperty",
            "FreeHoldResidential",
            null
          ],
          "SecurityType": "Proposed",
          "UsageType": "OwnerOccupied"
        },
        "LoanId": 1
      },
      {
        "LoanType": "Existing",
        "Lender": null,
        "LendingAction": "TopUp",
        "LiabilityType": "HomeLoan",
        "LoanAmount": 250000,
        "TopUpAmount": 50000,
        "TotalTermMonths": 183,
        "InterestOnlyTermMonths": 219,
        "Security": {
          "Value": 300000,
          "isRBNZExempt": false,
          "Location": null,
          "PropertyType": [
            "ResidentialProperty",
            "FreeHoldResidential",
            null
          ],
          "SecurityType": "Existing",
          "UsageType": "OwnerOccupied"
        },
        "LoanId": 2
      },
      {
        "LoanType": "Existing",
        "Lender": null,
        "LendingAction": "Refinance",
        "LiabilityType": "HomeLoan",
        "LoanAmount": 260000,
        "TopUpAmount": null,
        "TotalTermMonths": 180,
        "InterestOnlyTermMonths": 216,
        "Security": {
          "Value": 300000,
          "isRBNZExempt": false,
          "Location": null,
          "PropertyType": [
            "ResidentialProperty",
            "FreeHoldResidential",
            null
          ],
          "SecurityType": "Proposed",
          "UsageType": "OwnerOccupied"
        },
        "LoanId": 3
      },
      {
        "LoanType": "Existing",
        "Lender": null,
        "LendingAction": "Refinance",
        "LiabilityType": "HomeLoan",
        "LoanAmount": 370000,
        "TopUpAmount": null,
        "TotalTermMonths": 144,
        "InterestOnlyTermMonths": 0,
        "Security": {
          "Value": 410000,
          "isRBNZExempt": false,
          "Location": null,
          "PropertyType": [
            null,
            null,
            null
          ],
          "SecurityType": "Proposed",
          "UsageType": null
        },
        "LoanId": 4
      },
      {
        "LoanType": "Existing",
        "Lender": null,
        "LendingAction": "TopUp",
        "LiabilityType": "HomeLoan",
        "LoanAmount": 200000,
        "TopUpAmount": 50000,
        "TotalTermMonths": 180,
        "InterestOnlyTermMonths": 0,
        "Security": {
          "Value": 210000,
          "isRBNZExempt": false,
          "Location": null,
          "PropertyType": [
            null,
            null,
            null
          ],
          "SecurityType": "Proposed",
          "UsageType": null
        },
        "LoanId": 5
      }
    ],
    "ApplicantParty": [
      {
        "Applicant": [
          {
            "ApplicantId": 1,
            "Name": "Terence"
          },
          {
            "ApplicantId": 2,
            "Name": "Eve"
          }
        ],
        "Expense": [
          {
            "ApplicantId": 1,
            "ExpenseType": "ChildCare",
            "Frequency": "Monthly",
            "Amount": 300
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "ChildMaintenance",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "HigherEducationAndVocationalTraining",
            "Frequency": "Monthly",
            "Amount": 200
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "OtherEducation",
            "Frequency": "Monthly",
            "Amount": 100
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "PrivateSchoolCosts",
            "Frequency": "Monthly",
            "Amount": 300
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "PublicSchoolCosts",
            "Frequency": "Monthly",
            "Amount": 150
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "Groceries",
            "Frequency": "Monthly",
            "Amount": 200
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "OtherGroceries",
            "Frequency": "Monthly",
            "Amount": 150
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "BodyCorporatePrimaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "CouncilRatesPrimaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "ElectricityAndGasPrimaryResidence",
            "Frequency": "Monthly",
            "Amount": 100
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "FurnishingsAndElectrical",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "HomeOperation",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "HomeRepairs",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "OtherPrimaryResidenceExpense",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "WaterAndSewerPrimaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "BuildingInsurance",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "ContentsInsurance",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "HealthInsurance",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "IncomeProtection",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "LifeInsurance",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "OtherInsurance",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "VehicleInsurance",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "BodyCorporateInvestmentProperty",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "BuildingInsuranceInvestmentProperty",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "CouncilRatesInvestmentProperty",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "ElectricityAndGasInvestmentProperty",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "OtherInvestmentPropertyExpense",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "RepairsAndMaintenanceInvestmentProperty",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "RunningCostsInvestmentProperty",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "WaterAndSewerInvestmentProperty",
            "Frequency": "Monthly",
            "Amount": 200
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "ContentsInsuranceSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "BodyCorporateSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "BuildingInsuranceSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "CouncilRatesSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "ElectricityAndGasSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "OtherSecondaryResidenceExpense",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "RepairsAndMaintenanceSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "RunningCostsSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "WaterAndSewerSecondaryResidence",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "MedicalAndHealth",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "NaturalTherapies",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "Board",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "DryCleaning",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "AlcoholTobacco",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "CinemaConcertsMemberships",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "GymSports",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "OtherRecreationalAndEntertainment",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "Pets",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "HomeMobilePhone",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "InternetPayTVAndMediaStreamingSubscriptions",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "PublicTransport",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "Registration",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "TaxiRideSharing",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "TollsParking",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "Kiwisaver",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "RegularDonations",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "VoluntarySaving",
            "Frequency": "Monthly",
            "Amount": 10
          },
          {
            "ApplicantId": 1,
            "ExpenseType": "VoluntarySuper",
            "Frequency": "Monthly",
            "Amount": 10
          }
        ],
        "Income": [
          {
            "ApplicantId": 1,
            "Frequency": "Yearly",
            "Amount": 50000,
            "AmountType": "Gross",
            "IncomeType": "SalaryWages",
            "Attributes": []
          },
          {
            "ApplicantId": 1,
            "Frequency": "Yearly",
            "Amount": 5000,
            "AmountType": null,
            "IncomeType": "RentalIncome",
            "Attributes": [
              {
                "name": "PropertyBuildDate",
                "value": "2018-11-06"
              },
              {
                "name": "PropertyCountry",
                "value": "NZ"
              },
              {
                "name": "IsTaxExempt",
                "value": true
              },
              {
                "name": "SalePurchaseDate",
                "value": "2019-11-11"
              }
            ]
          },
          {
            "ApplicantId": 2,
            "Frequency": "Yearly",
            "Amount": 40000,
            "AmountType": "Gross",
            "IncomeType": "SalaryWages",
            "Attributes": []
          },
          {
            "ApplicantId": 2,
            "Frequency": "Yearly",
            "Amount": 5000,
            "AmountType": null,
            "IncomeType": "WorkAllowance",
            "Attributes": []
          },
          {
            "ApplicantId": 1,
            "Frequency": "Yearly",
            "Amount": 10000,
            "AmountType": null,
            "IncomeType": "Bonus",
            "Attributes": []
          },
          {
            "ApplicantId": 1,
            "Frequency": "Yearly",
            "Amount": 4000,
            "AmountType": null,
            "IncomeType": "BoarderIncome",
            "Attributes": [
              {
                "name": "BoarderIncomeType",
                "value": "AllInclusive"
              }
            ]
          },
          {
            "ApplicantId": 1,
            "Frequency": "Yearly",
            "Amount": 3000,
            "AmountType": null,
            "IncomeType": "CarAllowance",
            "Attributes": []
          },
          {
            "ApplicantId": 1,
            "Frequency": "Yearly",
            "Amount": 5000,
            "AmountType": null,
            "IncomeType": "FamilyAllowance",
            "Attributes": []
          }
        ],
        "Liability": [
          {
            "ApplicantId": 1,
            "LiabilityType": "HomeLoan",
            "RepaymentAmount": 2000,
            "RepaymentFrequency": "Monthly",
            "Limit": 4000,
            "Balance": 10000,
            "InterestRate": 0.02,
            "RepaymentType": "PrincipalInterest",
            "StartDate": "2017-11-15",
            "TotalTermMonths": 228,
            "InterestOnlyTermMonths": 228,
            "Lender": "Kiwibank",
            "IsRevolvingCredit": true
          },
          {
            "ApplicantId": 1,
            "LiabilityType": "CreditCard",
            "RepaymentAmount": null,
            "RepaymentFrequency": null,
            "Limit": 30000,
            "Balance": null,
            "InterestRate": null,
            "RepaymentType": null,
            "StartDate": null,
            "TotalTermMonths": null,
            "InterestOnlyTermMonths": null,
            "Lender": null,
            "IsRevolvingCredit": null
          },
          {
            "ApplicantId": 1,
            "LiabilityType": "PersonalLoan",
            "RepaymentAmount": 2000,
            "RepaymentFrequency": "Monthly",
            "Limit": 4000,
            "Balance": 30000,
            "InterestRate": 0.02,
            "RepaymentType": null,
            "StartDate": "2019-11-07",
            "TotalTermMonths": 220,
            "InterestOnlyTermMonths": null,
            "Lender": null,
            "IsRevolvingCredit": true
          },
          {
            "ApplicantId": 1,
            "LiabilityType": "Other",
            "RepaymentAmount": 200,
            "RepaymentFrequency": "Monthly",
            "Limit": 4000,
            "Balance": 10000,
            "InterestRate": 0.01,
            "RepaymentType": null,
            "StartDate": "2018-11-07",
            "TotalTermMonths": 183,
            "InterestOnlyTermMonths": null,
            "Lender": "Kiwibank",
            "IsRevolvingCredit": true
          },
          {
            "ApplicantId": 1,
            "LiabilityType": "HirePurchase",
            "RepaymentAmount": 2000,
            "RepaymentFrequency": "Monthly",
            "Limit": null,
            "Balance": 20000,
            "InterestRate": null,
            "RepaymentType": null,
            "StartDate": null,
            "TotalTermMonths": null,
            "InterestOnlyTermMonths": null,
            "Lender": null,
            "IsRevolvingCredit": null
          },
          {
            "ApplicantId": 1,
            "LiabilityType": "Overdraft",
            "RepaymentAmount": 2000,
            "RepaymentFrequency": "Monthly",
            "Limit": 4000,
            "Balance": 20000,
            "InterestRate": 0.02,
            "RepaymentType": null,
            "StartDate": null,
            "TotalTermMonths": null,
            "InterestOnlyTermMonths": null,
            "Lender": null,
            "IsRevolvingCredit": null
          },
          {
            "LoanId": 2,
            "Lender": null,
            "Balance": 195000,
            "Limit": 250000,
            "InterestRate": 1,
            "RepaymentAmount": 15000,
            "RepaymentFrequency": "Monthly",
            "RepaymentType": null,
            "TotalTermMonths": 183,
            "StartDate": null,
            "IsRevolvingCredit": null,
            "InterestOnlyTermMonths": 216,
            "ApplicantId": 1,
            "LiabilityType": "HomeLoan"
          },
          {
            "Lender": null,
            "Balance": 200000,
            "Limit": 260000,
            "InterestRate": 2,
            "RepaymentAmount": 10000,
            "RepaymentFrequency": "Monthly",
            "RepaymentType": "PrincipalInterest",
            "TotalTermMonths": 180,
            "StartDate": null,
            "IsRevolvingCredit": null,
            "InterestOnlyTermMonths": 216,
            "ApplicantId": 1,
            "LiabilityType": "HomeLoan",
            "LoanId": 3
          }
        ],
        "NumberOfDependents": 1,
        "NumberOfVehicles": 1
      }
    ]
  },
  "Lenders": []
}

 

Response


✅ Success

JSON Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Response JSON Body",
  "type": "object",
  "properties": {
    "SessionID": {
      "type": "string",
      "description": "20 characters in length, random generated alphanumeric string, mixed case"
    }
  }
}
Examples
Success Response
{
  "SessionID": "BYWSw2DTUBuHVMW4ZdhK"
}

❌ Error

JSON Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "description": "Error information",
      "properties": {
        "message": {
          "type": "string",
          "description": "Human readable error message"
        },
        "status": {
          "type": "string",
          "description": "Error code in uppercase letters and _ as space",
          "enum": ["INVALID_ARGUMENT","DEADLINE_EXCEEDED","NOT_FOUND","ALREADY_EXISTS","PERMISSION_DENIED","RESOURCE_EXHAUSTED","FAILED_PRECONDITION","ABORTED","OUT_OF_RANGE","UNIMPLEMENTED","INTERNAL","UNAVAILABLE","DATA_LOSS","UNAUTHENTICATED"]
        },
        "details": {
          "type": "object",
          "description": "Additional error details",
          "properties": {
            "validation_errors": {
              "type": "array",
              "description": "Errors thrown when validating input data",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "array",
                    "description": "An array of property keys or array offsets, indicating where inside objects or arrays the instance was found.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "property": {
                    "type": "string",
                    "description": "Describes the property path. Starts with `instance`, and is delimited with a dot (.)."
                  },
                  "message": {
                    "type": "string",
                    "description": "A human-readable message for debugging use. Provided in English and subject to change."
                  },
                  "schema": {
                    "type": "object",
                    "description": "The schema containing the keyword that failed",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "required": ["type"]
                  },
                  "instance": {
                    "description": "The instance (value) that failed",
                    "type": ["null", "object"]
                  },
                  "name": {
                    "type": "string",
                    "description": "The keyword within the schema that failed."
                  },
                  "argument": {
                    "type": "array",
                    "description": "Provides information about the keyword that failed.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "stack": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "required": ["path", "property", "message", "schema", "instance", "name", "argument", "stack"]
}
Examples
Missing API Key (Status: 401)
{
    "error": {
        "message": "Missing API Key",
        "status": "UNAUTHENTICATED"
    }
}

 

Invalid API Key (Status: 401)
{
    "error": {
        "message": "Invalid API Key",
        "status": "UNAUTHENTICATED"
    }
}

 

Invalid data (Status: 400)
{
    "error": {
        "message": "Invalid data",
        "status": "INVALID_ARGUMENT",
        "details": {
            "validation_errors": [
                {
                    "path": [
                        "Details",
                        "Loan",
                        0,
                        "LoanType"
                    ],
                    "property": "instance.Details.Loan[0].LoanType",
                    "message": "is not one of enum values: Existing,Proposed",
                    "schema": {
                        "type": "string",
                        "description": "Defines whether the applicant already has this loan or if it's a new loan",
                        "enum": [
                            "Existing",
                            "New"
                        ]
                    },
                    "instance": "Proposed",
                    "name": "enum",
                    "argument": [
                        "Existing",
                        "Proposed"
                    ],
                    "stack": "instance.Details.Loan[0].LoanType is not one of enum values: Existing,Proposed"
                }
            ]
        }
    }
}