Quote APIs
The Quote APIs allow you to generate and manage insurance premium quotes. These APIs help you calculate premiums based on customer details and loan parameters, enabling seamless integration of insurance offerings into your loan application process.
Create Quote
Generate a new insurance quote based on loan and customer details. This endpoint calculates premium options from multiple insurers and returns recommendations based on the provided parameters.
Endpoint
POST /v1/embedded/quote
Request
Body
{
"date_of_birth": "01/01/1995",
"gender": "MALE",
"cover_amount": "500000.00",
"policy_term": 24,
"context_date": [
{
"key": "loan_amount",
"values": ["200000.00"]
},
{
"key": "loan_tenure",
"values": ["24"]
},
{
"key": "disbursement_date",
"values": ["01/01/2025"]
}
]
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
| date_of_birth | string | Yes | Date of birth in DD/MM/YYYY format |
| gender | string | Yes | Gender of the insured (see Gender Fields table below) |
| cover_amount | string | Yes | Total insurance coverage amount in float (ex: 500000.00) |
| policy_term | number | Yes | Insurance policy term in months |
| context_data | array | No | Array of context data objects (see Context Data Fields below) |
Gender Fields
| Value | Description |
|---|---|
| MALE | Male gender |
| FEMALE | Female gender |
Context Data Fields
| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Identifier for the metadata parameter |
| values | string[] | Yes | Array of string values for the parameter |
Example:
{
"key": "loan_amount",
"values": ["500000"]
}
Response
Success Response (200 OK)
{
"payload": {
"quote_id": "quo_18M6aOiODyyf37DM",
"matched_products": 1,
"recommendations": [
{
"recommendation_id": "rec_18M6aOiODyyf37DN",
"insurer_name": "ABC Insurance",
"insurer_logo": "https://example.com/insurer-logo.png",
"product_id": "pro_18M6aOiODyyf37DN",
"product_name": "Credit Shield Plus",
"variant_id": "vrt_18M6aOiODyyf37DO",
"variant_name": "Gold",
"base_premium": "5000.00",
"gst": "900.00",
"total_premium": "5900.00",
"is_error": false,
"error_message": ""
}
]
}
}
Partial Success Response (200 OK)
{
"payload": {
"quote_id": "quo_18M6aOiODyyf37DM",
"matched_products": 2,
"recommendations": [
{
"recommendation_id": "rec_18M6aOiODyyf37DN",
"insurer_name": "ABC Insurance",
"insurer_logo": "https://example.com/insurer-logo.png",
"product_id": "pro_18M6aOiODyyf37DN",
"product_name": "Credit Shield Plus",
"variant_id": "vrt_18M6aOiODyyf37DO",
"variant_name": "Gold",
"base_premium": "5000.00",
"gst": "900.00",
"total_premium": "5900.00",
"is_error": false,
"error_message": ""
},
{
"recommendation_id": "rec_18M6aOiODyyf37DN",
"insurer_name": "ABC Insurance",
"insurer_logo": "https://example.com/insurer-logo.png",
"product_id": "pro_18M6aOiODyyf37DN",
"product_name": "Credit Shield Plus",
"variant_id": "vrt_18M6aOiODyyf37DO",
"variant_name": "Gold",
"base_premium": "0",
"gst": "0",
"total_premium": "0",
"is_error": true,
"error_message": "Unable to calculate premium for the given parameters"
}
]
}
}
All APIs Failed Response (200 OK)
{
"payload": {
"quote_id": "quo_18M6aOiODyyf37DM",
"matched_products": 2,
"recommendations": [
{
"recommendation_id": "rec_18M6aOiODyyf37DN",
"insurer_name": "ABC Insurance",
"insurer_logo": "https://example.com/insurer-logo.png",
"product_id": "pro_18M6aOiODyyf37DN",
"product_name": "Credit Shield Plus",
"variant_id": "vrt_18M6aOiODyyf37DO",
"variant_name": "Gold",
"base_premium": "0",
"gst": "0",
"total_premium": "0",
"is_error": true,
"error_message": "Unable to calculate premium for the given parameters"
},
{
"recommendation_id": "rec_18M6bPiOEzzg48EN",
"insurer_name": "XYZ Insurance",
"insurer_logo": "https://example.com/insurer-logo-xyz.png",
"product_id": "pro_18M6bPiOEzzg48EN",
"product_name": "Life Secure",
"variant_id": "vrt_18M6bPiOEzzg48FO",
"variant_name": "Premium",
"base_premium": "0",
"gst": "0",
"total_premium": "0",
"is_error": true,
"error_message": "Unable to calculate premium for the given parameters"
}
]
}
}
Error Response
Unexpected Error (500 Internal Server Error)
{
"type": "E5000",
"title": "An unexpected error occured",
"detail": "",
"instance": "/v1/embedded/quote"
}
Response Fields
Success Response
| Field | Type | Description |
|---|---|---|
| quote_id | string | Unique identifier for the quote (format: quo_*) |
| matched_products | number | Number of products matching the criteria |
| recommendations | array | List of recommended insurance products |
Recommendation Object
| Field | Type | Description |
|---|---|---|
| recommendation_id | string | Unique identifier for the recommendation |
| insurer_name | string | Name of the insurance provider |
| insurer_logo | string | URL to the insurer's logo image |
| product_id | string | Unique identifier for the insurance product |
| product_name | string | Name of the insurance product |
| variant_id | string | Unique identifier for the product variant |
| variant_name | string | Name of the product variant |
| base_premium | string | Base premium amount without taxes |
| gst | string | GST amount |
| total_premium | string | Total premium amount including taxes |
| is_error | boolean | Indicates whether there was an error calculating this quote |
| error_message | string | Error message, if any |
Error Response
| Field | Type | Description |
|---|---|---|
| type | string | Error code |
| title | string | Brief error description |
| detail | string | Detailed error message (if available) |
| instance | string | API endpoint where error occurred |