Risk Scoring

The Risk Scoring API computes an overall risk score and all underlying sub-scores, based on individual questions' answers, scores, number of risk buckets. It can deal with rounding, capping and flooring of scores by specific sub-scores. It can also normalise answers to fit in the risk buckets range. Risk Scoring API.

Request Data

NameData TypeMandatoryDescriptionSample ValueRemarks
nbRiskBucketsnumber [2; 100]YNumber of risk buckets5example: “5” for 5 risk buckets: all goals will be scored between 1 (low risk) to 5 (high risk).
roundUpFlagbooleanNFlag indicating if we round the overall score to the upper integertrueIf roundUpFlag, roundDownFlag, or roundFlag flag is missing, it is deemed FALSE (i.e. no such rounding). Validation: there cannot be more than 1 of these 3 flags with value TRUE.
roundDownFlagbooleanNFlag indicating if we round the overall score to the lower integertrueIf roundUpFlag, roundDownFlag, or roundFlag flag is missing, it is deemed FALSE (i.e. no such rounding). Validation: there cannot be more than 1 of these 3 flags with value TRUE.
roundFlagbooleanNFlag indicating if we round the overall score to the nearest integertrueIf roundUpFlag, roundDownFlag, or roundFlag flag is missing, it is deemed FALSE (i.e. no such rounding). Validation: there cannot be more than 1 of these 3 flags with value TRUE.
questionnaireobjectYList of questions{questionId : ...}Contains up to 10 nested levels in object questionnaire. Each level contains up to 10 questions.
questionIdstring, ““, 255 char max, [a-z], [A-Z], [0-9], “-”, “_”YQuestion Id"1"
questionCategoryNamestring, ““, 300 char max, [a-z], [A-Z], [0-9], “-”, “_”, “,”, “.”, (space)YQuestion’s category name (it will be used to group questions together by category and to compute a score for that category)“Risk Capacity”E.g. “Risk Capacity”
questionCapFlagbooleanNFlags telling us if this question’s score acts as a cap for the higher level scoretrueIf missing, Flag is deemed equal to “FALSE” (no cap). we cannot have questionCapFlag and questionFloorFlag to be TRUE.
questionFloorFlagbooleanNFlags telling us if this question’s score acts as a floor for the higher level scoretrueIf missing, Flag is deemed equal to “FALSE” (no cap). we cannot have questionCapFlag and questionFloorFlag to be TRUE.
questionAnswernumber, [0; 100000000000]Y/NQuestion’s answer (numeric only)10If we are at the most granular level, then questionAnswer or questionScore must be provided.
questionScorenumber, [1; nbRiskBuckets]Y/NQuestion’s score (numeric only)10If we are at the most granular level, then questionAnswer or questionScore must be provided.
questionWeightnumber, [0; 1]Y/NQuestion’s score’s weight when computing the higher level score0.5sum{questionWeight} must be equal to 1 for each level.
questionNormalisationFactor1number, [0; 100000000000]NLower Factor used to translate the question’s answer to the [1, nbRiskBuckets] range1You must pass questionNormalisationFactor1 and questionNormalisationFactor2 if questionScore is empty. questionNormalisationFactor2 cannot be equal to questionNormalisationFactor1.
questionNormalisationFactor2number, [0; 100000000000]NUpper Factor used to translate the question’s answer to the [1, nbRiskBuckets] range1You must pass questionNormalisationFactor1 and questionNormalisationFactor2 if questionScore is empty. questionNormalisationFactor2 cannot be equal to questionNormalisationFactor1.
questionRoundUpFlagbooleanNFlag indicating if we round the overall score to the upper integertrueIf questionRoundUpFlag, questionRoundDownFlag, or questionRoundFlag is missing, it is deemed FALSE (i.e. no such rounding)
questionRoundDownFlagbooleanNFlag indicating if we round the overall score to the lower integertrueIf questionRoundUpFlag, questionRoundDownFlag, or questionRoundFlag is missing, it is deemed FALSE (i.e. no such rounding)
questionRoundFlagbooleanNFlag indicating if we round the overall score to the nearest integertrueIf questionRoundUpFlag, questionRoundDownFlag, or questionRoundFlag is missing, it is deemed FALSE (i.e. no such rounding)
questionDetailsobjectNList of underlying questions{questionId : ...}No such object if we are at the end of a branch. This object has the same structure as the questionnaire object.

Response Data

NameData TypeMandatoryDescriptionSample ValueRemarks
statusstring, ““, 300 char max, [a-z], [A-Z], [0-9], “-”, “_”, “,”, “.”, (space)NIndicates error
messagestring, ““, 300 char max, [a-z], [A-Z], [0-9], “-”, “_”, “,”, “.”, (space)NExplains error
overallScorenumber, [1; nbRiskBuckets]YOverall risk score25
overallScoreDetailsobjectYOverall risk score’s details{questionCategoryName: ..., questionScore:..., questionScoreDetails:...}This is nested object.
questionCategoryNamestring, ““, 300 char max, [a-z], [A-Z], [0-9], “-”, “_”, “,”, “.”, (space)NQuestion’s category name"Risk Capacity"
questionScorenumber, [1; nbRiskBuckets]YQuestion’s score13
questionScoreDetailsobjectYLevel 1 score’s details{questionCategoryName: ..., questionScore:..., questionScoreDetails:...}
Language
Authentication
Bearer
Click Try It! to start a request and see the response here!