Skip to main content

Overview

Submissions are the core resource for creating insurance policies in AI Insurance. A submission contains all the policy information, covered insureds, and configuration needed to generate quotes and bind policies. Key Concepts:
  • Submissions contain policy-level data and multiple insureds
  • Configuration defines available rating fields and coverage types
  • ImportPolicy structure represents the policy being submitted
  • ImportInsured structures represent each covered entity

API Endpoints


Using Configuration Response in Submissions and Quotes API

Below we have an example configuration JSON. Configuration files may be very long, so saving the configuration to a file viewer will be very helpful. As noted above, each configuration will have 4 objects:
  1. ratingEngineFields
  2. nonRatingFields
  3. insuredEntityTypes
  4. enabledCoverageTypes
Configuration Object
{
    "ratingEngineFields" : [
        {
            "fieldId": "ca0fbbf4-c1ab-40be-8d07-3c18070dcbec",
            "entityType": "elder_care_facility",
            "companyId": "5f570ffb-2a55-4259-80a4-5f83ee8bc699",
            "addedByScript": true,
            "field": {
                "className": "SelectField",
                "key": "midwestTerritory",
                "path": "data.midwestTerritory",
                "label": "Territory (Legacy)",
                "section": "Rating Information",
                "required": false,
                "fields": {
                    "autosuggest": false,
                    "options": [
                        {
                            "label": "Alabama",
                            "value": "AL"
                        },
                        ...
                    ]
                }
            }
        },
        ...
    ],
    "enabledCoverageTypes" : {
        "medical_professional_liability" : {
            "name" : "Medical Professional Liability",
            "shortName" : "MPL",
            "fields" : [
                "eventDescription",
                ...
            ]
        },
        "long_term_care_professional_liability" : {
            ...
        },
    },
    "nonRatingFields" : {
        "policies" : [
            {
                "fieldId" : "e306f70c-fe70-408a-acbc-5361d959ecc7",
                "entityType" : "policies",
                "field" : {
                    ...
                    "key" : "primaryInsuredBillingEmail",
                    "value" : {
                      ...
                    }
                    ...
                }
            },
            ...
        ],
        "insureds" : [
            {
                "fieldId" : "dd4f4d0e-f53d-48f5-93e3-c4095bca1cc2",
                "entityType" : "insureds",
                "field" : {
                    "className" : "AddressField",
                    "value" : {
                      ...
                    }
                },
            },
            {
                "fieldId": "d36859f5-7a8e-4253-978a-a3448c5a4ec6",
                "entityType": "policies",
                "field": {
                    "className": "InputField",
                    "key": "policyDescription",
                    "label": "Submission Description",
                    "value": {
                        "join": "policy",
                        "path": "description"
                    },
                    "fields": {
                        "type": "textarea",
                        ...
                    },
                    "id": "d36859f5-7a8e-4253-978a-a3448c5a4ec6",
                    ...
                }
            },
            ...
        ],
        "events" : [
          {
              "fieldId" : "01523fa2-27bc-4b32-a9ff-d1499611468d",
              "entityType" : "events",
              "className" : "InputField",
              "entitySubTypes" : [
                ...
              ],
              "fields" : {
                "options" : [
                  "value": "Yes",
                  ...
                ],
                ...
              },
              ...
          }
        ],
    },
    "insuredEntityTypes" : {
        "healthcare_provider" : {
            "value" : "healthcare_provider",
            "label" : "Healthcare Provider"
        },
        "elder_care_facility" : {
            "value" : "elder_care_facility",
            "label" : "Care Facility"
        },
        ...
    }
}

ratingEngineFields

The ratingEngineFields object is an array consisting of several child objects. Each child object contains a fieldId, entityType, companyId, and object field. Each object in the array represents rating data that can be added to submissions, based on the entityType. Child objects with the entityType policies can be added to the ratingData dictionary in the ImportPolicy object. All other child objects can be added to the applicationData dictionary in a [ImportInsured(/api-reference/data-models#importinsured-object)] object.
KeyTypeDescription
fieldIdstring (UUID)Unique identifier for the rating field
entityTypeenumThe type of the rating field. Will be of type policies or one of insuredEntityTypes
companyIdstring (UUID)Unique identifier for the current company
fielddictionaryAn object representing different types of metadata
ratingEngineFields Object
...
"ratingEngineFields" : [
    {
        "fieldId": "ca0fbbf4-c1ab-40be-8d07-3c18070dcbec",
        "entityType": "elder_care_facility",
        "companyId": "5f570ffb-2a55-4259-80a4-5f83ee8bc699",
        "addedByScript": true,
        "field": {
            "className": "SelectField",
            "key": "midwestTerritory",
            "path": "data.midwestTerritory",
            "label": "Territory (Legacy)",
            "section": "Rating Information",
            "required": false,
            "fields": {
                "autosuggest": false,
                "options": [
                    {
                        "label": "Alabama",
                        "value": "AL"
                    },
                    ...
                ]
            }
        }
    },
    ...
],
...

nonRatingFields

The nonRatingFields object is a dictionary with the sub-dictionaries policies, insureds, and events within it. Each sub-dictionary is structured similarly to ratingEngineFields. However, the entityType of each child object in a sub-dictionary will be the same value as the key of the sub-dictionary. So any child object within the policies sub-dictionary will have entityType = "policies". Object data from the policies sub-dictionary can be added to the policyCompanyEntityFields dictionary in the ImportPolicy object. Object data from the insureds and events sub-dictionaries can be added to the insuredCompanyEntityFields dictionary of an ImportInsured object.
KeyTypeDescription
policiesdictionaryA dictionary where entityType = "policies"
insuredsdictionaryA dictionary where entityType = "insureds"
eventsdictionaryA dictionary where entityType = "events"
nonRatingFields Object
...
"nonRatingFields" : {
    "policies": [
        ...
        {
            "fieldId": "d36859f5-7a8e-4253-978a-a3448c5a4ec6",
            "entityType": "policies",
            "field": {
                "className": "InputField",
                "key": "policyDescription",
                "label": "Submission Description",
                "path": "description",
                "section": "Policy Details",
                "value": {
                    "join": "policy",
                    "path": "description"
                },
                "fields": {
                    "rank": 15,
                    "type": "textarea",
                    "placeholder": "",
                    "fullWidth": true,
                    "inputProps": {}
                },
                "id": "d36859f5-7a8e-4253-978a-a3448c5a4ec6"
            }
        },
        ...
    ],
    "insureds": [
        ...
        {
            "fieldId": "dd4f4d0e-f53d-48f5-93e3-c4095bca1cc2",
            "entityType": "insureds",
            "field": {
                "className": "AddressField",
                "key": "insuredMailingAddress",
                "label": "Mailing Address",
                "path": "data.insuredMailingAddress",
                "pii": true,
                "value": {
                    "join": "insureds",
                    "path": "data.insuredMailingAddress.value"
                },
                "fields": {
                    "placeholder": "Add a mailing address for the insured",
                    "rank": 40
                },
                "id": "dd4f4d0e-f53d-48f5-93e3-c4095bca1cc2"
            }
        },
        ...
    ],
    "events": [
        ...
        {
            "fieldId": "01523fa2-27bc-4b32-a9ff-d1499611468d",
            "field": {
                "className": "InputField",
                "key": "eventDescription",
                "path": "data.eventDescription",
                "label": "Event Description",
                "section": "Event Details",
                "fields": {
                    "rank": 11,
                    "maxLength": 4095,
                    "type": "textarea",
                    ...
                },
                "id": "01523fa2-27bc-4b32-a9ff-d1499611468d"
            },
            "entityType": "events",
            "entitySubTypes": [
                "medical_professional_liability",
                "long_term_care_professional_liability",
                "employment_practices_liability",
                ...
            ]
        },
        ...
    ],
}
...

insuredEntityTypes

The insuredEntityTypes object is a dictionary containing sub-dictionaries. These sub-dictionaries are defined based on your configuration but all have the same schema.
insured sub-dictionary schema
"sample_enitity": {
    "value" : "sample_value",
    "label" : "sample_label"
}
Each sub-dictionary defines an entityType which may be referenced by one or more ratingEngineFields objects.

enabledCoverageTypes

The enabledCoverageTypes object is a dictionary containing sub-dictionaries. These sub-dictionaries are defined based on your configration but all have the same schema.
coverage sub-dictionary schema
"sample_coverage": {
    "name" : "sample_name",
    "shortName" : "sample_short_name",
    "fields" : [
        ...
    ]
}
Each sub-dictionary name can be used as coverageTypeId in a ImportPolicyCoverage child object.