...
To get production versions available for sales, please send an HTTP request to the Agency Configuration API as in the example below.
Code Block |
---|
|
### 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 |
...
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.
...
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"
},
"version": 28,
"policyHolderId": "caa40751-80cd-4b18-9f0a-55b9af4be886",
...
}
}
} |
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 of Invoice
, IntegratedCheckout
, or External
.
paymentFrequency
: Choose one of these available options Annually
, Semi-Annually
, Quarterly
, Monthly
, Single
or One-Off
.
Code Block |
---|
|
### Accept quote
POST {{base-url-sales}}/api/v1/quotes/acceptanceRequest
Authorization: {{access-token}}
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
{
"data": {
"type": "acceptanceRequests",
"attributes": {
"quoteId": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca",
"acceptedVersion": 28,
"policyHolderId": "caa40751-80cd-4b18-9f0a-55b9af4be886",
"preferredCollectionDay": 1
}
}
} |
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"
},
...
}
}
} |
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.
Code Block |
---|
|
### Poll policy issuance
GET {{base-url-sales}}/api/v1/quotes/:id?fields[quotes]=status,underwrittenByPolicyId,acceptanceFailureReason
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": {
"status": "Underwritten",
"underwrittenByPolicyId": "policy-6f21f713-f977-5ded-a1d0-15d82ee48931",
"acceptanceFailureReason": null
}
}
} |
Please take note of the underwrittenByPolicyId
if you need to retrieve the policy details
Get policy details
Send a request that looks like below to retrieve details of a single policy. Please replace the :id
path variable with the actual policy Id.
Code Block |
---|
|
### Get details of a single policy
GET {{base-url-underwriting}}/api/v1/policies/:id?fields[policies]=reference,description,period,status,currencyCode
Authorization: {{access-token}}
Accept: application/vnd.api+json |
Sample response
Code Block |
---|
|
HTTP/2 200 OK
{
"data": {
"type": "policies",
"id": "policy-6f21f713-f977-5ded-a1d0-15d82ee48931",
"attributes": {
"reference": "1106467",
"description": "Sample Customer Name",
"period": {
"start": "2024-12-19T00:00:00+00:00",
"end": "2025-12-18T23:59:59+00:00"
},
"currencyCode": "GBP",
"status": "Created"
}
}
} |
Get policies belonging to a customer
To get policies belonging to a customer, send a request with parameters for paging, sorting, filtering, and a sparse fieldset selection. Please replace the {{policy-holder-id}}
query parameter with the actual policy holder Id (aka the customer Id). For example,
Code Block |
---|
|
### Get policies belonging to a customer
GET {{base-url-underwriting}}/api/v1/policies?sort=-createdDate&fields[policies]=reference,description,period,status,currencyCode&page[size]=10&page[number]=1&filter[policyHolderId]={{policy-holder-id}}
Authorization: {{access-token}}
Accept: application/vnd.api+json |
Sample response
Code Block |
---|
|
HTTP/2 200 OK
{
"data": [
{
"type": "policies",
"id": "policy-6f21f713-f977-5ded-a1d0-15d82ee48931",
"attributes": {
"reference": "1106467",
"description": "Sample Customer Name",
"period": {
"start": "2024-12-19T00:00:00+00:00",
"end": "2025-12-18T23:59:59+00:00"
},
"currencyCode": "GBP",
"status": "Created"
}
},
...
],
"meta": {
"total-records": 3,
"totalResources": 3
}
} |