Get Policy Version
curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/versions/{version} \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/versions/{version}"
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}/versions/{version}', 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}/versions/{version}",
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}/versions/{version}"
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}/versions/{version}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/versions/{version}")
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",
"policyVersion": 1,
"transactionId": "550e8400-e29b-41d4-a716-446655440002",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"createdAt": "2025-01-15T10:30:00.000Z",
"fullTermPolicyInfo": {
"policyStatus": "Active",
"policyStartDate": {
"year": 2025,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"policyEndDate": {
"year": 2026,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"primaryInsuredId": "550e8400-e29b-41d4-a716-446655440010"
},
"fullTermPolicyBilling": {
"policyPremium": 85000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 85500
},
"segments": [
{
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"fieldModelV1Data": {
"policy": {
"annualPremium": 85000,
"fullTermPolicyInfo": {
"policyStatus": "Active",
"policyStartDate": {
"year": 2025,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"policyEndDate": {
"year": 2026,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"primaryInsuredId": "550e8400-e29b-41d4-a716-446655440010"
},
"fullTermPolicyBilling": {
"policyPremium": 85000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 85500
},
"exposures": [
{
"id": "550e8400-e29b-41d4-a716-446655440010",
"exposureType": "MedicalFacility",
"bedCount": 120
}
]
}
}
}
]
}Transactions
Get Policy Version
Returns a specific version of a policy with all its derived segments.
Each segment contains the full policy state (policy-level fields and nested exposures)
for a contiguous date range. The fullTermPolicyInfo and fullTermPolicyBilling
fields are extracted from the segments for convenience — these are full-term invariant
fields that are identical across all segments in a version.
Required permission: company.policy:read
GET
/
api
/
v1
/
external
/
companies
/
{companyId}
/
policies
/
{policyId}
/
versions
/
{version}
Get Policy Version
curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/versions/{version} \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/versions/{version}"
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}/versions/{version}', 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}/versions/{version}",
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}/versions/{version}"
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}/versions/{version}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/versions/{version}")
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",
"policyVersion": 1,
"transactionId": "550e8400-e29b-41d4-a716-446655440002",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"createdAt": "2025-01-15T10:30:00.000Z",
"fullTermPolicyInfo": {
"policyStatus": "Active",
"policyStartDate": {
"year": 2025,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"policyEndDate": {
"year": 2026,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"primaryInsuredId": "550e8400-e29b-41d4-a716-446655440010"
},
"fullTermPolicyBilling": {
"policyPremium": 85000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 85500
},
"segments": [
{
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"fieldModelV1Data": {
"policy": {
"annualPremium": 85000,
"fullTermPolicyInfo": {
"policyStatus": "Active",
"policyStartDate": {
"year": 2025,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"policyEndDate": {
"year": 2026,
"month": 1,
"day": 1,
"timezone": "America/New_York"
},
"primaryInsuredId": "550e8400-e29b-41d4-a716-446655440010"
},
"fullTermPolicyBilling": {
"policyPremium": 85000,
"policyTaxes": 0,
"policyFees": 500,
"policyGrandTotal": 85500
},
"exposures": [
{
"id": "550e8400-e29b-41d4-a716-446655440010",
"exposureType": "MedicalFacility",
"bedCount": 120
}
]
}
}
}
]
}Authorizations
Path Parameters
Response
Policy version with segments
Response returned by policy transaction endpoints. Contains the policy version produced by the transaction, including all derived segments.
Was this page helpful?
