Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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, and retrieve policy details.

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 production product versions available for sales, please send an HTTP request to the Agency Configuration API as in the example below.

Code Block
languagejson
### 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

...

Code Block
languagejson
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, and productId are data from the response of step Get available production versions for sales.

  • organisationContext is the authenticated user's organization context.

...

Code Block
languagejson
HTTP/2 201 Created
{
  "data": {
    "type": "quotes",
    "id": "quote-d697f696-1f3e-08dd-cc76-1eabd4dc87c4",
    "attributes": {
      "reference": "1106475",
      "description": "",
      "period": {
        "start": "2024-12-19T00:00:00+00:00",
        "end": "2025-12-18T23:59:59+00:00"
      },
      ...
    }
  }
}

Update quote answers

To update the quote answers, send a request with the payload as below to the Quotation Service.

...

Code Block
languagejson
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.

...

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
languagejson
HTTP/2 200 OK
{
  "data": {
    "type": "quotes",
    "id": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca",
    "attributes": {
      "premium": {
        "isBeingCalculated": false,
        "hasBeenCalculated": true,
        "isConstrained": false,
        "canBeAccessed": true
      }
    }
  }
}

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.

Code Block
languagejson
### Specify payment option
POST {{base-url-sales}}/api/v1/quotes/updateQuoteRequest
Authorization: {{access-token}}
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json

{
  "data": {
    "type": "updateQuoteRequests",
    "attributes": {
      "quoteId": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca",
      "paymentOptionName": "Cash Monthly",
      "paymentOptionValue": "cash_monthly",
      "paymentMethod": "External",
      "paymentFrequency": "Monthly"
    }
  }
}

Sample response

Code Block
languagejson
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"
      },
      ...
    }
  }
}

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.

Code Block
languagejson
### Complete quote
POST {{base-url-sales}}/api/v1/quotes/completeQuoteRequest
Authorization: {{access-token}}
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json

{
  "data": {
    "type": "completeQuoteRequests",
    "attributes": {
      "quoteId": "quote-4fbe88f2-1f3e-08dd-46e2-d1f2631efeca"
    }
  }
}

Sample response

Code Block
languagejson
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
languagejson
### 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
languagejson
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
languagejson
### 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
languagejson
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.