Quickstart
By the end of this page you will have this on screen, drawn from your own request:
Retention 20%
Retention 20%
Second excess, 5M xs 5M per claim kept by the cedant signed firm orderWidth is share of the risk, height is amount.
Help me add Towers reinsurance tower charts to this project. 1. Read the Towers setup skill at https://towers.vinsa.dev/.well-known/agent-skills/towers/SKILL.md and follow its steps in order. 2. Look at my project first to pick the right path, and tell me which one you chose. 3. Ask me for my Towers API key rather than making one up, and keep it in a server-side env file that is not committed. 4. When you are done, tell me what you changed and anything still waiting on me.
-
Get a key
Keys are issued on request. Follow Get an API key, then keep the key in an environment variable on your server:
Terminal window export TOWERS_API_URL="https://towers-api.vinsa.dev"export TOWERS_API_KEY="twr_..." -
Describe a program
Save this as
program.json. It is one risk with a quota share and two excess layers; the second carries its reinsurer panel.program.json {"program": {"contracts": [{"contractRef": "QS-1","currency": "USD","layers": [{"layerName": "Quota share","layerRef": "QS-1","layerType": "QSR","lowerLimit": 0,"isUnlimited": true,"participationShare": 100,"retainedShare": 20}]},{"contractRef": "XL-1","currency": "USD","layers": [{"layerName": "First excess","layerRef": "XL-1","layerType": "XOL","accumulateBasis": "CLM","lowerLimit": 2500000,"upperLimit": 5000000,"isUnlimited": false,"order": 100}]},{"contractRef": "XL-2","currency": "USD","layers": [{"layerName": "Second excess","layerRef": "XL-2","layerType": "XOL","accumulateBasis": "CLM","lowerLimit": 5000000,"upperLimit": 10000000,"isUnlimited": false,"order": 100,"lineBasis": "of whole","lines": [{"reinsurer": "Alder Re","writtenShare": 50,"status": "signed"},{"reinsurer": "Birch Syndicate","writtenShare": 30,"status": "firm order"},{"reinsurer": "Cedar Mutual","writtenShare": 20,"status": "quoted"}]}]}],"risks": [{"riskId": "R-1001","insuredName": "Harbour Logistics","contractRefs": ["QS-1","XL-1","XL-2"]}]}} -
Call the API
Terminal window curl "$TOWERS_API_URL/api/v1/towers" \-H "Authorization: Bearer $TOWERS_API_KEY" \-H "Content-Type: application/json" \-d @program.jsonYou get back one tower with three bands. Shortened here:
{"warnings": [],"limitations": [],"unlimitedDisplayHeight": 1000000,"risks": [{"riskId": "R-1001","insuredName": "Harbour Logistics","towers": [{"towerNo": 1,"towerName": "Tower","bands": [{ "hyFrom": 0, "hyTo": 2500000, "verticalBlocks": [ ... ] },{ "hyFrom": 2500000, "hyTo": 5000000, "verticalBlocks": [ ... ] },{ "hyFrom": 5000000, "hyTo": 10000000, "verticalBlocks": [ ... ] }],"unlimitedBands": []}]}]} -
Install the package
Terminal window npm install @vinsa/towersTerminal window pnpm add @vinsa/towersTerminal window yarn add @vinsa/towers -
Draw it
Pass the response to
<Towers />exactly as it arrived.import { Towers } from '@vinsa/towers';import type { TowersResponse } from '@vinsa/towers';import '@vinsa/towers/styles.css';export function ProgramTowers({ response }: { response: TowersResponse }) {return <Towers data={response} />;}
- Wire the call into your stack: Next.js or an existing portal.
- Send your real data: Request reference.
- Make it match your product: Theming.