Skip to content

POST   /underwriting/auto-approval-rules

Create auto-approval rule

Create a new auto-approval rule

Request Body

{
"name": "string",
"ruleType": "string",
"criteria": {
"creditScore": {
"min": 0,
"max": 0
},
"requestedAmount": {
"min": "string",
"max": "string"
},
"timeInBusiness": {
"min": 0,
"max": 0
},
"annualRevenue": {
"min": "string",
"max": "string"
},
"mccCodes": [
"string"
],
"riskScore": {
"min": 0,
"max": 0
}
}
}

Try it out

Loading...

Output:

Responses

Description

Auto-approval rule created successfully

{
"id": "string",
"name": "string",
"description": "string",
"ruleType": "string",
"criteria": {},
"priority": 0,
"maxAmount": "string",
"conditions": [
"string"
],
"isActive": false,
"createdBy": "string",
"createdAt": "string",
"updatedAt": "string"
}

References

#/components/schemas/AutoApprovalRule

type: object
properties:
id:
type: string
description: Rule ID
name:
type: string
description: Rule name
description:
type: string
nullable: true
description: Rule description
ruleType:
type: string
enum:
- auto_approve
- auto_decline
- flag_for_review
description: Rule action type
criteria:
type: object
description: Rule criteria configuration
priority:
type: integer
description: Rule priority
maxAmount:
type: string
nullable: true
description: Maximum auto-approval amount
conditions:
type: array
items:
type: string
description: Additional conditions
isActive:
type: boolean
description: Whether rule is active
createdBy:
type: string
description: ID of rule creator
createdAt:
type: string
format: date-time
description: Rule creation timestamp
updatedAt:
type: string
format: date-time
description: Last update timestamp

Route Source Code

Check out the source code for this route entrypoint here: /underwriting/auto-approval-rules/route.ts

Or the swagger.yaml spec this documentation was generated from: /underwriting/auto-approval-rules/swagger.yaml