Product API
List all products
URL |
/api/v3/product/all/?page=<page number>&per_page=<page size> |
Methods |
GET |
Key |
Type |
Description |
page number |
Integer |
Optional GET parameter to indicate the page of products to be returned. Defaults to 1 if no page number is provided, or is not greater than 0. |
per page |
Integer |
Optional GET parameter to indicate the size of each page in response. Default value is 100 records per page |
This endpoint provides an easy way to get a list of products that are currently defined within the system. When a successful call is made to this endpoint the server response will contain the key “products” which is associated with a list of collections, each one representing a product e.g.
{
"products": [
{
"name": "Product 1",
"slug": "product_1",
"type": "Travel",
"can_purchase": true,
"can_claim": false,
"partnership": "Partner A",
"has_post_payment_activation_form": false,
"has_additional_docs_form": false,
}
]
}
Key |
Type |
Description |
name |
String |
The name of the product. |
slug |
String |
A URL friendly version of the product. |
type |
String |
The product type that this product belongs to (see Product Types for details). |
can_purchase |
Boolean |
Value to indicate if the product can be purchased |
can_claim |
Boolean |
Value to indicate if claims are enabled for this product |
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. |
has_post_payment_activation_form |
Boolean |
Value to indicate if, after purchase, the customer must complete an additional form before the policy becomes active. |
has_additional_docs_form |
Boolean |
Value to indicate if there is a WebForm defined for the customer/broker to be able to upload additional documents |
To help with performance, the system will limit the result to the first 100 products that are defined. If you have more than 100 products defined, then further sets of products can be retrieved using assign a value to the “page” GET parameter. For example, setting “page=2” on your request would return products 101 to 200.
In addition, you can request larger sets of data by using the “per_page” GET parameter. The maximum page size is 1000.
By default if this value is not defined or is invalid (i.e. less than 1) then the server will use 1 as the value. If you request a page outside the number of products that are defined then an empty list will be returned.
View a product details
URL |
/api/v3/product/<product slug>/ |
Methods |
GET |
Key |
Type |
Description |
product slug |
String |
The unique product slug for the product in question. The slug is created when the product was created. |
{
"name": "Product 1",
"slug": "product_1",
"type": "Travel",
"can_purchase": true,
"can_claim": false,
"banner": "",
"terms_and_conditions": {
"short": "",
"long": ""
},
"documents": [
{
"type": "static",
"name": "Document name",
"url": "",
"tags": ["tag1", "tag2", "tag3"]
}
],
"has_post_payment_activation_form": false,
"has_additional_docs_form": false,
}
Key |
Type |
Description |
name |
String |
The name of the product. |
slug |
String |
A URL friendly version of the product. |
type |
String |
The product type that this product belongs to (see Product Types for details). |
can_purchase |
Boolean |
Value to indicate if the product can be purchased |
can_claim |
Boolean |
Value to indicate if claims are enabled for this product |
banner |
URL |
The absolute path to the banner image associated with this product |
terms_and_conditions |
Object |
An object that contains both the short and long terms and conditions associated with this product. |
documents |
List |
A list of any documents that are associated with this product. Each list item will contain a number of keys which can be used to refine when and how the information should be presented to the end user. |
has_post_payment_activation_form |
Boolean |
Value to indicate if, after purchase, the customer must complete an additional form before the policy becomes active. |
has_additional_docs_form |
Boolean |
Value to indicate if there is a WebForm defined for the customer/broker to be able to upload additional documents |
Errors
Code |
Reason |
404 |
Product not found. |
Please refer to the Error Handling section for further details on errors and error handling.
List all sub-products for a product
URL |
/api/v3/product/<product slug>/subproducts/ |
Methods |
GET |
Key |
Type |
Description |
product slug |
String |
The unique product slug for the product in question. The slug is created when the product was created. |
Calling this end point will return a list of subproducts, which are associated with a specific product. This is alias for calling the sub-product API end point. Please see List sub-products for a product for details about of the JSON response.
Errors
Code |
Reason |
404 |
Product not found. |
Please refer to the Error Handling section for further details on errors and error handling.
List all Coverage Item Type for a product
URL |
/api/v3/product/<product slug>/coverage-item-types/?page=<page number>&per_page=<page size> |
Methods |
GET |
Key |
Type |
Description |
product slug |
String |
The unique product slug for the product in question. The slug is created when the product was created. |
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. |
per page |
Integer |
Optional GET parameter to indicate the size of each page in response. Default value is 100 records per page |
Calling this end point will return a list of CoverageItemType and CoverItem , which are associated with a specific product as CoverageItemType has webform associated with it
{
"name": "Coverage-item-type 1",
"webform": "Web From 1",
"title": "Death Benefit",
"content": " Death BenefitContent ",
"sequence": true,
"coverage_items": [
{
"name": "coverage item 1",
"slug": "coverage-item-1"
},
]
},
Key |
Type |
Description |
name |
String |
The name of coverage item Type. |
webform |
String |
The webform’s name of coverage item Type. |
title |
String |
The name of coverage item Type. |
sequence |
Boolean |
is there sequence of coverage item Type. |
coverage_items |
List |
List of CoverItems that are associated with this CoverageItemType |
Errors
Code |
Reason |
404 |
Product not found. |
Please refer to the Error Handling section for further details on errors and error handling.