{"swagger":"2.0","info":{"description":"The Risk Questionnaire Profiler API provides a risk profile rating for an investor, and related asset allocation, based on risk profile questionnaire answers. This API contains 3 parts; getQuestionnaireNames has no request parameters and returns a list of the available questionnaires, getQuestionnaireData takes a questionnaire name (selected from the list returned in getQuesionnaireNames above) as the request parameter and returns the questions and associated answers. It also returns the version number for the questionnaire, calculateRisk takes the questionnaire name, question and response ids selected by client and investment term as request parameters. Returns the calculated risk profile and fund/asset breakdown for the calculated risk profile. Please refer to the Pricing Plan and the Credits Plan for the number of credits required to call this API.","version":"1.0.0","title":"RiskQuestionnaireProfiler","contact":{"name":"EValue Support","url":"https://www.ev.uk","email":"support@ev.uk"}},"schemes":["https","http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/riskProfiler/getQuestionnaireNames":{"get":{"summary":"Returns the names of all available risk questionnaires","description":"","operationId":"getQuestionnaireNames","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/QuestionnaireNamesResult"}},"500":{"description":"System error","schema":{"$ref":"#/definitions/SystemError"}}},"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/riskProfiler/getQuestionnaireData":{"post":{"summary":"Returns the details of a risk questionnaire.","description":"","operationId":"getQuestionnaireData","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The parameters required to get the questionnaire","required":true,"schema":{"$ref":"#/definitions/QuestionnaireDataParameters"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/QuestionnaireDataResult"}},"400":{"description":"Validation errors","schema":{"$ref":"#/definitions/ValidationErrors"}},"500":{"description":"System error","schema":{"$ref":"#/definitions/SystemError"}}},"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/riskProfiler/calculateRisk":{"post":{"summary":"Provides a risk profile rating for an investor, based on risk profile questionnaire answers.","description":"","operationId":"calculateRisk","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The parameters required to calculate the risk profile","required":true,"schema":{"$ref":"#/definitions/RiskQuestionnaireParameters"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/RiskQuestionnaireResult"}},"400":{"description":"Validation errors","schema":{"$ref":"#/definitions/ValidationErrors"}},"500":{"description":"System error","schema":{"$ref":"#/definitions/SystemError"}}},"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}}},"definitions":{"Fund":{"type":"object","required":["code","contributionPercentage"],"properties":{"code":{"type":"string","example":"Returns_File_UK_Equity","description":"Enter fund code for forecast. Use Citicode or asset class - see documentation for further information on asset class codes."},"name":{"type":"string","description":"The name of the fund.","readOnly":true},"contributionPercentage":{"type":"number","format":"double","example":100,"description":"Contribution percentage allocated to that fund.","minimum":0,"maximum":100}},"description":"A fund an investment can be invested in."},"QuestionData":{"type":"object","properties":{"questionId":{"type":"integer","format":"int32","example":1,"description":"The question number"},"questionText":{"type":"string","example":"Compared to others, what amount of risk have you taken with your past financial decisions?","description":"The question text"},"metaInf":{"type":"string","example":"[QUESTION_TYPE=MULTIPLE_CHOICE],[IMAGEREF=simple.png]","description":"Implementation specific custom meta information for the question"},"responses":{"type":"array","description":"The list of responses for this question","items":{"$ref":"#/definitions/ResponseData"}}},"description":"A questionnaire question"},"QuestionResponse":{"type":"object","required":["questionId","responseId"],"properties":{"questionId":{"type":"integer","format":"int32","example":1,"description":"The question number"},"responseId":{"type":"integer","format":"int32","example":2,"description":"The response number to the question"}},"description":"An object containing a question number and a response number to that question"},"QuestionnaireDataParameters":{"type":"object","required":["questionnaireName"],"properties":{"questionnaireName":{"type":"string","example":"5risk","description":"The name of the questionnaire to be returned"}},"description":"The parameters object to retreive a risk questionnaire based on the name"},"QuestionnaireDataResult":{"type":"object","properties":{"name":{"type":"string","example":"5risk","description":"The name of the questionnaire"},"questions":{"type":"array","example":[{"questionId":1,"questionText":"I would enjoy exploring investment opportunities for my money.","responses":[{"responseText":"I strongly agree with this statement"},{"responseText":"I tend to agree with this statement"},{"responseText":"In between"},{"responseText":"I tend to disagree with this statement"},{"responseText":"I strongly disagree with this statement"}]},{"questionId":2,"questionText":"I would go for the best possible return even if there were risk involved","responses":[{"responseText":"Always"},{"responseText":"Usually"},{"responseText":"Sometimes"},{"responseText":"Rarely"},{"responseText":"Never"}]},{"questionId":3,"questionText":"Compared to other people, how would you describe your typical attitude when making important financial decisions?","responses":[{"responseText":"Very adventurous"},{"responseText":"Fairly adventurous"},{"responseText":"Average"},{"responseText":"Fairly cautious"},{"responseText":"Very cautious"}]},{"questionId":4,"questionText":"Compared to others, what amount of risk have you taken with your past financial decisions?","responses":[{"responseText":"Very Large"},{"responseText":"Large"},{"responseText":"Medium"},{"responseId":4,"responseText":"Small"},{"responseId":5,"responseText":"Very small"}]},{"questionId":5,"questionText":"To reach my financial goal I prefer an investment which is safe and grows slowly but steadily, even if it means lower growth overall.","responses":[{"responseId":1,"responseText":"I strongly agree with this statement"},{"responseId":2,"responseText":"I tend to agree with this statement"},{"responseId":3,"responseText":"In between"},{"responseId":4,"responseText":"I tend to disagree with this statement"},{"responseId":5,"responseText":"I strongly disagree with this statement"}]},{"questionId":6,"questionText":"I am looking for high investment growth.  I am willing to accept the possibility of greater losses to achieve this.","responses":[{"responseId":1,"responseText":"I strongly agree with this statement"},{"responseId":2,"responseText":"I tend to agree with this statement"},{"responseId":3,"responseText":"In between"},{"responseId":4,"responseText":"I tend to disagree with this statement"},{"responseId":5,"responseText":"I strongly disagree with this statement"}]},{"questionId":7,"questionText":"If you had money to invest, how much would you be willing to place in an investment with possible high returns but an equal element of risk?","responses":[{"responseId":1,"responseText":"All of it"},{"responseId":2,"responseText":"More than half"},{"responseId":3,"responseText":"Half"},{"responseId":4,"responseText":"Less than half"},{"responseId":5,"responseText":"None"}]},{"questionId":8,"questionText":"How would a close friend describe your attitude to taking financial risks?","responses":[{"responseId":1,"responseText":"Daring"},{"responseId":2,"responseText":"Sometimes daring"},{"responseId":3,"responseText":"A thoughtful risk taker"},{"responseId":4,"responseText":"Careful"},{"responseId":5,"responseText":"Very cautious and risk averse"}]},{"questionId":9,"questionText":"If you had picked an investment with potential for large gains but also the risk of large losses how would you feel:","responses":[{"responseId":1,"responseText":"Panicked and very uncomfortable"},{"responseId":2,"responseText":"Quite uneasy"},{"responseId":3,"responseText":"A little concerned"},{"responseId":4,"responseText":"Accepting of the possible highs and lows"},{"responseId":5,"responseText":"Excited by the potential for gain"}]},{"questionId":10,"questionText":"Imagine that you have some money to invest and a choice of two investment products, which option would you choose?","responses":[{"responseId":1,"responseText":"A low average annual return but almost no risk of loss of the initial investment"},{"responseId":2,"responseText":"A higher average annual return but some risk of losing part of the initial investment"},{"responseId":3,"responseText":"A mixture of the above"}]},{"questionId":11,"questionText":"I would prefer small certain gains to large uncertain ones.","responses":[{"responseId":1,"responseText":"I strongly agree with this statement"},{"responseId":2,"responseText":"I tend to agree with this statement"},{"responseId":3,"responseText":"In between"},{"responseId":4,"responseText":"I tend to disagree with this statement"},{"responseId":5,"responseText":"I strongly disagree with this statement"}]},{"questionId":12,"questionText":"When considering a major financial decision which statement BEST describes the way you think about the possible losses or the possible gains?","responses":[{"responseId":1,"responseText":"I'm excited about the possible gains"},{"responseId":2,"responseText":"I'm optimistic about possible gains"},{"responseId":3,"responseText":"I think about both the possible gains and losses"},{"responseId":4,"responseText":"I am conscious of the possible losses"},{"responseId":5,"responseText":"I worry about the possible losses"}]},{"questionId":13,"questionText":"I want my investment money to be safe even if it means lower returns.","responses":[{"responseText":"I strongly agree with this statement"},{"responseText":"I tend to agree with this statement"},{"responseText":"In between"},{"responseText":"I tend to disagree with this statement"},{"responseText":"I strongly disagree with this statement"}]}],"description":"The list of questions and responses for the questionnaire","items":{"$ref":"#/definitions/QuestionData"}},"version":{"type":"integer","format":"int32","example":1,"description":"The version of the questionnaire"}},"description":"The result object containing information about a questionaire"},"QuestionnaireNamesResult":{"type":"object","properties":{"questionnaireNames":{"type":"array","example":["5risk","7risk","10risk"],"description":"The list of available risk questionnaire names","items":{"type":"string"}}},"description":"The result of the API call for all available questionnaire names"},"QuestionnaireValidationError":{"type":"object","properties":{"type":{"type":"string","example":"MESSAGE","description":"The type of validation error","enum":["MESSAGE_AND_CONFIRM","INCONSISTENT_RESPONSE","MESSAGE","QUESTIONNAIRE"]},"title":{"type":"string","example":"Inconsistent overall result vs question 12 response","description":"The title of the validation error"},"message":{"type":"string","example":"The response to question 12 is inconsistent with the overall risk result.","description":"The validation error message"},"inconsistentQ1":{"type":"integer","format":"int32","description":"The first question that has an answer that contradicts another"},"inconsistentQ2":{"type":"integer","format":"int32","description":"The second question that has an answer that contradicts another"}}},"ResponseData":{"type":"object","properties":{"responseId":{"type":"integer","format":"int32","example":1,"description":"The response number"},"responseText":{"type":"string","example":"Medium","description":"The response text"},"linkedQuestionId":{"type":"integer","format":"int32","example":2,"description":"A linked question number for this response, typically the next question to ask.  A value of null indicates ask the next sequential question number, a value of -1 means the end of the questionaire, no further questions."},"metaInf":{"type":"string","example":"TYPE:Integer or user.confidentInvestor=true","description":"Any META-INF for this response"}},"description":"A response to a questionnaire question"},"RiskQuestionnaireParameters":{"type":"object","required":["questionnaireName","responses","term"],"properties":{"responses":{"type":"array","example":[{"questionId":1,"responseId":2},{"questionId":2,"responseId":3},{"questionId":3,"responseId":3},{"questionId":4,"responseId":4},{"questionId":5,"responseId":2},{"questionId":6,"responseId":2},{"questionId":7,"responseId":3},{"questionId":8,"responseId":2},{"questionId":9,"responseId":4},{"questionId":10,"responseId":3},{"questionId":11,"responseId":3},{"questionId":12,"responseId":2},{"questionId":13,"responseId":4}],"description":"The responses to the risk questionnaire","items":{"$ref":"#/definitions/QuestionResponse"}},"questionnaireName":{"type":"string","example":"5risk","description":"The name of the risk questionnaire completed"},"term":{"type":"integer","format":"int32","example":15,"description":"The investment term in years"}},"description":"The parameters object to risk assess a risk questionnaire based on a user's responses"},"RiskQuestionnaireResult":{"type":"object","properties":{"riskProfile":{"type":"integer","format":"int32","example":5,"description":"The calculated risk profile from the questionnaire responses"},"riskProfileName":{"type":"string","example":"5 - Low end of Moderate","description":"The name of the calculated risk profile from the questionnaire responses"},"riskProfileDescription":{"type":"array","example":["You are prepared to take a moderate amount of investment risk in order to increase the chance of achieving a positive return. Capital protection is less important to you than achieving a better return on the investment"],"description":"The description of the calculated risk profile from the questionnaire responses","items":{"type":"string"}},"allocations":{"type":"array","example":[{"code":"Asset_Class_Government_Bonds","name":"UK Government Bonds","contributionPercentage":1},{"code":"Portfolio_309","name":"Corporate Bonds","contributionPercentage":15.5},{"code":"Portfolio_303","name":"UK Equity","contributionPercentage":28},{"code":"Portfolio_304","name":"Overseas Equity","contributionPercentage":48},{"code":"Portfolio_305","name":"Property","contributionPercentage":7.5}],"description":"The allocations list represents the fund allocations retrieved from the portfolio that relates to the risk profile and term.","items":{"$ref":"#/definitions/Fund"}},"score":{"type":"number","format":"double","example":45,"description":"The calculated questionnaire score from the questionnaire responses. This score determines which risk band the user falls into."},"scoreLikelihood":{"description":"Based on the user responses, this is the probability that the risk band returned is the correct band","$ref":"#/definitions/ScoreLikelihood"},"version":{"type":"integer","format":"int32","example":1,"description":"The version of the questionnaire"},"dateGenerated":{"type":"string","format":"date","description":"The date that this api was called."},"validationErrors":{"type":"array","description":"Validation errors caused by the questionnaire responses","items":{"$ref":"#/definitions/QuestionnaireValidationError"}}}},"ScoreLikelihood":{"type":"object","properties":{"likelihoodOfHigher":{"type":"string","example":"15%","description":"Based on the user responses, this is the probability that the actual risk band of the user is higher than the one that has been returned."},"likelihoodOfLower":{"type":"string","example":"15%","description":"Based on the user responses, this is the probability that the actual risk band of the user is lower than the one that has been returned."}}},"SystemError":{"type":"object","properties":{"systemError":{"type":"string","example":"A system error has occurred.","description":"The system error message."}},"description":"A System error message"},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"The field that is invalid"},"code":{"type":"string","description":"The type of validation error that has occurred","enum":["REQUIRED","OUT_OF_RANGE","INVALID","INVALID_TOTAL"]},"message":{"type":"string","description":"The validation error message"},"value":{"type":"string","description":"The value that is invalid"}},"description":"Contains details of a error when validating an API input parameter"},"ValidationErrors":{"type":"object","properties":{"errors":{"type":"array","description":"A list of errors from validating the API input parameters","items":{"$ref":"#/definitions/ValidationError"}}},"description":"Contains any errors that have occurred during validation of the API input parameters"}},"securityDefinitions":{"default":{"type":"oauth2","authorizationUrl":"https://api-gateway.prod.powered-by.ev.uk/authorize","flow":"implicit","scopes":{}}},"basePath":"/riskQuestionnaire/1.0.0","host":"api-gateway.prod.powered-by.ev.uk"}