Get Earned Premium (Single Policy)
Returns earned premium for a single policy over a date range. Each transaction on the policy produces a daily contribution (a fixed daily rate over its effective range), and the earned premium on any given day is the sum of all active contributions.
Use the detail parameter to control response granularity:
transactions(default) — transaction-level totals onlydays— adds a daily time series of net earned premiumdaysAndTransactions— adds a daily time series with per-transaction contributions on each day
The date range is a half-open interval [startDate, endDate) and must
not exceed 366 days.
Use timeTravelBackToDate to see earned premium as it would have been
calculated at a prior point in time — only transactions created before
that timestamp are included.
Required permission: company.policy:read
Documentation Index
Fetch the complete documentation index at: https://docs.aiinsurance.io/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API key authentication. Include your API key in the Authorization header.
Path Parameters
Company identifier
Policy identifier
Query Parameters
Start of the earned premium window (inclusive). ISO 8601 date
(YYYY-MM-DD). Must be before or equal to endDate.
End of the earned premium window (exclusive). ISO 8601 date
(YYYY-MM-DD). The range [startDate, endDate) must not exceed
366 days.
Response granularity:
transactions—transactionTotalsonly (default)days— addsdaysarray with net earned premium per daydaysAndTransactions— addsdaysarray with per-transactioncontributionson each day
transactions, days, daysAndTransactions Only include transactions created before this timestamp (ISO 8601). Useful for auditing historical earned premium state.
Response
Earned premium for the policy
Earned premium for a single policy over the requested date range. Shape varies by detail level: - transactions — transactionTotals only (default) - days — adds days array (without per-transaction contributions) - daysAndTransactions — adds days array with contributions per day
The policy ID
Human-readable policy number
Total earned premium across all transactions for the requested date range
Each transaction's total earned premium contribution over the requested date range. Always present.
Daily earned premium time series. Only present when detail=days or detail=daysAndTransactions. Contains one entry per day in the half-open interval [startDate, endDate).
