Policy API
Listing policies
URL |
/api/v3/policy/all/?page=<page number>&status=<statuses> |
Methods |
GET, POST |
Key |
Type |
Description |
page number |
Integer |
Optional GET parameter to indicate the page of policies to be returned. Defaults to 1 if no page number is provided, or is not greater than 0. |
status |
StatusName |
Optional GET parameter which lists the statuses you want to fetch, defaults to all for logged in users, active/ended/cancelled for customers |
include_child_policies |
Boolean |
Optional GET parameter which if true, causes child policies to be included in the return as well. Default is false |
Key |
Description |
S_NEW |
New policy |
S_PENDING_APPROVAL |
Pending-approval |
S_ACTIVE |
Active |
S_CANCELLED |
Cancelled |
S_ENDED |
Expired |
S_CANCELLATION_REQUESTED |
Cancellation-requested |
S_QUOTED |
Quoted |
Calling the above endpoint will return a list of policies that the currently authenticated account can view. This list will include all policies regardless of their current state e.g. active, expired, pending approval.
If the user has access to more than 100 policies, then the results will automatically be paginated into blocks of 100 policies. Different pages of policies can be requested by using the optional page GET parameter.
In addition, you can request larger sets of data by using the per_page GET parameter. The maximum page size is 1000.
The list endpoint can be searched by providing a POST payload. For example, these can be useful for extracting larger data sets, or providing a search interface for a customers policies. The following JSON POST payload can be sent if you are searching for a specific user.
{
"search_terms": [{"column": "first_name", "operation": "contains", "values": ["Beta"]}],
}
Alternatively if you wanted to get policies created on the system on a specific date. The example below will return all policies registered on the platform between 2022-06-11 00:00:00 UTC and 2022-06-12 00:00:00 UTC. This could used as strategy to extract larger or historical data sets, fetching all policies for a given day and iterating day by day.
The below, combined with the ?page parameter will allow you to iterate across a larger result set until you hit a response with an empty list in the response {“policies”: []}.
If you would like child policies to be included in the output as well (the default behaviour is hidden), then the include_child_policies parameter can be included to specify that as “include_child_policies”: true,.
{
"include_child_policies": true,
"search_terms": [{"column": "created_on", "operation": "range", "values": ["2022-06-11", "2022-06-12"]}],
}
The no_count parameter option skips the count operation, and can be used to accelerate responses across large datasets where you may not be interested in the total number of results.
{
"search_terms": [{"column": "created_on", "operation": "range", "values": ["2022-06-11", "2022-06-12"]}],
"no_count": true,
}
Here is an example response for customer that has two policies.
{
"policies_count": 2,
"policies": [
{
"customer_name": "Joe Blogs",
"policy_number": "3GH1G8",
"parent_policy_number": null,
"product_name": "Product 1",
"product_slug": "",
"subproduct_name": "Sub Product 2",
"subproduct_slug": "sub-product-2",
"status": "Active",
"start_date": "2000-01-01",
"end_date": "2001-01-01",
"created_on": "2000-01-01",
"last_updated_on": "2001-10-23",
"last_updated_by": "Jane Doe",
"renewed_from_policy_number": "",
"premium": 20.10,
"currency": "USD",
"partnership": "Partner A",
"can_endorse": true,
"can_cancel": false,
"can_renew": true,
"user": "Agent Brooks",
"agent_code": "A0001",
"is_group_policy": false,
}
],
}
Key |
Type |
Description |
customer_name |
String |
The customer’s name in the format of ‘first name last name’. |
policy_number |
String |
The unique policy number for the policy. |
parent_policy_number |
String |
The unique parent policy number, if it exists. Only applicable to certain products. |
product_name |
String |
The name of the product the policy relates to. |
product_slug |
String |
|
subproduct_name |
String |
The name of the sub product which the policy is for. |
subproduct_slug |
String |
The unique slug that references the subproduct the policy is for. |
status |
String |
A string value representing the policy’s current status (see Policy Statuses for possible values). |
start_date |
String |
An ISO date representation of the start date of the policy. |
end_date |
String |
An ISO date representation of the end date of the policy. |
created_on |
String |
An ISO date representation of the date the policy was originally created on*. |
last_updated_on |
String |
An ISO date representation of the date the policy was last updated on*. |
last_updated_by |
String |
The username of the last person to update the policy*. |
renewed_from_policy_number |
String |
Policy number of policy from which policy was renewed. |
premium |
String |
Policy premium (without tax) |
currency |
String |
Currency of the amount collected |
partnership |
String |
A string representation of the partnership that is associated with the policy product. If no partnerships is defined this value will be null. |
can_endorse |
Boolean |
A boolean value indicating if endorsements can be made against the policy. |
can_cancel |
Boolean |
A boolean value indicating if the policy can be cancelled. |
can_renew |
Boolean |
A boolean value indicating if the policy can be renewed by the user. |
is_group_policy |
Boolean |
A boolean value indicating if the policy is a group policy. |
The following keys are only available to authenticated users.
Key |
Type |
Description |
user |
String |
The user’s full name that is associated with the sale of this specific policy. If null then no user is associated with the policy directly |
agent_code |
String |
The agent code for the user that is associated with the sale of this specific policy. A null value will be returned if no agent is associated with the policy |
Note
The keys created_on, last_updated_on, last_updated_by will only be returned if you are logged in as user. If called by a customer these keys will not be added to the response from the server.
Errors
This endpoint will raise a 401 error code if you attempt to access it without being authenticated.
Code |
Reason |
401 |
Not authenticated. |
403 |
Please refer to the Error Handling section for further details on errors and error handling.
View a policy
URL |
/api/v3/policy/<policy number>/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
You can view the details of an existing policy by making a call to the above endpoint.
The following is an example of a response to a request to view a policy.
{
"customer_name": "Joe Blogs",
"policy_number": "3GH1G8",
"parent_policy_number": null,
"product_name": "Product 1",
"subproduct_name": "Sub Product 2",
"subproduct_slug": "sub-product-2",
"status": "Active",
"start_date": "2000-01-01",
"end_date": "2001-01-01",
"form_data": {},
"pricing": {
"policy_price": "0.00",
"tax_amount": "0.00",
"total_amount": "0.00"
},
"attachments": [
{
"name": "",
"url": ""
}
],
"payment_mode_name": "Annual",
"last_successful_payment": "2001-01-01T13:58:44.715344+00:00",
"payments": [
{
"timestamp": "2001-01-01T13:58:44.715344+00:00",
"amount": "0.00",
"policy_number": "3GH1G8",
"payment_reference": "3GH1G8",
"bank_approval_code": "31G8",
"amount_breakdown": {
"commission_amount": "0.00",
"tax_amount": "0.00",
"policy_price": "0.00"
},
"payer_name": "",
"payment_gateway": "",
"status": "Payment succeeded",
"payment_token": "",
"initial_date": "2001-01-01",
"request_date": "2001-01-01"
}
],
"quote_number": "Q1222",
"coverage_items": [
],
"renewed_from_policy_number": "",
"notification_logs": [
{
"timestamp": "2002-11-11",
"note_type": "",
"sent_message": "",
"delivery_status": ""
}
],
"status_logs": [
{
"timestamp": "2002-11-11",
"reason_text": "",
"note": "",
"updated_by": ""
}
],
"partnership": "PartnerA",
"can_endorse": true,
"can_cancel": false,
"can_renew": false,
"user": "Agent Brooks",
"agent_code": "A0001",
"beneficiaries": [
{
"fullname": "Ancestor Blogs",
"dob": "1760-12-31",
"mobile": "+123456789",
"email": "someemail@democrance.com",
"relationship": "Parent"
}
]
}
Key |
Type |
Description |
customer_name |
String |
The customer’s name in the format of ‘first name last name’. |
policy_number |
String |
The unique policy number for the policy. |
parent_policy_number |
String |
The unique parent policy number, if it exists. Only applicable to certain products. |
product_name |
String |
The name of the product the policy relates to. |
subproduct_name |
String |
The name of the sub product which the policy is for. |
subproduct_slug |
String |
The unique slug to the subproduct which this policy is for. |
status |
String |
A string value representing the policy’s current status (see Policy Statuses for possible values). |
start_date |
String |
An ISO date representation of the start date of the policy. |
end_date |
String |
An ISO date representation of the end date of the policy. |
form_data |
Dict |
The form data that was submitted when making the application for the policy. |
pricing.policy_price |
String |
A String representation of the decimal value of the base policy price. |
pricing.tax_amount |
String |
A String representation of the decimal value of the tax amount due. |
pricing.total_amount |
String |
A String representation of the decimal value of the base policy price plus tax amount. |
attachments |
List |
A list of objects that represent each user submitted attachment that is associated with this policy. |
attachments.name |
String |
A filename for the attachment. |
attachments.url |
String |
The URL to access the attachment at. |
last_successful_payment |
String |
Last successful payment received |
payment_mode_name |
String |
payment mode name |
attachments.url |
String |
The URL to access the attachment at. |
quote_number |
String |
The unique quote number. |
coverage_items |
List |
List of all coverage items. |
renewed_from_policy_number |
String |
Policy from which this policy is renewed from. |
notification_logs |
List |
Notification logs |
status_logs |
List |
Status logs |
partnership |
String |
A string representation of the partnership that is associated with the policy product. If no partnerships is defined this value will be null. |
can_endorse |
Boolean |
A boolean value indicating if endorsements can be made against the policy. |
can_cancel |
Boolean |
A boolean value indicating if the policy can be cancelled. |
can_renew |
Boolean |
A boolean value indicating if the policy can be renewed by the user. |
beneficiaries |
List |
A list of objects that represent each beneficiary on the policy. |
The following keys are only available to authenticated users.
Key |
Type |
Description |
user |
String |
The user’s full name that is associated with the sale of this specific policy. If null then no user is associated with the policy directly |
agent_code |
String |
The agent code for the user that is associated with the sale of this specific policy. A null value will be returned if no agent is associated with the policy |
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating your session.
Code |
Reason |
401 |
|
403 |
Please refer to the Error Handling section for further details, on errors and error handling.
Policy meta data
URL |
/api/v3/policy/meta/<product slug>/ |
Methods |
GET |
Key |
Type |
Description |
product slug |
String |
The unique product slug for that you wish to create a policy for. |
Additional information related to a policy can be accessed used the above endpoint. For example, the insurer can define information that should be displayed before the first form is presented to the customer. This “intro” page is returned as part of this meta data endpoint. In addition, there is information about the number of forms in the policy creation process which can be useful to render a progress indicator to the user.
{
"name": "Sub Product Name",
"intro": {
"image": "",
"title": "",
"content": "Optional description text, if blank this will be skipped"
},
"terms_and_conditions": {
"short": "",
"long": ""
},
"attachments": {
"terms_and_conditions": "URL",
"schedule_of_benefits": "",
"claims_form": "TBC"
},
"form_sequence": [
{"id": "form_1", "title": "Your Details"},
{"id": "form_2", "title": "Additional Information"}
],
"renewal_form_sequence": [
{"id": "form_1", "title": "Your Details"},
{"id": "form_2", "title": "Additional Information"}
]
}
Key |
Type |
Description |
name |
String |
The name of sub-product which this meta data relates to in terms of creating a policy. |
intro.image |
URL |
The URL for an image to be displayed on the intro page, or ‘null’ if no image. |
intro.title |
String |
A heading to display on the intro page, or ‘null’ if not headline is defined. |
intro.content |
String |
The text to be displayed on the intro page. |
terms_and_conditions.short |
String |
The short terms and conditions as defined by the insurer. |
terms_and_conditions.long |
String |
The full terms and conditions as defined by the insurer. |
attachments |
Object |
An object containing various attachments provided by the insurer. |
attachments.terms_and_conditions |
URL |
The URL to a downloadable version of the terms and condition (if available). |
attachments.schedule_of_benefits |
URL |
|
attachments.claims_form |
URL |
|
form_sequence |
List |
An list of objects. Each objects represents a unique identify for the step and a title that can be displayed to the user. |
renewal_form_sequence |
List |
A list of objects. Each objects represents a unique identify for the step and a title that can be displayed to the user during renewal journey. |
Note
See How to create a policy for an example of how this can be used
Submit policy form data
URL |
/api/v3/policy/submit/<product slug>/ |
Methods |
GET, POST |
Key |
Type |
Description |
product slug |
String |
The ID that uniquely identifies the product that the policy should be created for. |
This endpoint can be called either with a GET or POST request. A GET request or an empty POST request means you want the first form in the policy creation process. Otherwise a POST request with data will trigger the data validation process. In either case, the server will response with the following:
{
"policy_number": "policy1",
"policy_status": "New",
"description": {
"image": "",
"title": "",
"content": ""
},
"form": {},
"has_errors": false,
"next_action": "continue",
"content_data": null
}
Key |
Type |
Description |
policy_number |
String |
The unique policy number for the policy being completed, or ‘null’ if this is the initial request. |
policy_status |
String |
The status of the policy or ‘null’ if this is the initial request. |
form |
Dict |
An object representing the form schema which needs to be completed. See ?? for details about form schemas. |
description.image |
URL |
The URL for an image to be displayed with the form, or ‘null’ if no image. |
description.title |
String |
A heading to display on this form page, or ‘null’ if not headline is defined. |
description.content |
String |
The text to be displayed with this form. |
has_errors |
Boolean |
A boolean flag to indicated if the form has an errors. This will be false if you are requesting the form. |
next_action |
String |
The text that indicates what the next action in the journey is: continue, display (custom content), rejected, referred, complete, perform_otp. |
content_data |
Dict |
An object containing the custom display content if next_action is ‘display’. Will contain ‘title’, ‘content’ and ‘redirect_to’ properties. |
The POST data should take the same shape as the form schema sent to you. You will need to include the policy number previously supplied to continue submitting data.
Note
See How to create a policy for an example of how this can be used
Upload policy attachments
URL |
/api/v3/policy/<policy number>/attachment/add/ |
Methods |
POST |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
Some policy forms require you to upload attachments as part of the process. Currently the uploading of a document/attachment for a policy is handled asynchronously to the policy form subission process.
To upload an attachment create a POST request with the following payload data:
{
"data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD...",
"name": "ResidencyVisaOrNationalId"
}
Key |
Type |
Description |
data |
String |
A Base64 encoded data url string. This should take the standard format of data:mimetype;base64,encoded_file_data. |
name |
String |
The fileupload input name. |
If the upload is successful, then you will get a unique hash for the uploaded file. This value can then be inserted into the form data before submitting the form.
{
"file_reference": "Unique hash"
}
Key |
Type |
Description |
file_reference |
String |
A unique reference number for the uploaded attachement. You will need this value to access the attachment, as well as when submitting forms that require attachments |
Get attachment
URL |
/api/v3/policy/<policy number>/attachment/get/<file reference>/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
file reference |
String |
A file reference for a specific uploaded attachment for the specified policy |
Calling this endpoint with a valid file reference will return you with a response that contains the document data.
Get attachment thumbnail
URL |
/api/v1/policy/<policy number>/attachment/thumbnail/<file reference>/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
file reference |
String |
A file reference for a specific uploaded attachment for the specified policy |
Confirm Policy Creation
URL |
/api/v3/policy/<policy number>/confirm/ |
Methods |
POST |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
This endpoint provides a method to confirm that the policy details are correct and the customer wishes to proceed with purchasing the policy.
{
"submitted_data": {
"form 1": {
"First name": "John",
"Last name": "Doe"
},
"form 2": {
"Beneficiary's Name": "Jane Doe"
}
},
"form": {},
"policy_data": {
"currency": "",
"policy_price": "",
"tax_amount": "",
"total_price": "",
"customer_last_name": "",
"quote_number": ""
}
}
Key |
Type |
Description |
submitted_data |
Dict |
An object which contains a list of attributes, each represent a form in the sequence of forms that were submitted. Each of these attributes will itself be an object contains a key value for each input the user has provided. |
form |
Dict |
An object representing the form confirmation form schema which needs to be completed. See ?? for details about form schemas |
price_info |
Dict |
An object which contains information about the price |
price_info.currency |
String |
The currency the price information is displayed in |
price_info.policy_price |
Number |
The base price of the policy |
price_info.tax_amount |
Number |
The the amount of tax added to the premium |
price_info.total_price |
Number |
The total amount of the premium including all taxes |
Get Certification of Insurance (COI)
URL |
/api/v3/policy/<policy number>/coi/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
If you need to get the COI for a customer, then this endpoint provides a way to download the COI for a policy. You can only request the COI for a policy which the currently authenticated customer owns. If you attempt to download a COI for a policy that the customer doesn’t own then
The server will respond with a PDF file.
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating a customer user with your session. In addition, this endpoint will raise a 404 error code if the policy id submitted doesn’t exist on the platform, or the authenticated customer is not the policy holder.
Code |
Reason |
401 |
You attempted to access a policy without having a valid customer authenticated. |
404 |
The policy you requested doesn’t exist or doesn’t belong to the customer. |
Please refer to the Error Handling section for further details, on errors and error handling.
Get Tax Invoice
URL |
/api/v3/policy/<policy number>/tax-invoice/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
If you need to get the Tax Invoice for a customer, then this endpoint provides a way to download the Tax Invoice for a policy. You can only request the Tax Invoice for a policy which the currently authenticated customer owns. If you attempt to download a Tax Invoice for a policy that the customer doesn’t own then
The server will respond with a PDF file.
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating a customer user with your session. In addition, this endpoint will raise a 404 error code if the policy id submitted doesn’t exist on the platform, or the authenticated customer is not the policy holder.
Get Policy’s Emergency Document
URL |
/api/v3/policy/<policy number>/emergency-document/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
If you need to get the Emergency Document for a policy, then this endpoint provides a way to download the Emergency Document for a policy. You can only request the Emergency Document for a policy which the currently authenticated customer owns. If you attempt to download a Emergency Document for a policy that the customer doesn’t own then
The server will respond with a PDF file.
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating a customer user with your session. In addition, this endpoint will raise a 404 error code if the policy id submitted doesn’t exist on the platform, or the authenticated customer is not the policy holder.
Get Policy’s Passbook Document (Apple Wallet)
URL |
/api/v3/policy/<policy number>/pass_card/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
If you need to get the passbook (apple wallet) Document for a policy, then this endpoint provides a way to download the Passbook (.pkpass) for a policy. You can only request the Passbook for a policy which the currently authenticated customer owns. If you attempt to download a passbook for a policy that the customer doesn’t own then you will get Access Denied message
The server will respond with a pkPass (application/vnd.apple.pkpass) file.
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating a customer user with your session. In addition, this endpoint will raise a 404 error code if the policy id submitted doesn’t exist on the platform, or the authenticated customer is not the policy holder.
Code |
Reason |
401 |
You attempted to access a policy without having a valid customer authenticated. |
404 |
The policy you requested doesn’t exist or doesn’t belong to the customer. |
Please refer to the Error Handling section for further details, on errors and error handling.
Get Policy’s Cancellation Letter
URL |
/api/v3/policy/<policy number>/cancellation-letter/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
If you need to get the Cancellation Letter for a policy, then this endpoint provides a way to download the Cancellation Letter for a policy. You can only request the Cancellation Letter for a policy which the currently authenticated customer owns. If you attempt to download a Cancellation Letter for a policy that the customer doesn’t own then
The server will respond with a PDF file.
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating a customer user with your session. In addition, this endpoint will raise a 404 error code if the policy id submitted doesn’t exist on the platform, or the authenticated customer is not the policy holder.
Upload Additional Documents
URL |
/api/v3/policy/<policy number>/additional-documents/ |
Methods |
POST |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
Some policy forms require you to upload additional documents as part of the process. To list these, use this endpoint.
{
"form": {
"form_name": "Additional Documents",
"form_type": "form",
"fields": [
{
"type": "async_file",
"name": "additional_documents",
"title": "Additional Documents",
"value": [
{
"id": "eyJpZCI6Nzk1Njk2NzY3MjI1Nv23MzU253452Vzc2lvbl9rZXkiOm51bGx9:1iuFKX:luXPXAeeOSU-VW5-PxWxRX1Mbw",
"name": "download.png"
}
],
"required": true,
"rules": {
"type": "List",
"accepted_mime_types": [
"image/jpeg",
"application/pdf",
"application/msword"
],
"min": 1
}
}
]
}
}
Key |
Type |
Description |
value |
List |
List of attachments |
id |
String |
Hash of the document |
name |
String |
Name of the document |
accepted_mime_types |
List |
List of accepted mime types, full list can be found along with other constants in the documentation |
Copy Policy to a new quote
URL |
/api/v3/policy/<policy number>/copy/ |
Methods |
POST |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
This api call takes a policy number and creates a new copy of the policy in the quoted state. Useful for brokers who want to create multiple versions of a quote for a customer, or to start a manual renewal.
{
"policy_number": "12345",
"product_slug": "abc-123"
}
Key |
Type |
Description |
policy_number |
String |
Unique policy/quote number of the new copy |
How to create a policy
To create a policy in the system you will need to complete any forms that the product has defined for the policy creation process.
The first thing you should do is gather any meta data and check to see if an ‘intro’ page should be presented to the user. Simple call Policy meta data endpoint for this information. After which you can then proceed to request and submit forms.
Requesting and submitting form data is handled by the same API end point, /api/v3/policy/submit/<product slug>/. Your first call to this endpoint can be either a GET or an empty POST request, but all subsequent calls will be POST requests. When calling this endpoint for the first time the server will return you the data specifying what information is required to be submitted. Simply collect the required information and submit the data back to us. The server will then validate the data and return one of three possible responses.
Submitted data is not valid
However, if the form data submitted did not pass our validation then it will be returned in the “form” key along with appropriate error messages. In addition, the boolean flag has_errors will be set to true to make it easier to identify that there were issues. See ?? for details about the errors object.
{
"policy_number": "<your new policy number>",
"form": {},
"has_errors": true
}
Submitted data is valid, and there is another form to complete
If the data submitted validates successfully and there is another form in the policy creation process, then the server will respond with the next form in the same format as before i.e.
{
"policy_number": "<your new policy number>",
"form": {},
"has_errors": false
}
In this case the “form” value will be the definition of the next form to be completed.
Submitted data is valid, but no other forms to complete
Finally, if the data submitted validates successfully, and there are no other forms to be completed the server will return the following response:
{
"policy_number": "<your new policy number>",
"form": null,
"has_errors": false
}
At this point the policy is created and just needs to be confirmed that all the data provided is correct. We suggest you provide the user with a way to review the data that they have submitted. See Confirm Policy Creation for details on how to do this.
Renew Policy
URL |
/api/v3/policy/<policy number>/renew/ |
Methods |
POST |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
This api call takes a policy number and creates a renewal instance of the policy in the pending renewal state. Useful for brokers who want to start a manual renewal.
{
"policy_number": "12345"
}
Key |
Type |
Description |
policy_number |
String |
Unique policy/quote number of the new copy |
Get Policy Form Data
URL |
/api/v3/policy/<policy number>/get-form-data/ |
Methods |
GET |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
If you need to get the form data for the policy, then this endpoint provides a way to read the form data.
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating a customer user with your session. In addition, this endpoint will raise a 404 error code if the policy id submitted doesn’t exist on the platform, or the authenticated person does not have access to it.
Continue Quote
URL |
/api/v3/policy/continue/<signed policy number>/ |
Methods |
GET |
Key |
Type |
Description |
signed policy number |
String |
A signed policy number which needs to be accessed |
Customers would need to have access to the policy which they wish to continue and modify. This endpoint verifies the token and in the background also sets up the request session so that the customer can access the policy seamlessly.
Errors
This endpoint will raise a 403 error code if you attempt to access it with an invalid token. In addition, this endpoint will raise a 404 error code if the policy id submitted doesn’t exist on the platform, or the policy is not marked with a status which allows continuation of the quote/policy.
Remove recurring payment
URL |
/api/v3/policy/<policy number>/remove-recurring-payment/ |
Methods |
POST |
Key |
Type |
Description |
policy number |
String |
The unique policy number for the policy you wish to view. |
{
"comment": "This is comment"
}
You can remove recurring payment from an existing policy by making a call to the above endpoint.
The following is an example of a response to a request to remove recurring payment from policy.
{
"success": True,
"policy_number": "3GH1G8"
}
Key |
Type |
Description |
success |
Boolean |
A boolean value indicating if it is success or not |
policy_number |
String |
The unique policy number for the policy. |
The API is only available to authenticated users having access to remove_recurring_payment permission
Errors
This endpoint will raise a 401 error code if you attempt to access it without previously authenticating your session.
Code |
Reason |
404 |
If policy or recurring payment object is not found |
403 |
if doesnot have access to policy |
Please refer to the Error Handling section for further details, on errors and error handling.