curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/validate \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/validate"
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/{policyId}/validate', 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/{policyId}/validate",
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/{policyId}/validate"
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/{policyId}/validate")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/validate")
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{
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"validatedAt": "2026-04-14T18:30:00.000Z",
"summary": {
"totalChecks": 8,
"passed": 8,
"failed": 0,
"skipped": 0
},
"results": [
{
"check": "contiguity",
"status": "pass",
"scope": "version:1"
},
{
"check": "fullTermInvariance",
"status": "pass",
"scope": "version:1"
},
{
"check": "hashCorrectness",
"status": "pass",
"scope": "version:1"
},
{
"check": "noDuplicateSegments",
"status": "pass",
"scope": "version:1"
},
{
"check": "transactionSegmentExistence",
"status": "pass",
"scope": "version:1"
},
{
"check": "cancelEarnedPremium",
"status": "pass",
"scope": "policy"
},
{
"check": "cancelReinstatePremium",
"status": "pass",
"scope": "policy"
},
{
"check": "versionSequentiality",
"status": "pass",
"scope": "policy"
}
]
}Validate Policy
Runs data consistency checks against a single policy and returns detailed results. This is a read-only diagnostic endpoint — no data is modified.
Eight checks are available, covering segment contiguity, hash
correctness, version sequentiality, full-term invariance, duplicate
detection, transaction-segment existence, and cancel/reinstate
premium consistency. By default all checks run; use the checks
parameter to select a subset.
Checks are either version-scoped (run once per policy version) or policy-scoped (run once for the whole policy). A policy with 3 versions and all 8 checks enabled produces up to 18 results (5 version-scoped checks x 3 versions + 3 policy-scoped checks).
Use the version parameter to validate a single version instead of
all versions.
Available checks
| Check | Scope | What it validates |
|---|---|---|
contiguity | version | Segments form a contiguous date range with no gaps or overlaps |
fullTermInvariance | version | Billing and policy metadata fields are constant across all segments in a version |
hashCorrectness | version | Stored segment hash matches the computed hash of the segment data |
noDuplicateSegments | version | No adjacent segments have identical hashes |
transactionSegmentExistence | version | At least one segment exists for the version |
versionSequentiality | policy | Versions are sequential starting from 1 with no gaps |
cancelEarnedPremium | policy | Cancel transaction premium matches earned premium through the cancellation date |
cancelReinstatePremium | policy | Reinstate transaction premium matches the pre-cancel version premium |
Required permission: company.policy:read
curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/validate \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/validate"
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/{policyId}/validate', 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/{policyId}/validate",
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/{policyId}/validate"
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/{policyId}/validate")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/validate")
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{
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"validatedAt": "2026-04-14T18:30:00.000Z",
"summary": {
"totalChecks": 8,
"passed": 8,
"failed": 0,
"skipped": 0
},
"results": [
{
"check": "contiguity",
"status": "pass",
"scope": "version:1"
},
{
"check": "fullTermInvariance",
"status": "pass",
"scope": "version:1"
},
{
"check": "hashCorrectness",
"status": "pass",
"scope": "version:1"
},
{
"check": "noDuplicateSegments",
"status": "pass",
"scope": "version:1"
},
{
"check": "transactionSegmentExistence",
"status": "pass",
"scope": "version:1"
},
{
"check": "cancelEarnedPremium",
"status": "pass",
"scope": "policy"
},
{
"check": "cancelReinstatePremium",
"status": "pass",
"scope": "policy"
},
{
"check": "versionSequentiality",
"status": "pass",
"scope": "policy"
}
]
}Authorizations
Path Parameters
Query Parameters
Response
Validation results for the policy
Validation results for a single policy, including a summary of pass/fail/skip counts and the individual check results.
Was this page helpful?
