curl --request GET \
--url https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventDescription": {
"type": "string",
"title": "Event Description"
},
"claimAmount": {
"type": "number",
"title": "Claim Amount",
"format": "currency"
},
"dateOfLoss": {
"type": "string",
"title": "Date of Loss",
"format": "date"
},
"adjusterId": {
"type": "string",
"title": "Adjuster ID"
},
"claimCategory": {
"type": "string",
"title": "Claim Category",
"oneOf": [
{
"const": "property",
"title": "Property"
},
{
"const": "liability",
"title": "Liability"
},
{
"const": "auto",
"title": "Auto"
},
{
"const": "workers_comp",
"title": "Workers Comp"
}
]
}
}
},
"fieldCoverageTypeMappings": {
"eventDescription": "all",
"claimAmount": "all",
"dateOfLoss": "all",
"adjusterId": [
"general_liability",
"workers_comp"
],
"claimCategory": [
"general_liability"
]
},
"companyCoverageTypes": [
"general_liability",
"workers_comp",
"auto"
]
}Get Events Configuration
Returns a JSON Schema describing the custom fields available for the
data object when creating or updating events, along with mappings
that indicate which fields apply to which coverage types.
The data schema is a standard JSON Schema (draft 2020-12) that can be
used directly with validation libraries like Ajv or Zod.
The fieldCoverageTypeMappings object maps each field key to either
"all" (field applies to all events) or an array of coverage type IDs.
Every key in data.properties has a corresponding entry in this mapping.
Required permission: company.event:read
curl --request GET \
--url https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/external/companies/{companyId}/events/configuration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventDescription": {
"type": "string",
"title": "Event Description"
},
"claimAmount": {
"type": "number",
"title": "Claim Amount",
"format": "currency"
},
"dateOfLoss": {
"type": "string",
"title": "Date of Loss",
"format": "date"
},
"adjusterId": {
"type": "string",
"title": "Adjuster ID"
},
"claimCategory": {
"type": "string",
"title": "Claim Category",
"oneOf": [
{
"const": "property",
"title": "Property"
},
{
"const": "liability",
"title": "Liability"
},
{
"const": "auto",
"title": "Auto"
},
{
"const": "workers_comp",
"title": "Workers Comp"
}
]
}
}
},
"fieldCoverageTypeMappings": {
"eventDescription": "all",
"claimAmount": "all",
"dateOfLoss": "all",
"adjusterId": [
"general_liability",
"workers_comp"
],
"claimCategory": [
"general_liability"
]
},
"companyCoverageTypes": [
"general_liability",
"workers_comp",
"auto"
]
}Authorizations
Response
Configuration for event custom fields
Configuration response for events. Returns a JSON Schema for the
data object used when creating or updating events, along with
coverage type mappings that indicate which fields apply to which
coverage types.
Was this page helpful?
