Build towers
POST https://towers-api.vinsa.dev/api/v1/towersSend a program; get back its towers. Nothing is stored: the same request always gives the same answer, so you can cache it for as long as your own data is unchanged.
Request
Section titled “Request”| Header | Value |
|---|---|
Authorization |
Bearer <your key> |
Content-Type |
application/json |
The body is a program with at least one risk. Contracts hold Layers, and Risks list their protecting contractRefs. The smallest useful body:
{ "program": { "contracts": [ { "contractRef": "C-1", "currency": "USD", "layers": [ { "layerName": "First excess", "layerType": "XOL", "lowerLimit": 2500000, "upperLimit": 5000000, "isUnlimited": false, "order": 100 } ] } ], "risks": [ { "riskId": "R-1001", "contractRefs": [ "C-1" ] } ] }}Every field is listed in the Request reference.
Response
Section titled “Response”200 OK with one entry per risk, in the order you sent them. Each has the towers to draw. The response also carries warnings, limitations and unlimitedDisplayHeight. See the Response reference.
You do not need to read the response to draw it: pass it to <Towers /> as it is.
Drawn shares
Section titled “Drawn shares”The whole viewpoint uses the shared signing Engine’s Signed shares. See the drawing rules for eligibility, retention and overflow.
Use the reinsurer viewpoint to draw Our Lines, the rest of the Order and the cedant’s share within each Layer slot.
Errors
Section titled “Errors”| Status | When |
|---|---|
400 |
The body cannot be drawn. The response lists every problem found. |
401 |
The key is missing or not valid. See Authentication. |
A 400 names each field at fault, so you can show or log exactly what to fix:
{ "message": "Invalid request body", "errors": [ { "path": "program.contracts[0].layers[1].upperLimit", "message": "upperLimit must be a number greater than lowerLimit when isUnlimited is false" }, { "path": "program.contracts[0].layers[2].layerType", "message": "layerType must be one of: FAC, QSR, XOL, SPL" } ]}All problems are reported at once, not just the first.