Skip to main content

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

FieldTypeRequiredDescription
date_of_birthstringYesDate of birth in DD/MM/YYYY format
genderstringYesGender of the insured (see Gender Fields table below)
cover_amountstringYesTotal insurance coverage amount in float (ex: 500000.00)
policy_termnumberYesInsurance policy term in months
context_dataarrayNoArray of context data objects (see Context Data Fields below)
Gender Fields
ValueDescription
MALEMale gender
FEMALEFemale gender

Context Data Fields

FieldTypeRequiredDescription
keystringYesIdentifier for the metadata parameter
valuesstring[]YesArray 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
FieldTypeDescription
quote_idstringUnique identifier for the quote (format: quo_*)
matched_productsnumberNumber of products matching the criteria
recommendationsarrayList of recommended insurance products
Recommendation Object
FieldTypeDescription
recommendation_idstringUnique identifier for the recommendation
insurer_namestringName of the insurance provider
insurer_logostringURL to the insurer's logo image
product_idstringUnique identifier for the insurance product
product_namestringName of the insurance product
variant_idstringUnique identifier for the product variant
variant_namestringName of the product variant
base_premiumstringBase premium amount without taxes
gststringGST amount
total_premiumstringTotal premium amount including taxes
is_errorbooleanIndicates whether there was an error calculating this quote
error_messagestringError message, if any
Error Response
FieldTypeDescription
typestringError code
titlestringBrief error description
detailstringDetailed error message (if available)
instancestringAPI endpoint where error occurred