curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/versions \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/versions"
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/v1/external/companies/{companyId}/policies/versions', 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/v1/external/companies/{companyId}/policies/versions",
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/v1/external/companies/{companyId}/policies/versions"
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/v1/external/companies/{companyId}/policies/versions")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/versions")
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{
"items": [
{
"summary": {
"id": "550e8400-e29b-41d4-a716-446655440002",
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"companyId": "550e8400-e29b-41d4-a716-446655440099",
"createdAt": "2025-01-15T10:30:00.000Z",
"policyVersion": 1,
"versionCreatedAt": "2025-01-15T10:30:00.000Z",
"fullTermPolicyInfo": {
"policyStatus": "Active"
},
"fullTermPolicyBilling": {
"policyPremium": 85000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 85500
},
"matchedSegments": [
{
"startDate": "2025-01-01",
"endDate": "2026-01-01"
}
]
}
},
{
"summary": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"companyId": "550e8400-e29b-41d4-a716-446655440099",
"createdAt": "2025-01-15T10:30:00.000Z",
"policyVersion": 2,
"versionCreatedAt": "2025-02-01T14:00:00.000Z",
"fullTermPolicyInfo": {
"policyStatus": "Active"
},
"fullTermPolicyBilling": {
"policyPremium": 102000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 102500
},
"matchedSegments": [
{
"startDate": "2025-01-01",
"endDate": "2025-06-01"
},
{
"startDate": "2025-06-01",
"endDate": "2026-01-01"
}
]
}
}
],
"totalCount": 2
}List Policy Versions
Lists policy versions across all policies. Unlike “List Policies” (which resolves
each policy to one version), this endpoint returns every (policy, version) pair
that matches the filters. A single policy can appear multiple times if multiple
versions match.
Example questions this endpoint answers:
- “Find all policy versions where premium exceeded $100k” —
segmentScope="all",filterson premium field - “Which policy versions provided coverage on June 15?” —
segmentScope={"asOf":"2025-06-15"} - “Find policies that ever matched a specific coverage type on a given date” —
segmentScope={"asOf":"..."},filterson coverage field
Query parameters (detail, segmentScope, filters, pagination, sorting) work
identically to the List Policies endpoint except that timeTravelBackToDate is
not available — all versions are listed.
Required permission: company.policy:read
curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/versions \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/versions"
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/v1/external/companies/{companyId}/policies/versions', 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/v1/external/companies/{companyId}/policies/versions",
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/v1/external/companies/{companyId}/policies/versions"
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/v1/external/companies/{companyId}/policies/versions")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/versions")
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{
"items": [
{
"summary": {
"id": "550e8400-e29b-41d4-a716-446655440002",
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"companyId": "550e8400-e29b-41d4-a716-446655440099",
"createdAt": "2025-01-15T10:30:00.000Z",
"policyVersion": 1,
"versionCreatedAt": "2025-01-15T10:30:00.000Z",
"fullTermPolicyInfo": {
"policyStatus": "Active"
},
"fullTermPolicyBilling": {
"policyPremium": 85000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 85500
},
"matchedSegments": [
{
"startDate": "2025-01-01",
"endDate": "2026-01-01"
}
]
}
},
{
"summary": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"companyId": "550e8400-e29b-41d4-a716-446655440099",
"createdAt": "2025-01-15T10:30:00.000Z",
"policyVersion": 2,
"versionCreatedAt": "2025-02-01T14:00:00.000Z",
"fullTermPolicyInfo": {
"policyStatus": "Active"
},
"fullTermPolicyBilling": {
"policyPremium": 102000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 102500
},
"matchedSegments": [
{
"startDate": "2025-01-01",
"endDate": "2025-06-01"
},
{
"startDate": "2025-06-01",
"endDate": "2026-01-01"
}
]
}
}
],
"totalCount": 2
}Authorizations
Query Parameters
JSON-encoded array of field filters. Each filter targets a field in the segment's
fieldModelV1Data and supports type-specific operators. Supported field types:
text, number, boolean, date, currency, optionSet, address, join,
textList, numberList, optionSetList, addressList.
List-cardinality types support operators: listIncludes (textList, numberList,
addressList), listIn, listAll, listExcludes (optionSetList).
The join type supports the in operator.
See the Configuration API for available field reference IDs.
Was this page helpful?
