POST /underwriting/applications/{id}/risk-assessment
Create or update risk assessment
Generate a new risk assessment for an application
Required Parameters
id
path string Application ID
Request Body
{}{ "forceRecalculate": false}Try it out
Loading...
Output:
Responses
Description
Risk assessment created successfully
{ "id": "string", "applicationId": "string", "overallScore": 0, "riskLevel": "string", "factors": {}, "recommendation": "string", "assessedBy": "string", "assessedAt": "string"}Description
Assessment calculation failed
Description
Application not found
References
#/components/schemas/RiskAssessment
type: objectproperties: id: type: string description: Assessment ID applicationId: type: string description: Application ID overallScore: type: number description: Overall risk score (0-100) riskLevel: type: string enum: - low - medium - high description: Risk level factors: type: object description: Individual risk factor scores recommendation: type: string enum: - approve - decline - manual_review description: System recommendation assessedBy: type: string nullable: true description: ID of assessor (null for automatic) assessedAt: type: string format: date-time description: Assessment timestamp|export interface RiskAssessment { /** Assessment ID */ id?: string; /** Application ID */ applicationId?: string; /** Overall risk score (0-100) */ overallScore?: number; /** Risk level */ riskLevel?: "low" | "medium" | "high"; /** Individual risk factor scores */ factors?: {}; /** System recommendation */ recommendation?: "approve" | "decline" | "manual_review"; /** ID of assessor (null for automatic) */ assessedBy?: string; /** Assessment timestamp */ assessedAt?: Date;}Route Source Code
Check out the source code for this route entrypoint here: /underwriting/applications/[id]/risk-assessment/route.ts
Or the swagger.yaml spec this documentation was generated from:
/underwriting/applications/swagger.yaml