...
Send a request with request payload attributes as below to the Quotation Service.
policyHolderId
is the customer IDId.salesChannel
,salesChannelName
,productVersionId
,productName
, andproductId
are data from the response of step Get available production versions for sales.organisationContext
is the authenticated user's organization context.
...
To update the quote answers, send a request with the payload as below to the Quotation Service.
quoteId
is the quote ID Id taken from the previous step.policyHolderId
andpolicyHolderData
are customer data.The answer tags and values in
changedAnswers
are varied and defined by the product version associated with the quote.
...
Code Block | ||
---|---|---|
| ||
HTTP/2 200 OK { "data": { "type": "quotes", "id": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca", "attributes": { "reference": "1106467", "description": "Sample Customer Name", "period": { "start": "2024-12-19T00:00:00+00:00", "end": "2025-12-18T23:59:59+00:00" }, ... } } } |
Calculate quote price
To calculate a quote price, send a request to the Quotation Service.
Code Block | ||
---|---|---|
| ||
### Calculate quote price POST {{base-url-sales}}/api/v1/quotes/calculatePriceRequest Authorization: {{access-token}} Accept: application/vnd.api+json Content-Type: application/vnd.api+json { "data": { "type": "calculatePriceRequests", "attributes": { "quoteId": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca", "salesDiscount": 0, "productCommission": 0, "salesCommission": 0, "underwritingAdjustmentReason": "", "underwritingAdjustment": 0 } } } |
Sample response
Code Block | ||
---|---|---|
| ||
HTTP/2 200 OK
{
"data": {
"type": "quotes",
"id": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca",
"attributes": {
"reference": "1106467",
"description": "Sample Customer Name",
"period": {
"start": "2024-12-19T00:00:00+00:00",
"end": "2025-12-18T23:59:59+00:00"
},
...
}
}
} |
Sales discount, product commission, sales commission, and underwriting adjustment can be specified in the request payload.
Polling quote price
Since quote price is calculated asynchronously, clients may need to poll for the quote price calculation complete.
To poll quote price, send a request like the example below, replace the :id
path variable with the quote Id. The request can be repeated until reaching the max polling time or receiving a response with hasBeenCalculated
attribute as true
.
Code Block | ||
---|---|---|
| ||
### Poll quote price
GET {{base-url-sales}}/api/v1/quotes/:id?fields[quotes]=premium
Authorization: {{access-token}}
Accept: application/vnd.api+json |
Sample response
Code Block | ||
---|---|---|
| ||
HTTP/2 200 OK
{
"data": {
"type": "quotes",
"id": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca",
"attributes": {
"premium": {
"isBeingCalculated": false,
"hasBeenCalculated": true,
"isConstrained": false,
"canBeAccessed": true
}
}
}
} |