Skip to main content

Quote Results

Returns a list of quote results containing premiums that have been calculated based on details provided in the request. These details must include client demographics, chosen benefit options, and the providers and products they are interested in. Each request generates a new quote. Quotes are not saved by the API.

Response


Success 

200: Success

JSON Schema
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "providerId": {
            "type": "integer",
            "description": "The ID of the provider for the current result.",
            "format": "int32"
          },
          "providerName": {
            "type": "string",
            "description": "The name of the provider for the current result.",
            "nullable": true
          },
          "providerLogoUrl": {
            "type": "string",
            "description": "The URL of the provider's logo image (hosted by BlackFin) that can be displayed with the result if desired.",
            "nullable": true
          },
          "hexColor": {
            "type": "string",
            "description": "A hex color value representing the dominant colour from the provider's logo that can be incorporated into the design of the displayed result if desired.",
            "nullable": true
          },
          "hasErrors": {
            "type": "boolean",
            "description": "Identifies whether the result is fully formed or whether there are errors within some products in the result. <br /><br />\r\n`false` – premiums have been successfully calculated for all products <br />\r\n`true` – at least one product contain errors <br /><br />\r\nIf `true` there will be at least one `error` message included within the products below."
          },
          "policyFee": {
            "type": "number",
            "description": "The amount of the applicable Policy Fee in New Zealand Dollars [NZD]",
            "format": "double"
          },
          "vitalityFee": {
            "type": "number",
            "description": "The amount of the Vitality Fee (AIA only) in New Zealand Dollars [NZD], if applicable.",
            "format": "double",
            "nullable": true
          },
          "totalPremium": {
            "type": "number",
            "description": "The sum total of all individual product premiums (for all clients) in the current result - plus any applicable fees - in New Zealand Dollars [NZD].",
            "format": "double"
          },
          "clients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "clientId": {
                  "type": "string",
                  "description": "Returns the optional 'clientId' from the request, if one was provided by the requestor.",
                  "nullable": true
                },
                "clientName": {
                  "type": "string",
                  "description": "The fullname of the client for whom products have been quoted in the result. <br /><br />\r\nIf no `firstName` and/or `lastName` were provided by the requestor, the API will return an auto-generated name like \"Client 1\"",
                  "nullable": true
                },
                "products": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "clientBenefitId": {
                        "type": "string",
                        "description": "Returns the optional 'clientBenefitId' from the request, if one was provided by the requestor.",
                        "nullable": true
                      },
                      "benefitId": {
                        "type": "integer",
                        "description": "The ID of the benefit that has been quoted.",
                        "format": "int32"
                      },
                      "productId": {
                        "type": "integer",
                        "description": "The ID of the product that has been quoted.",
                        "format": "int32"
                      },
                      "productName": {
                        "type": "string",
                        "description": "The display name of the product that has been quoted.",
                        "nullable": true
                      },
                      "descriptions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "An optional array of strings containing additional descriptions about this product result – for example, any discounts that have been applied.",
                        "nullable": true
                      },
                      "premium": {
                        "type": "number",
                        "description": "The calculated premium amount for the current product (under the current client) in New Zealand Dollars [NZD].",
                        "format": "double"
                      },
                      "errors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Internal ID reference (from BlackFin) for the current error.",
                              "format": "int32"
                            },
                            "message": {
                              "type": "string",
                              "description": "The description of the error that was encountered. This is a human-friendly message that can be displayed to the user. For example: <br /><br /><i>\"TPD Add-on is not available for your occupation class\"</i>",
                              "nullable": true
                            }
                          },
                          "additionalProperties": false
                        },
                        "description": "An array of one or more objects detailing any errors encountered whilst failing to calculate a premium for the current product.",
                        "nullable": true
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "An array of one or more product objects that have been quoted for the current client in the result.",
                  "nullable": true
                }
              },
              "additionalProperties": false
            },
            "description": "An array of one or more client objects for whom products have been quoted in the current result.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "description": "An array of quote result objects – one for every provider quoted. Each object contains the details needed to render the provider's result in a UI.",
      "nullable": true
    },
    "quoteId": {
      "type": "string",
      "description": "The ID of the current quote, auto-generated by the API"
    },
    "paymentFrequency": {
      "type": "string",
      "description": "The display name of the chosen payment frequency. The possible values are:\r\n\r\n`Yearly` <br />\r\n`Monthly` <br />\r\n`Fortnightly`",
      "nullable": true
    },
    "calcTime": {
      "type": "number",
      "description": "The amount of time taken by the API (in seconds) to calculate all premiums in the results.",
      "format": "double"
    },
    "apiVersion": {
      "type": "string",
      "description": "API version / last update information",
      "nullable": true
    }
  },
  "additionalProperties": false
}


Examples
Success Response
{
  "results": [
    {
      "providerId": 0,
      "providerName": "string",
      "providerLogoUrl": "string",
      "hexColor": "string",
      "hasErrors": true,
      "policyFee": 0,
      "vitalityFee": 0,
      "totalPremium": 0,
      "clients": [
        {
          "clientId": "string",
          "clientName": "string",
          "products": [
            {
              "clientBenefitId": "string",
              "benefitId": 0,
              "productId": 0,
              "productName": "string",
              "descriptions": [
                "string"
              ],
              "premium": 0,
              "errors": [
                {
                  "id": 0,
                  "message": "string"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "quoteId": "string",
  "paymentFrequency": "string",
  "calcTime": 0,
  "apiVersion": "string"
}


Error

400: Request body is null or invalid

JSON Schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "response": {
          "type": "object",
          "properties": {
            "code": {
              "type": "integer",
              "format": "int32"
            },
            "message": {
              "type": "string",
              "nullable": true
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}


Examples
Error Response
{
  "data": {
    "response": {
      "code": 0,
      "message": "string"
    }
  }
}

403: userToken is invalid or no longer valid