List Earned Premium (Multi-Policy)
curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/list/earned-premium \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/list/earned-premium"
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/list/earned-premium', 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/list/earned-premium",
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/list/earned-premium"
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/list/earned-premium")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/list/earned-premium")
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": [
{
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"policyNumber": "POL-2025-001",
"earnedPremiumTotal": 42465.75,
"transactionTotals": [
{
"transactionId": "660e8400-e29b-41d4-a716-446655440001",
"policyVersion": 1,
"action": "NEW_BUSINESS",
"totalContribution": 42465.75
}
]
},
{
"policyId": "550e8400-e29b-41d4-a716-446655440002",
"policyNumber": "POL-2025-002",
"earnedPremiumTotal": 28000,
"transactionTotals": [
{
"transactionId": "660e8400-e29b-41d4-a716-446655440010",
"policyVersion": 1,
"action": "NEW_BUSINESS",
"totalContribution": 25000
},
{
"transactionId": "660e8400-e29b-41d4-a716-446655440011",
"policyVersion": 2,
"action": "ENDORSE",
"totalContribution": 3000
}
]
}
],
"pagination": {
"offset": 0,
"limit": 50,
"total": 2
}
}
Earned Premium
List Earned Premium (Multi-Policy)
Returns earned premium for multiple policies, paginated by policy. Each item in the response has the same shape as the single-policy endpoint for the requested detail level.
Use segmentScope to control which policies are included based on
segment date matching:
"all"— every policy{"asOf":"YYYY-MM-DD"}— policies with segments active on that date{"fromDate":"YYYY-MM-DD","toDate":"YYYY-MM-DD"}— policies with segments overlapping the date range
Use filters to narrow results by field values in policy data.
The earned premium date range is a half-open interval [startDate, endDate)
and must not exceed 366 days.
Required permission: company.policy:read
GET
/
api
/
v1
/
external
/
companies
/
{companyId}
/
policies
/
list
/
earned-premium
List Earned Premium (Multi-Policy)
curl --request GET \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/list/earned-premium \
--header 'Authorization: <api-key>'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/list/earned-premium"
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/list/earned-premium', 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/list/earned-premium",
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/list/earned-premium"
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/list/earned-premium")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/list/earned-premium")
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": [
{
"policyId": "550e8400-e29b-41d4-a716-446655440001",
"policyNumber": "POL-2025-001",
"earnedPremiumTotal": 42465.75,
"transactionTotals": [
{
"transactionId": "660e8400-e29b-41d4-a716-446655440001",
"policyVersion": 1,
"action": "NEW_BUSINESS",
"totalContribution": 42465.75
}
]
},
{
"policyId": "550e8400-e29b-41d4-a716-446655440002",
"policyNumber": "POL-2025-002",
"earnedPremiumTotal": 28000,
"transactionTotals": [
{
"transactionId": "660e8400-e29b-41d4-a716-446655440010",
"policyVersion": 1,
"action": "NEW_BUSINESS",
"totalContribution": 25000
},
{
"transactionId": "660e8400-e29b-41d4-a716-446655440011",
"policyVersion": 2,
"action": "ENDORSE",
"totalContribution": 3000
}
]
}
],
"pagination": {
"offset": 0,
"limit": 50,
"total": 2
}
}
Authorizations
Query Parameters
Response granularity per policy:
transactions—transactionTotalsonly (default)days— addsdaysarray with net earned premium per daydaysAndTransactions— addsdaysarray with per-transactioncontributionson each day
Available options:
transactions, days, daysAndTransactions Was this page helpful?
