Skip to main content

QuoteConfig

Returns a list of input parameters that are used when configuring the different benefits within the /quote calculation request. The returned input parameters are defined by their type (eg. dropdown list) and their accepted option values, and are grouped by the benefits they are relevant for. This data could be used to render UI elements for data capture during the configuration of a quote.

Request


  • Type: GET
  • Path: /quoteConfig

Authentication

A userToken API key is required to authenticate the request source. This should be included in the header of the request. See Authentication for more details.

Response


Success 

200: Success

JSON Schema
{
  "type": "object",
  "properties": {
    "quoteConfig": {
      "type": "object",
      "properties": {
        "benefits": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "benefitId": {
                "type": "integer",
                "description": "The API's internal ID for the current benefit. <br /><br />\r\nThis ID is used within the payload of the request of the `/quote` endpoint when requesting the calculation of a premium for this benefit.",
                "format": "int32"
              },
              "benefitName": {
                "type": "string",
                "description": "The display name of the current benefit",
                "nullable": true
              },
              "inputs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "inputId": {
                      "type": "string",
                      "description": "The underlying name of the input. Each of these values matches to an equivalent property in the payload schema of the `/quote` request.\r\nFor example \"calcPeriod\" or \"coverAmount\"",
                      "nullable": true
                    },
                    "inputLabel": {
                      "type": "string",
                      "description": "The human-friendly name of the input. This can be displayed as the field label in the UI.",
                      "nullable": true
                    },
                    "inputType": {
                      "type": "string",
                      "description": "Defines the type of field that could be used to capture the input. The possible values are: <br /><br />\r\n`checkbox` – a true/false boolean input <br />\r\n`currency` – a number representing a monetary value in NZD <br />\r\n`dropdown` – an input with pre-defined set of options(see below) <br />\r\n`number` – a quantity of something(non-currency)",
                      "nullable": true
                    },
                    "inputOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The human-friendly name of the option which can be displayed in the dropdown in the UI.",
                            "nullable": true
                          },
                          "value": {
                            "type": "string",
                            "description": "The underlying value of the option. This value (for the chosen option) should be included in the `/quote` request payload",
                            "nullable": true
                          }
                        },
                        "additionalProperties": false
                      },
                      "description": "An array of pre-defined values for `dropdown` type inputs",
                      "nullable": true
                    }
                  },
                  "additionalProperties": false
                },
                "description": "An array of objects detailing the data capture inputs that are relevant for the current benefit. \r\nThe list of inputs varies for each type of benefit, although there is some crossover between most benefits.",
                "nullable": true
              }
            },
            "additionalProperties": false
          },
          "description": "An array of insurance benefits which are supported for quoting via the Quote Engine API.",
          "nullable": true
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}


Examples
Success Response
{
  "quoteConfig": {
    "benefits": [
      {
        "benefitId": 0,
        "benefitName": "string",
        "inputs": [
          {
            "inputId": "string",
            "inputLabel": "string",
            "inputType": "string",
            "inputOptions": [
              {
                "name": "string",
                "value": "string"
              }
            ]
          }
        ]
      }
    ]
  }
}


Error

403: userToken is invalid or no longer valid