Policy Comparison API
parsing_statusstringYesCurrent parsing status (e.g., pending, completed)Overview
The Policy Comparison API compares old (current) and new (proposed) insurance policy documents side-by-side using AI-powered analysis. It extracts structured data from both policies and generates a detailed comparison including coverage changes, premium differences, driver/vehicle changes, and agent talking points.
Base URL
https://api.insurgrid.com/api/v1/agentAuthentication
All API requests require an API key passed in the request header.
X-API-Key
Your API key
Endpoints
Upload Policy Document
Upload a policy PDF document for comparison. Each file (old and new) must be uploaded separately.
POST /{agent_id}/policy/uploadContent-Type: multipart/form-data
Request
file
file
Yes
The policy PDF file to upload
entity_type
string
No
Type of policy document (default: declaration_page)
Response
id
string
Yes
Unique document identifier (UUID)
filename
string
Yes
Name of the uploaded file
entity_type
string
Yes
Type of the policy document
created_at
UTC datetime string
Yes
Creation time
Response (200 OK)
Create Policy Comparison
Create a comparison job between old and new policy documents. The comparison runs asynchronously in the background.
Content-Type: application/json
Request Body
prospect
string
Yes
Client/prospect name
old_policies
string[]
Yes
Array of document IDs for old/current policies
new_policies
string[]
Yes
Array of document IDs for new/proposed policies
cURL Example
JavaScript Example
Python Example
Response (200 OK)
List All Comparisons
List all policy comparisons for an agent.
Response (200 OK)
Response Schema
The comparison_result object contains three top-level sections:
current_or_old_policy Object
current_or_old_policy ObjectFull extraction of the old/current policy.
policy
object
Provider, policy number, coverage period, premium, payment details
drivers
array
List of drivers with license, DOB, status, violations
vehicles
array
List of vehicles with VIN, make/model, coverages, premiums
discounts
array
Applied discounts with amounts
surcharges
array
Applied surcharges
new_policy Object
new_policy ObjectFull extraction of the new/proposed policy (same structure as above).
comparison Object
comparison ObjectDetailed comparison between old and new policies.
provider_changed
boolean
Whether the insurance provider changed
driver_changes
object
Added, removed, and changed drivers
vehicle_changes
object
Added, removed, replaced, and changed vehicles
premium_comparison
object
Annual, monthly, 6-month premium differences
coverage_changes_by_vehicle
array
Per-vehicle coverage and deductible changes
added_discounts
array
Discounts in new policy not in old
removed_discounts
array
Discounts in old policy not in new
savings
object
Total savings amount and description
key_changes
array
Summary of key differences
coverage_comparison_table
array
Tabular coverage comparison by vehicle
premium_difference_reasons
array
Reasons for premium changes
talking_points
array
Agent talking points for client conversations
premium_comparison Object
premium_comparison Objectannual.old
number
Old annual premium
annual.new
number
New annual premium
annual.difference
number
Premium difference
annual.percent_change
number
Percentage change
monthly.old
number
Old monthly payment
monthly.new
number
New monthly payment
monthly.difference
number
Monthly difference
six_month.old
number
Old 6-month premium
six_month.new
number
New 6-month premium
six_month.difference
number
6-month difference
per_vehicle_breakdown
array
Premium breakdown per vehicle
coverage_changes_by_vehicle Array Item
coverage_changes_by_vehicle Array Itemvehicle_identifier
string
VIN or year/make/model
coverage_changes
array
Changed coverage types with old/new values
deductible_changes
array
Changed deductibles with old/new values
added_coverages
array
Coverages in new but not old policy
removed_coverages
array
Coverages in old but not new policy
missing_coverages
array
Coverages that should be considered
driver_changes Object
driver_changes Objectadded_drivers
array
Drivers in new policy only
removed_drivers
array
Drivers in old policy only
changed_drivers
array
Drivers with changed details
driver_count_change
object
Old count, new count, difference
vehicle_changes Object
vehicle_changes Objectadded_vehicles
array
Vehicles in new policy only
removed_vehicles
array
Vehicles in old policy only
replaced_vehicles
array
Vehicles swapped between policies
changed_vehicles
array
Vehicles with changed details
vehicle_count_change
object
Old count, new count, difference
How It Works
Upload Documents — Upload both the old/current policy and new/proposed policy PDFs using the upload endpoint. Note the returned
document_idfor each.Create Comparison — Call the comparison endpoint with the prospect name and arrays of old and new document IDs. The API returns a
comparison_idand begins processing in the background.AI Analysis — The system generates presigned URLs for all documents and sends them to Claude AI with a structured comparison prompt. Claude extracts data from both policies and generates a comprehensive comparison.
Poll for Results — Use the status endpoint to check when processing is complete.
Retrieve Results — Once
completed, fetch the full comparison result with extracted policy data and detailed diff analysis.Real-time Updates — The API also sends real-time events via Pusher when comparison completes or errors, allowing for webhook-based notification instead of polling.
Error Responses
Rate Limits
Free
5
50
Pro
30
1,000
Enterprise
Custom
Custom
Rate limit headers are included in all responses:
Supported Document Types
.pdf
Recommended. Supports text and scanned documents via OCR
Image
.jpg, .png
Single page documents only
Changelog
1.0.0
2024-11
Initial release
Support
Email: [email protected]
Documentation: https://docs.insurgrid.com
Status Page: https://status.insurgrid.com
Last updated
