Quotation Service
This page describes basic steps for browsing available products, select one and create a quote, update the quote, specify sales discounts and commissions, and accept and purchase the quote.
Authenticate and retrieve an access token
Every request to Seamless needs to be authenticated. Please refer to the Authentication for more details of how to authenticate and get an access token.
Get available products for sales
To get product versions available for sales, please send an HTTP request to the Agency Configuration API as in the example below.
### Get active product versions
GET {{base-url-configuration}}/api/v1/salesProducts/activeVersions?page[size]=100&page[number]=1
Authorization: {{access-token}}
Accept: application/vnd.api+json
Sample response
HTTP/2 200 OK
{
"data": [
{
"type": "salesProductVersions",
"id": "4c2fbd66-301f-4885-96cb-d60be50b113c",
"attributes": {
"productVersionId": "productversion-0ea0d37a-9efd-08db-0bd7-c0600705dec3",
"productId": "product-f3d34719-1987-08db-e9ed-98992bb3c0cf",
"productName": "Travel",
"salesChannelId": "saleschannel-d032531b-4664-08db-861e-ae779787d6cc",
"salesChannelName": "Channel 1",
"salesChannelReference": "Ref-1",
"productIconId": "2cddad98-7e2c-4d58-b91b-42c1752663d4",
"iconBackgroundColor": "#fff",
"paymentOptions": null
}
},
...
]
}
Create a new-business quote
Send a request with request payload attributes as below to the Quotation Service.
policyHolderId
is the customer Id.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.
### Create a new-business quote
POST {{base-url-sales}}/api/v1/quotes/createQuoteRequest
Authorization: {{access-token}}
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
{
"data": {
"type": "createQuoteRequests",
"attributes": {
"salesChannel": "saleschannel-d032531b-4664-08db-861e-ae779787d6cc",
"salesChannelName": "Channel 1",
"salesChannelReference": "Ref-1",
"productVersionId": "productversion-0ea0d37a-9efd-08db-0bd7-c0600705dec3",
"productName": "Travel",
"productId": "product-f3d34719-1987-08db-e9ed-98992bb3c0cf",
"organisationContext": "contemi-developers",
"policyHolderId": "caa40751-80cd-4b18-9f0a-55b9af4be886"
}
}
}
Sample response
Update quote answers
To update the quote answers, send a request with the payload as below to the Quotation Service.
quoteId
is the quote 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.
Sample reqponse
Calculate quote price
To calculate a quote price, send a request to the Quotation Service.
Sample response
Sales discount, product commission, sales commission, and underwriting adjustment can be specified in the request payload.
Poll 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
.
Sample response
Specify a payment option
A payment option may need to be specified for the quote, depending on the agency configuration. To specify the payment option, send a request like below.
Sample response
Complete quote
Send a request with a quoteId
specified in the request payload. Take note of the version
and the policyHolderId
in the response payload.
Sample response
Accept quote
Send a request with following information.
quoteId
: Id of the quote to accept.acceptedVersion
: The quote version noted down in the previous step.policyHolderId
: Id of the policy holder noted down in the previous step.paymentMethod
: Can be one ofInvoice
,IntegratedCheckout
, orExternal
.paymentFrequency
: Choose one of these available optionsAnnually
,Semi-Annually
,Quarterly
,Monthly
,Single
orOne-Off
.
Sample response
Poll issued policy Id
Since the policy is issued asynchronously, the client should poll for the policy issuance result by sending the following request. Please replace the :id
path variable with the actual quote Id.
Sample response
Please take note of the underwrittenByPolicyId
if you need to retrieve the policy details.
Related content
If you would like to request an article, drop us a mail at seamless.support@seamless.insure