Authentication: All endpoints require Authorization: Bearer <access_token>.External Dependency: Narayana Health Insurance API (purchase, claims, status).
Overview
List Plans
Request
Request with filters
Response 200
curl "http://localhost:8080/insurance/plans" \
-H 'Authorization: Bearer eyJhbGci...'
Query filters (all optional):
Parameter Type Values plan_typestring INDIVIDUAL | FAMILY | GROUPcoverage_typestring BASIC | COMPREHENSIVE | PREMIUMmin_sum_insurednumber e.g. 200000 max_premiumnumber e.g. 10000
Calculate Premium
Request — individual
Response 200
curl -X POST http://localhost:8080/insurance/calculate-premium \
-H 'Authorization: Bearer eyJhbGci...' \
-H 'Content-Type: application/json' \
-d '{
"plan_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"policyholder": {
"dob": "1985-03-20",
"gender": "MALE"
},
"dependants": [
{ "relationship": "SPOUSE", "dob": "1988-07-12", "gender": "FEMALE" },
{ "relationship": "CHILD", "dob": "2015-01-05", "gender": "MALE" }
]
}'
Premium formula:
Component Formula Base plan.base_premiumAge loading (age > 35) 5% × ⌊(age − 35) / 5⌋ × base_premiumPer spouse +30% of base_premiumPer child +20% of base_premiumGST +18% of subtotal
Purchase Insurance
Called after a successful payment (order status = SUCCESS).
curl -X POST http://localhost:8080/insurance/purchase \
-H 'Authorization: Bearer eyJhbGci...' \
-H 'Content-Type: application/json' \
-d '{
"plan_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"payment_order_id": "aarokya-1767808100",
"dependants": [
{ "name": "Sunita Kumar", "relationship": "SPOUSE", "dob": "1988-07-12", "gender": "FEMALE" },
{ "name": "Aryan Kumar", "relationship": "CHILD", "dob": "2015-01-05", "gender": "MALE" }
]
}'
Get Policy Details
curl "http://localhost:8080/insurance/policies/{policyId}" \
-H 'Authorization: Bearer eyJhbGci...'
Submit Claim
curl -X POST "http://localhost:8080/insurance/policies/{policyId}/claim" \
-H 'Authorization: Bearer eyJhbGci...' \
-H 'Content-Type: application/json' \
-d '{
"reason": "Hospitalization for appendicitis surgery",
"hospital_name": "Narayana Health City, Bengaluru",
"admission_date": "2025-06-10",
"amount_claimed": 45000.00
}'
Claims are forwarded to Narayana Health’s API — adjudication happens on their side. Aarokya does not own the claims workflow beyond submission.
Endpoint Summary
Method Path Description GET/insurance/plansList available plans (with optional filters) GET/insurance/plans/{id}Full plan detail with features + exclusions POST/insurance/calculate-premiumPremium breakdown for a plan + dependants POST/insurance/purchasePurchase plan, create policy via NH API GET/insurance/policiesList user’s active policies GET/insurance/policies/{id}Policy detail with dependants POST/insurance/policies/{id}/claimSubmit claim to Narayana Health