{"openapi":"3.0.1","info":{"title":"360-Mira®","description":"360-Mira® A financial satisfaction calculator that estimates the happiness score based on a customer’s current situation","version":"latest"},"servers":[{"url":"https://api-sandbox.360f.com/happiu/v3"}],"paths":{"/api/v3/mira-insight":{"post":{"tags":["360 - HappiU - v3"],"summary":"Mira Insight","description":"Calculate future financial satisfaction score based on customer's self-defined goals and projected wealth.","operationId":"6241b0982a4e55fc7cc5f5c5","requestBody":{"description":"inputs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MiraInsightRequestBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MiraInsightResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"example":{"statusCode":500,"message":"Server error"}}}}}}}},"components":{"schemas":{"MiraInsightRequestBody":{"type":"object","properties":{"productId":{"type":"string","example":"P_MIRA_06","description":""},"productVersion":{"type":"string","example":"0.0.1","description":""},"workflowNo":{"type":"string","example":1,"description":""},"language":{"type":"string","example":"thai","description":"To indicate Insight message language","default":"en","enum":["en","thai"]},"financialInsights":{"type":"boolean","example":true,"description":""},"sessionId":{"type":"string","example":"xxxxxxxx-xxxx-xxxx-xxxxxxxx","description":"ID present each request."},"noDeathFlag":{"type":"boolean","example":false,"description":"False mean that we will include scenarios where death has occurred for example."},"preHappiURequired":{"type":"boolean","example":true,"description":"If True, then calculate HappiU based on current insurance & investment portfolio only. If False, then don’t need to calculate HappiU based on current insurance & investment portfolio. Can also mention that for this, the solutionOptimizerOutput can be empty of products."},"postHappiURequired":{"type":"boolean","example":false,"description":"If True, then calculate HappiU based on ne hypothetical insurance & investment portfolio only. If False, then don’t need to do this calculation. Need to mention that for this, the solutionOptimizerOutput need to have products."},"manualEvents":{"type":"object","properties":{"flag":{"type":"boolean","example":false,"description":"True mean that event will be trigged."},"eventType":{"type":"string","example":"Death","enum":["Death","Unemployment","CI"],"description":"Event name"},"year":{"type":"integer","example":0,"description":"Give a proper year example. Description should be “The year the user wants to trigger the manual event in”"}}},"commonDetails":{"$ref":"#/components/schemas/commonDetails"},"personalDetails":{"$ref":"#/components/schemas/personalDetails"},"needCalculatorOutput":{"type":"object","properties":{"N_RET":{"$ref":"#/components/schemas/needOutputRet"},"N_EDU":{"$ref":"#/components/schemas/needOutputEdu"},"N_SAV":{"$ref":"#/components/schemas/needOutputSav"},"N_PRP":{"$ref":"#/components/schemas/needOutputPrp"},"N_OTH":{"$ref":"#/components/schemas/needOutputOth"},"N_INC":{"$ref":"#/components/schemas/needOutputInc"},"N_CRI":{"$ref":"#/components/schemas/needOutputCri"}}}},"required":["sessionId","noDeathFlag","preHappiURequired","postHappiURequired","manualEvents","commonDetails","personalDetails","needCalculatorOutput"]},"MiraInsightResponse":{"type":"object","properties":{"data":{"type":"array","items":{"required":["insightCode","insightMessage","category"],"properties":{"insightCode":{"type":"string","example":"MHU0064","description":"The unique id for each insight"},"insightMessage":{"type":"string","example":"You do not have significant assets now. So, you miss the opportunity of them appreciating over time to help you realize your financial needs and aspirations.","description":"description"},"priority":{"type":"integer","example":1,"description":"This is the order in which the insights will need to be displayed."},"type":{"type":"string","example":"Explain","description":"This denotes whether the insight message explains why their HappiU is scored in such a way or give a action point on how to improve their HappiU."},"category":{"type":"string","example":"General","description":"This denotes which goal/need the insight is referring to."},"categoryPriority":{"type":"integer","example":1,"description":"This denotes in which order the goal/need needs to be displayed to the customer."},"X":{"type":"string","example":"28","description":"This is the order in which the insights will need to be displayed."},"Z":{"type":"string","example":"170,279","description":"This denotes whether the insight message explains why their HappiU is scored in such a way or give a action point on how to improve their HappiU."}}}}}},"commonDetails":{"type":"object","description":"Common details of user's cash flow","properties":{"annualBudget":{"type":"number","example":33600,"description":"The amount of annual budget"},"planningCurrency":{"type":"string","example":"SGD","description":"The currency used by the assumption country."},"totalMonthlyRegularExpense":{"type":"number","example":7000,"description":"The amount of monthly expense"},"totalMonthlyRegularIncome":{"type":"number","example":14000,"description":"The amount of monthly income"}}},"personalDetails":{"description":"Detailed information about customers' needs, goals, cash flow and financial situation","type":"array","items":{"type":"object","properties":{"ageOfRetirement":{"type":"string","example":62,"description":"The age to retire"},"assets":{"$ref":"#/components/schemas/needInputAsset"},"cashFlows":{"type":"object","properties":{"expenses":{"type":"array","items":{"type":"object","properties":{"absoluteValue":{"type":"number","example":14000},"frequency":{"type":"number","example":1},"targetYear":{"type":"string","format":"nullable"},"type":{"type":"string","enum":["E_RNT","E_HSD","E_SCH","E_UNI","E_LFS","E_DBR","E_INP","E_INI","E_OTH"],"example":"E_RNT","description":"The type of expense"}}}},"income":{"type":"array","items":{"type":"object","properties":{"absoluteValue":{"type":"number","example":14000},"frequency":{"type":"number","example":1},"targetYear":{"type":"string","format":"nullable"},"type":{"type":"string","enum":["I_SAL","I_RNT","I_INV","I_BIN","I_OTH"],"example":"I_SAL","description":"The type of income"}}}},"monthlyIncome":{"type":"number","example":14000}}},"dateOfBirth":{"type":"string","example":"14/01/2004"},"gender":{"type":"string","enum":["Male","Female"],"example":"Male"},"isFatca":{"type":"boolean","description":"Are you a US citizen and/or US tax payer?"},"isFinanciallyIndependent":{"type":"boolean","example":true},"isPolicyOwner":{"type":"boolean","example":false},"isSmoker":{"type":"boolean","example":false},"liabilities":{"type":"object","properties":{"loans":{"type":"array","items":{"type":"object","properties":{"currentValue":{"type":"string","format":"nullable"},"frequency":{"type":"string","format":"nullable"},"installments":{"type":"string","format":"nullable"},"interestRate":{"type":"string","format":"nullable"},"proportion":{"type":"string","format":"nullable"},"remainingYears":{"type":"string","format":"nullable"},"type":{"type":"string","format":"nullable"}}}},"tax":{"type":"object","properties":{"value":{"type":"number","example":0}}}}},"needs":{"type":"array","items":{"type":"object","oneOf":[{"$ref":"#/components/schemas/needInputRet"},{"$ref":"#/components/schemas/needInputInc"},{"$ref":"#/components/schemas/needInputEdu"},{"$ref":"#/components/schemas/needInputPrp"},{"$ref":"#/components/schemas/needInputSav"},{"$ref":"#/components/schemas/needInputOth"},{"$ref":"#/components/schemas/needInputCri"}]}},"partnerId":{"type":"string","example":"397103c0-6782-11ec-a862-37e3a2cedabf"},"partnerType":{"type":"string","example":"IND"},"relationshipToPO":{"type":"string","format":"nullable"},"riskProfile":{"type":"number","example":4},"socialSecurity":{"type":"object","properties":{"cpfSalaryContribution":{"type":"boolean"},"health":{"type":"string","format":"nullable"},"installmentsPayCash":{"type":"string","format":"nullable"},"installmentsPayCpf":{"type":"string","format":"nullable"},"mortgageSelect":{"type":"object","properties":{"id":{"type":"string","format":"nullable"},"installments":{"type":"string","format":"nullable"},"remainingTenure":{"type":"string","format":"nullable"}}},"other":{"type":"string","format":"nullable"},"retirement":{"type":"string","format":"nullable"}}},"tenantId":{"type":"string","example":"f3fcf9f4-4283-4f44-ac52-4b276817f9ee"}}}},"needInputAsset":{"type":"object","properties":{"id":{"type":"string","example":"1f08a940-7879-11ec-9d16-a5097a708918","description":"The ID in UUID format of current asset"},"type":{"type":"string","enum":["A_EQT","A_MUT","A_PRP","A_FXD","A_SAV","A_CSH","A_OTH"],"description":"The type of current asset.","example":"A_SAV"},"currentValue":{"type":"number","example":25760,"description":"The amount of current asset value."},"ageToLiquidate":{"type":"number","example":82,"description":"The number of years to liquidate."},"interestRate":{"type":"number","example":0.037,"description":"The interest rate of current asset."},"recurringContribution":{"type":"object","description":"Recurring contributions","properties":{"value":{"type":"number","example":1,"description":"The amount of recurring contributions."},"frequency":{"type":"number","example":1,"description":"The frequency of recurring contributions."},"duration":{"type":"number","example":10,"description":"The duration of recurring contributions."}}},"proportion":{"type":"number","example":1,"description":"The proportion rate of current asset"}}},"needInputRet":{"type":"object","properties":{"needId":{"type":"string","example":"N_RET"},"type":{"type":"string","example":"N_RET"},"existingSumAssured":{"type":"number","example":0},"existingAnnualPremium":{"type":"number","example":0},"priority":{"type":"number","example":3},"existingMaturityYear":{"type":"number","example":0},"numYearDependents":{"type":"number","example":10},"targetYear":{"type":"number","example":70},"ageOfRetirement":{"type":"number","example":70},"taggedAsset":{"type":"object","properties":{"id":{"type":"string","example":null},"type":{"type":"string","example":null},"partner":{"type":"string","example":null}}},"region":{"type":"string","example":"R_GBR"},"lifestyle":{"type":"number","example":1},"chosenNeedGoalFlag":{"type":"number","example":1}}},"needInputInc":{"allOf":[{"$ref":"#/components/schemas/needInputRet"},{"properties":{"needId":{"type":"string","example":"N_INC"},"type":{"type":"string","example":"N_INC"}}}]},"needInputCri":{"allOf":[{"$ref":"#/components/schemas/needInputRet"},{"properties":{"needId":{"type":"string","example":"N_CRI"},"type":{"type":"string","example":"N_CRI"}}}]},"needInputEdu":{"allOf":[{"$ref":"#/components/schemas/needInputRet"},{"properties":{"needId":{"type":"string","example":"N_EDU"},"type":{"type":"string","example":"N_EDU"}}}]},"needInputPrp":{"allOf":[{"$ref":"#/components/schemas/needInputRet"},{"properties":{"needId":{"type":"string","example":"N_PRP"},"type":{"type":"string","example":"N_PRP"}}}]},"needInputSav":{"allOf":[{"$ref":"#/components/schemas/needInputRet"},{"properties":{"needId":{"type":"string","example":"N_SAV"},"type":{"type":"string","example":"N_SAV"}}}]},"needInputOth":{"allOf":[{"$ref":"#/components/schemas/needInputRet"},{"properties":{"needId":{"type":"string","example":"N_OTH"},"type":{"type":"string","example":"N_OTH"}}}]},"needOutputRet":{"type":"object","description":"The Response payload of Retirement Goal.","properties":{"primaryOutput":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner in UUID format. Example: 3c7b5b10-777c-11ec-9d16-a5097a708918.","type":"array","items":{"type":"object","properties":{"needId":{"type":"string","example":"N_RET","description":"The ID of the Needs/Goals in N_xxx format."},"retirementAge":{"type":"number","example":62,"description":"The age at which the client intends to retire."},"livingExpenses":{"type":"number","example":38640,"description":"The amount of money spent for living."},"expectedLivingExpenseInTheCountry":{"type":"number","example":38640,"description":"The amount of money that expected spending for living"},"numYearsToRetirement":{"type":"number","example":39,"description":"The year at which the client intends to retire."},"savingsRate":{"type":"number","example":0.0037,"description":"The current Saving Rate value."},"inflationRate":{"type":"number","example":0.0017,"description":"The current Inflation Rate value."},"futureValue":{"type":"number","example":41286.3409,"description":"The future amount of current value ."},"ror":{"type":"number","example":0.019,"description":"The Rate on Return value."},"durationToRetirement":{"type":"number","example":21,"description":"The number of years from the current age to the year at which the client intends to retire."},"totalNeed":{"type":"number","example":849952.9047,"description":"The total amount that expected to fulfill the Retirement Goal."},"taggedFundValue":{"type":"number","example":0,"description":"The amount of fund that using for the Retirement Goal."},"taggedAssetCurrentValue":{"type":"number","example":null,"description":"The amount of asset that using for the Retirement Goal."},"socialSecurityValue":{"type":"number","example":0,"description":"The amount of Social Security using for the Retirement Goal."},"totalShortfall":{"type":"number","example":849952.9047,"description":"The total amount missing to fulfill the Retirement Goal."}}}}}}}},"needOutputEdu":{"type":"object","description":"The Response payload of Education Goal.","properties":{"primaryOutput":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner in UUID format. Example: 3c7b5b10-777c-11ec-9d16-a5097a708918.","type":"array","items":{"type":"object","properties":{"needId":{"type":"string","example":"N_EDU","description":"The ID of the Needs/Goals in N_xxx format."},"fundsNeededYear":{"type":"number","example":2032,"description":"The year in which the client intends to study."},"numYearsToSave":{"type":"number","example":10,"description":"The number of years from the current age to the year at which the client intends to study."},"costOfEducation":{"type":"number","example":161701,"description":"The amount of Cost of Education "},"savingsRate":{"type":"number","example":0.0037,"description":"The current Saving Rate value."},"inflationRate":{"type":"number","example":0.0017,"description":"The current Inflation Rate value."},"totalNeed":{"type":"number","example":164471.0418,"description":"The total amount that expected to fulfill Education Goal."},"taggedFundValue":{"type":"number","example":0,"description":"The amount of fund that using for the Education Goal."},"taggedAssetCurrentValue":{"type":"number","example":0,"description":"The amount of asset that using for the Education Goal."},"costOfTuitionFeeEducation":{"type":"number","example":136200,"description":"The amount of Cost of Tuition Fee."},"futureCostOfLivingExpense":{"type":"number","example":25937.8484,"description":"The future amount of Cost of Living Expense."},"costOfLivingExpenseEducation":{"type":"number","example":25501,"description":"The amount of Cost of Living Expense."},"futureCostOfTuitionFee":{"type":"number","example":138533.1933,"description":"The future amount of Cost of Tuition Fee."},"totalShortfall":{"type":"number","example":164471.0418,"description":"The total amount missing to fulfill the Education Goal."}}}}}}}},"needOutputSav":{"type":"object","description":"The Response payload of General Savings Goal.","properties":{"primaryOutput":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner in UUID format. Example: 3c7b5b10-777c-11ec-9d16-a5097a708918.","type":"array","items":{"type":"object","properties":{"needId":{"type":"string","example":"N_SAV","description":"The ID of the Needs/Goals in N_xxx format."},"fundsNeededYear":{"type":"number","example":2027,"description":"The year in which the client expected to get the General Savings."},"savingsRate":{"type":"number","example":0.0037,"description":"The current Saving Rate value."},"totalNeed":{"type":"number","example":100000,"description":"The total amount that expected to fulfill the General Savings Goal."},"taggedFundValue":{"type":"number","example":0,"description":"The amount of fund that using for the General Savings Goal."},"totalShortfall":{"type":"number","example":100000,"description":"The total amount missing to fulfill the General Savings Goal."}}}}}}}},"needOutputPrp":{"type":"object","description":"The Response payload of Property Goal.","properties":{"primaryOutput":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner in UUID format. Example: 3c7b5b10-777c-11ec-9d16-a5097a708918.","type":"array","items":{"type":"object","properties":{"needId":{"type":"string","example":"N_PRP","description":"The ID of the Needs/Goals in N_xxx format."},"fundsNeededYear":{"type":"number","example":2027,"description":"The year in which the client expected to get the Property Goal."},"savingsRate":{"type":"number","example":0.0037,"description":"The current Saving Rate value."},"totalNeed":{"type":"number","example":200000,"description":"The total amount that expected to fulfill the Property Goal."},"taggedFundValue":{"type":"number","example":0,"description":"The amount of fund that using for the Property Goal."},"totalShortfall":{"type":"number","example":200000,"description":"The total amount missing to fulfill the Property Goal."}}}}}}}},"needOutputOth":{"type":"object","description":"The Response payload of Other Goal.","properties":{"primaryOutput":{"type":"object","properties":{"partnerId":{"type":"array","description":"The ID of the partner in UUID format. Example: 3c7b5b10-777c-11ec-9d16-a5097a708918.","items":{"type":"object","properties":{"needId":{"type":"string","example":"N_OTH","description":"The ID of the Needs/Goals in N_xxx format."},"fundsNeededYear":{"type":"number","example":2027,"description":"The year in which the client expected to get the Goal."},"savingsRate":{"type":"number","example":0.0037,"description":"The current Saving Rate value."},"totalNeed":{"type":"number","example":10000,"description":"The total amount that expected to fulfill the Goal."},"taggedFundValue":{"type":"number","example":0,"description":"The amount of fund that using for the Goal."},"totalShortfall":{"type":"number","example":10000,"description":"The total amount missing to fulfill the Goal."}}}}}}}},"needOutputInc":{"type":"object","description":"The Response payload of Life Protection.","properties":{"primaryOutput":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner in UUID format. Example: 3c7b5b10-777c-11ec-9d16-a5097a708918.","type":"array","items":{"type":"object","properties":{"needId":{"type":"string","example":"N_INC","description":"The ID of the Needs/Goals in N_xxx format."},"ror":{"type":"number","example":0.0019,"description":"The Rate on Return value."},"lumpSumNeeded":{"type":"number","example":255302.3775,"description":"The amount of lumpsum that needed."},"totalLiabilites":{"type":"number","example":0,"description":"The amount of liabilities."},"funeralExpense":{"type":"number","example":20000,"description":"The amount of funeral expense"},"totalNeed":{"type":"number","example":275302.3775,"description":"The total amount that expected to fulfill the Life Protection."},"existingLifeCover":{"type":"number","example":0,"description":"The amount of Existing Life Cover that using for the Life Protection."},"totalShortfall":{"type":"number","example":275302.3775,"description":"The total amount missing to fulfill the Life Protection."}}}}}}}},"needOutputCri":{"type":"object","description":"The Response payload of Critical Illness Protection.","properties":{"primaryOutput":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner in UUID format. Example: 3c7b5b10-777c-11ec-9d16-a5097a708918.","type":"array","items":{"type":"object","properties":{"needId":{"type":"string","example":"N_CRI","description":"The ID of the Needs/Goals in N_xxx format."},"livingExpenses":{"type":"number","example":38640,"description":"The amount of money spent for living."},"numYearsIncomeNeeded":{"type":"number","example":3,"description":"The number of years of the Income that needed."},"ror":{"type":"number","example":0.002,"description":"The Rate on Return value."},"proportionOfExpenses":{"type":"number","example":0.5,"description":"The proportion rate of Expenses"},"lumpSumNeeded":{"type":"number","example":57960,"description":"The amount of lumpsum that needed."},"medicalCost":{"type":"number","example":200000,"description":"The amount of the Medical Cost"},"totalNeed":{"type":"number","example":257960,"description":"The total amount that expected to fulfill the Critical Illness Protection."},"existingCiCover":{"type":"number","example":0,"description":"The amount of Existing Critical Illness Cover that using for the Critical Illness Protection."},"totalShortfall":{"type":"number","example":257960,"description":"The total amount missing to fulfill the Critical Illness Protection."}}}}}}}}},"securitySchemes":{"apiKeyHeader":{"type":"apiKey","name":"Ocp-Apim-Subscription-Key","in":"header"},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"bearer","description":"Bearer token"},"tenantHeader":{"type":"apiKey","name":"X-TENANT-ID","in":"header"}}},"security":[{"apiKeyHeader":[]},{"bearerAuth":[]},{"tenantHeader":[]}]}