# Compare Programs

> Compare a renewal, quotes or draft structures against a common base Program.

`POST https://towers-api.vinsa.dev/api/v1/comparisons` compares each Candidate with the same Base. Use it to compare a renewal with the expiring Program, compare quotes A/B/C, or evaluate draft structures. Send the [API key](https://towers.vinsa.dev/docs/api/authentication.md) from your server.

## Request

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `requestId` | string | No | Caller reference. |
| `source` | object | No | Caller metadata with `system` (string) and optional `version` (string). |
| `viewpoint` | object | No | `{ kind: 'whole' }` or `{ kind: 'reinsurer', reinsurer: string }`. Defaults to `whole`. The reinsurer name applies to the Base and every Candidate. |
| `base` | Program | Yes | Program used as the baseline. |
| `candidates` | Candidate[] | Yes | At least one Program to compare with the Base. Each entry has a unique non-empty string `candidateId` and a `program`. |
| `pairs` | Pair[] | No | Explicit Layer matches, applied in array order. Each entry has a `candidateId` and `base` and `candidate` Layer references, each with a non-empty string `contractRef` and `layerRef`. |
| `losses` | Loss[] | No | Non-empty array of [Losses](https://towers.vinsa.dev/docs/api/recoveries.md#request) with unique `lossId`s, replayed through the Base and every Candidate. |

Use the same [Program shape and validation](https://towers.vinsa.dev/docs/api/request.md) as for `/towers`. Validation errors identify the input under `base` or `candidates[i].program`.

## How Layers match

For each Candidate, a Layer can take part in one match per side. Both viewpoints match all Layers using the same rules.

1. Apply explicit `pairs`. Ignore a pair naming an unknown Candidate or a Layer reference that identifies zero or multiple Layers. Report the corresponding warning at `pairs[i]`. If an earlier pair already matched either Layer, the earlier pair wins and the later pair produces a warning.
2. Match remaining Layers with the same `contractRef` and `layerRef`. Layers with an omitted or empty `layerRef` skip this step. Match repeated refs in Program order on each side.
3. Group the remaining Layers by `layerType`, effective `accumulateBasis` and the Contract's `lineOfBusiness`. XOL defaults to `CLM`, while proportional Layers have no basis. Within each group, sort by `lowerLimit` ascending and use Program order (Contract, then Layer) to break ties. Match the same rank across the two sides. This lets renamed Contracts match and keeps established ref matches when a new bottom Layer is inserted.
4. Return any remaining Candidate Layers as `added` and any remaining Base Layers as `removed`.

In the reinsurer viewpoint, the Engine selects results after matching. A Layer participates if it carries at least one of Our non-declined Lines.

- When both Layers in a match participate, report the match.
- When only the Base Layer participates, report it as `removed`. When only the Candidate Layer participates, report it as `added`.
- Report unmatched participating Layers as `removed` or `added` in Program order. Omit Layers with no participation.

Currency has no effect on matching. If a match crosses effective currencies, the Engine reports the changed amounts as supplied and emits one warning at the Candidate Layer's path. No FX conversion is applied.

## Response

| Field | Type | Meaning |
| --- | --- | --- |
| `candidates` | Candidate comparison[] | One result per Candidate, in request order. |
| `estimate` | true | Present when Losses are supplied. All Loss replay amounts are Estimates for illustration and what-if analysis. Never use them for booking. |
| `warnings` | Issue[] | Matching, currency and Loss replay warnings. |
| `limitations` | Issue[] | Viewpoint and Loss replay limitations. |

**Candidate comparison**

| Field | Type | Meaning |
| --- | --- | --- |
| `candidateId` | string | Id supplied with the Candidate. |
| `period` | FieldChange[] | Program `inceptionDate` and `expiryDate` changes. Empty when unchanged. |
| `matches` | Layer match[] | Layer matches in Base Program order. |
| `added` | Layer reference[] | Unmatched Layers in Candidate Program order. |
| `removed` | Layer reference[] | Unmatched Layers in Base Program order. |
| `contracts` | Contract comparison[] | Candidate Contracts with a Base counterpart, in Candidate Program order. |
| `coverage` | Coverage band[] | Amount bands covered on only one side. Empty when the coverage structures are identical. |
| `losses` | `{ base: RecoverySummary, candidate: RecoverySummary }` | Present when Losses are supplied. |

**Layer match**

| Field | Type | Meaning |
| --- | --- | --- |
| `base`, `candidate` | Layer reference | Each has a string `contractRef` and a string `layerRef`. Omitted or empty Layer refs are returned as null. |
| `matchedBy` | string | `pair`, `ref` or `position`. |
| `structure` | FieldChange[] | Changes to `layerType`, `accumulateBasis`, `protection`, `lowerLimit`, `upperLimit`, `isUnlimited`, `layerAmount`, `participationShare`, `retainedShare` and effective `currency`. |
| `terms` | FieldChange[] | Changes to `premium`, `commission`, the full `reinstatements` array, `aad`, the supplied `aggregateLimit` and `eventLimit`. |
| `placement` | Placement comparison | Changes to the derived Order, Lines and Layer placement status. |
| `pricing` | Pricing comparison or null | Pricing for the matched Layers when their effective currencies agree. |

Each `FieldChange` has a string `field` and JSON values `before` and `after`. Structure, terms and period entries use the request field name and include only changed values. Arrays use deep equality. Missing values and null compare equally and appear as null when the other side has a value. `protection` defaults to `ALL`, and effective `currency` uses the Layer override or the Contract currency.

Attachment is `lowerLimit`, which is also the XOL retention. Proportional retention is `retainedShare`. Type and basis are `layerType` and `accumulateBasis`.

**Placement comparison**

In the whole viewpoint, the Engine signs each Layer using its own Contract's signing rule and the default precision of `/placements`. In the reinsurer viewpoint, the Engine compares [Our Line placements](https://towers.vinsa.dev/docs/api/viewpoints.md#placements), including supplied Signed shares under either signing rule. See [Placement warnings and current limitations](https://towers.vinsa.dev/docs/api/placements.md#warnings-and-current-limitations).

| Field | Type | Meaning |
| --- | --- | --- |
| `order` | FieldChange or null | Change in derived Order with `field: 'order'`. Null when unchanged. |
| `lines` | LineChange[] | Added, removed or changed Lines. Empty when every Line is unchanged. |
| `status` | FieldChange or null | Change in derived Layer placement status with `field: 'status'`. Null when unchanged or in the reinsurer viewpoint. |
| `ourShareOfWhole` | FieldChange or null | Change in Our share of the whole Layer. Present in the reinsurer viewpoint and null when unchanged. |

The Engine matches Lines by the exact `reinsurer` string and pairs repeated names in list order. A matched Line is changed if its `status`, `writtenShare`, `writtenShareOfWhole`, `signedShare`, `signedShareOfWhole` or `signingFactor` differs. Numeric differences within the signing engine's `SHARE_TOLERANCE` (`1e-9`) are treated as equal. The result lists changed and removed Lines in Base Line order, followed by added Lines in Candidate Line order.

**LineChange**

| Field | Type | Meaning |
| --- | --- | --- |
| `reinsurer` | string | Name used to match the Line. |
| `change` | string | `added`, `removed` or `changed`. |
| `before` | LinePlacement or null | [Base Line placement](https://towers.vinsa.dev/docs/api/placements.md#lineplacement). Null for an added Line. |
| `after` | LinePlacement or null | [Candidate Line placement](https://towers.vinsa.dev/docs/api/placements.md#lineplacement). Null for a removed Line. |

**Contract comparison**

| Field | Type | Meaning |
| --- | --- | --- |
| `contractRef` | string | Candidate Contract ref. |
| `baseContractRef` | string | Base counterpart ref. |
| `period` | FieldChange[] | Changes to the Contract's own `inceptionDate` and `expiryDate`. Empty when unchanged. |
| `pricing` | Pricing comparison or null | Pricing for the Contract on each side, using only the selected Layers in the reinsurer viewpoint. Null unless every Layer on both sides shares an effective currency. |

A same-ref Contract takes precedence as the counterpart. For a renamed Contract, all its reported matches must trace to a single Base Contract that is still available as a counterpart. Remaining Candidate Contracts are checked in Program order. Program and Contract period differences appear only in their respective `period` arrays.

**Pricing comparison**

Pricing compares the figures supplied in the request. A Layer's limit is `layerAmount` when supplied, or `upperLimit − lowerLimit` otherwise. An unlimited Layer has a null limit. Pricing uses 100% Layer figures. Contract pricing sums the premiums and limits of the Layers in each comparison, including added and removed Layers. The total premium is null if any Layer lacks a premium. The total limit is null if any Layer is unlimited.

Rate on line is `premium × 100 ÷ limit`. It is null when premium is missing or the limit is null or zero. Each percentage change is `(after − before) × 100 ÷ before`. A percentage change is null when either figure is null or the Base figure is zero. Pricing figures are unrounded and produce no additional warnings.

| Field | Type | Meaning |
| --- | --- | --- |
| `rateOnLine` | `{ before: number \| null, after: number \| null }` | Base and Candidate rates as percentages or null. Present even when unchanged. |
| `premiumChangePct` | number or null | Percentage change in premium. |
| `limitChangePct` | number or null | Percentage change in limit. |
| `rateOnLineChangePct` | number or null | Percentage change in rate on line. |

### Coverage differences

Coverage uses the stated amount ranges of XOL Layers. Each Layer covers `lowerLimit` to `upperLimit` or continues upward without a cap when unlimited. In the reinsurer viewpoint, coverage includes only Layers carrying Our non-declined Lines. The ranges use the stated limits regardless of placement status, Order or `protection`. Proportional Layers (QSR, SPL and FAC) are excluded because they cover a share of every amount.

The Engine matches Risks by `riskId` and uses only the Contracts each Risk lists in `contractRefs`. It compares stacks separately by effective currency (the Layer override or the Contract currency), Contract line of business and effective accumulation basis. On each side, it merges overlapping and touching XOL ranges in each stack. It compares the resulting unions exactly, with no tolerance, and merges adjacent difference bands with the same `coveredIn`. A Risk or stack present on only one side contributes its entire covered union without a warning.

Results follow Base Risk order, followed by Candidate-only Risks in Candidate order. For each Risk, stacks follow first appearance on the Base, then the Candidate, scanning `contractRefs` in order and each Contract's Layers in order. Within each stack, bands are sorted by ascending `from`.

| Field | Type | Meaning |
| --- | --- | --- |
| `riskId` | string | Risk whose coverage differs. |
| `currency` | string | Effective currency of the stack. |
| `lineOfBusiness` | string or null | Trimmed Contract line of business. Null when absent or blank. |
| `basis` | string | Effective `accumulateBasis`. One of `CLM`, `RSK`, `EVT` or `AGR`. XOL defaults to `CLM`. |
| `from` | number | Lower boundary of the difference band. |
| `to` | number or null | Upper boundary of the band. Null means “and above.” |
| `coveredIn` | string | `base` for a Base-only band or `candidate` for a Candidate-only band. |

### Loss replay

The Engine uses the same calculation as [`/recoveries`](https://towers.vinsa.dev/docs/api/recoveries.md) for the Base and each Candidate. It reuses the Base summary for every Candidate. Each run starts with the version's full Program and annual terms, uses the requested viewpoint, and includes all applicable Losses. Opening positions and per-Line splits are available through [`/recoveries`](https://towers.vinsa.dev/docs/api/recoveries.md).

The Engine uses Loss dates exactly as supplied for every version. To replay last year's Losses into a renewal, date them within the renewal's period before sending them. For Loss dates outside the period, `amount and time` reinstatements report `loss-outside-period` when priced and use the clamped time fraction from [`/recoveries`](https://towers.vinsa.dev/docs/api/recoveries.md#annual-terms).

Each Loss must name a Risk in the Base or at least one Candidate. A Risk absent from every version returns HTTP 400 at `losses[i].riskId`. If a version lacks the Risk, the Engine excludes that Loss from the run and issues a warning naming the version. In the whole viewpoint, the Engine adds its gross to `netRetained` in the Loss currency. When a version lacks every submitted Risk, its `ceded` and `retained` lists are empty and `netRetained` contains the full gross amounts by currency. In the reinsurer viewpoint, a Loss on a missing Risk adds nothing to `ourShare`.

**RecoverySummary**

| Field | Type | Meaning |
| --- | --- | --- |
| `ceded` | Money[] or null | The run's `program.recovered`. |
| `retained` | Money[] or null | The sum of non-null `LayerYear.retained` by effective Layer currency. This is the unplaced share the cedant keeps inside the Layers. |
| `netRetained` | Money[] or null | The run's `program.netRetained` plus gross on missing Risks. This is gross less ceded and includes amounts outside cover. |
| `ourShare` | Money[] | Our share Estimates from the run's `program.ourShare`. Present in the reinsurer viewpoint. Empty if the version lacks every submitted Risk. |

In the reinsurer viewpoint, `ceded`, `retained` and `netRetained` are null.

Each Money entry has `currency` and `amount`. The `retained` list follows the first appearance of each currency in Layer order. The `ceded` and `netRetained` lists follow the recovery totals' currency order. Currencies found only in missing Losses are appended to `netRetained` in Loss request order.

### Warnings and limitations

Each Issue has a string `code`, a string `message` and an optional string `path` into the request.

The Engine forwards warnings and limitations from each recovery run. Program paths in both the `path` and `message` fields begin with `base` or `candidates[i].program`, and Loss paths keep their indices from the comparison request. The Engine deduplicates issues across versions by code, rewritten path and rewritten message, and preserves repeats within each run. It reports the [reinsurer Layer warnings](https://towers.vinsa.dev/docs/api/viewpoints.md#warnings) once per affected path, including when Losses are replayed.

| Code | When it appears |
| --- | --- |
| `comparison-pair-unknown-candidate` | A pair names an unknown Candidate. |
| `comparison-pair-ambiguous-layer` | A pair names more than one Layer on either side. |
| `comparison-pair-unknown-layer` | A pair references a Layer that does not exist. |
| `comparison-pair-duplicate` | A pair names a Layer already matched by an earlier pair for the same Candidate. |
| `comparison-currency-differs` | A match crosses effective currencies. |
| `comparison-loss-risk-missing` | One warning at `losses[i]` for each version missing the Loss's Risk. The message names `base` or the `candidateId`. |
| `viewpoint-cedant-totals-unavailable` | Losses are replayed in the reinsurer viewpoint. |

## Worked example

The renewal changes the working Layer’s attachment, limit, basis and terms. Its Order rises from 80% to 100% and its status moves from `short` to `fully subscribed`. One reinsurer changes its written share, one leaves and one joins. Premium rises from 20 to 24 and limit from 100 to 120, leaving rate on line at 20%. The working Contract’s total premium rises from 80 to 84 and total limit from 400 to 420, leaving its rate on line at 20% as well.

An explicit pair links the renamed working Layer, two Layers match by ref, and the cat Layer matches by position after its Contract is renamed. The result also shows an added Layer, a removed Layer and the new Program and Contract periods.

On the property Risk, the Base alone covers 100 to 200 per claim and 400 to 500 in aggregate. The Candidate alone covers 110 to 200 per risk.

The request also replays three Losses, including two from the same Event, against both Programs. The response gives the ceded, retained and net retained Estimates for each version.

```json title="comparisons-request.json"
{
  "base": {
    "contracts": [
      {
        "contractRef": "WORKING",
        "currency": "USD",
        "lineOfBusiness": "Property",
        "layers": [
          {
            "layerRef": "LOW",
            "layerName": "LOW",
            "layerType": "XOL",
            "lowerLimit": 100,
            "upperLimit": 200,
            "layerAmount": 100,
            "isUnlimited": false,
            "premium": 20,
            "order": 80,
            "lines": [
              {
                "reinsurer": "Continuing Re",
                "status": "firm order",
                "writtenShare": 50
              },
              {
                "reinsurer": "Departing Re",
                "status": "firm order",
                "writtenShare": 25
              }
            ],
            "commission": 5,
            "reinstatements": [
              {
                "number": 1,
                "rate": 100,
                "basis": "amount"
              }
            ],
            "aad": 15
          },
          {
            "layerRef": "MID",
            "layerName": "MID",
            "layerType": "XOL",
            "lowerLimit": 200,
            "upperLimit": 300,
            "layerAmount": 100,
            "isUnlimited": false,
            "premium": 20,
            "accumulateBasis": "RSK"
          },
          {
            "layerRef": "HIGH",
            "layerName": "HIGH",
            "layerType": "XOL",
            "lowerLimit": 300,
            "upperLimit": 400,
            "layerAmount": 100,
            "isUnlimited": false,
            "premium": 20
          },
          {
            "layerRef": "RETIRED",
            "layerName": "RETIRED",
            "layerType": "XOL",
            "lowerLimit": 400,
            "upperLimit": 500,
            "layerAmount": 100,
            "isUnlimited": false,
            "premium": 20,
            "accumulateBasis": "AGR"
          }
        ],
        "expiryDate": "2025-12-31"
      },
      {
        "contractRef": "CAT-2025",
        "currency": "USD",
        "lineOfBusiness": "Property",
        "layers": [
          {
            "layerRef": "CAT",
            "layerName": "CAT",
            "layerType": "XOL",
            "lowerLimit": 500,
            "upperLimit": 600,
            "layerAmount": 100,
            "isUnlimited": false,
            "accumulateBasis": "EVT"
          }
        ]
      }
    ],
    "risks": [
      {
        "riskId": "property",
        "contractRefs": [
          "WORKING",
          "CAT-2025"
        ]
      }
    ],
    "inceptionDate": "2025-01-01",
    "expiryDate": "2025-12-31"
  },
  "candidates": [
    {
      "candidateId": "renewal",
      "program": {
        "contracts": [
          {
            "contractRef": "WORKING",
            "currency": "USD",
            "lineOfBusiness": "Property",
            "layers": [
              {
                "layerRef": "HIGH",
                "layerName": "HIGH",
                "layerType": "XOL",
                "lowerLimit": 300,
                "upperLimit": 400,
                "layerAmount": 100,
                "isUnlimited": false,
                "premium": 20,
                "protection": "ALL",
                "accumulateBasis": "CLM"
              },
              {
                "layerRef": "LOWER",
                "layerName": "LOWER",
                "layerType": "XOL",
                "lowerLimit": 110,
                "upperLimit": 230,
                "layerAmount": 120,
                "isUnlimited": false,
                "premium": 24,
                "order": 100,
                "lines": [
                  {
                    "reinsurer": "Continuing Re",
                    "status": "firm order",
                    "writtenShare": 60
                  },
                  {
                    "reinsurer": "Incoming Re",
                    "status": "firm order",
                    "writtenShare": 40
                  }
                ],
                "commission": 5,
                "reinstatements": [
                  {
                    "basis": "amount",
                    "rate": 75,
                    "number": 1
                  }
                ],
                "aad": 20,
                "accumulateBasis": "RSK"
              },
              {
                "layerRef": "MID",
                "layerName": "MID",
                "layerType": "XOL",
                "lowerLimit": 200,
                "upperLimit": 300,
                "layerAmount": 100,
                "isUnlimited": false,
                "premium": 20,
                "accumulateBasis": "RSK"
              },
              {
                "layerRef": "LOW",
                "layerName": "LOW",
                "layerType": "QSR",
                "lowerLimit": 0,
                "upperLimit": 100,
                "layerAmount": 100,
                "isUnlimited": false,
                "premium": 20
              }
            ],
            "expiryDate": "2026-12-31"
          },
          {
            "contractRef": "CAT-2026",
            "currency": "USD",
            "lineOfBusiness": "Property",
            "layers": [
              {
                "layerRef": "CAT",
                "layerName": "CAT",
                "layerType": "XOL",
                "lowerLimit": 500,
                "upperLimit": 600,
                "layerAmount": 100,
                "isUnlimited": false,
                "accumulateBasis": "EVT"
              }
            ]
          }
        ],
        "risks": [
          {
            "riskId": "property",
            "contractRefs": [
              "WORKING",
              "CAT-2026"
            ]
          }
        ],
        "inceptionDate": "2026-01-01",
        "expiryDate": "2026-12-31"
      }
    }
  ],
  "pairs": [
    {
      "candidateId": "renewal",
      "base": {
        "contractRef": "WORKING",
        "layerRef": "LOW"
      },
      "candidate": {
        "contractRef": "WORKING",
        "layerRef": "LOWER"
      }
    }
  ],
  "losses": [
    {
      "lossId": "spring-1",
      "riskId": "property",
      "date": "2025-03-12",
      "amount": 160,
      "currency": "USD",
      "eventId": "spring-storm"
    },
    {
      "lossId": "spring-2",
      "riskId": "property",
      "date": "2025-03-12",
      "amount": 390,
      "currency": "USD",
      "eventId": "spring-storm"
    },
    {
      "lossId": "autumn-1",
      "riskId": "property",
      "date": "2025-10-08",
      "amount": 620,
      "currency": "USD"
    }
  ]
}
```

```json title="comparisons-response.json"
{
  "estimate": true,
  "candidates": [
    {
      "candidateId": "renewal",
      "period": [
        {
          "field": "inceptionDate",
          "before": "2025-01-01",
          "after": "2026-01-01"
        },
        {
          "field": "expiryDate",
          "before": "2025-12-31",
          "after": "2026-12-31"
        }
      ],
      "matches": [
        {
          "base": {
            "contractRef": "WORKING",
            "layerRef": "LOW"
          },
          "candidate": {
            "contractRef": "WORKING",
            "layerRef": "LOWER"
          },
          "matchedBy": "pair",
          "structure": [
            {
              "field": "accumulateBasis",
              "before": "CLM",
              "after": "RSK"
            },
            {
              "field": "lowerLimit",
              "before": 100,
              "after": 110
            },
            {
              "field": "upperLimit",
              "before": 200,
              "after": 230
            },
            {
              "field": "layerAmount",
              "before": 100,
              "after": 120
            }
          ],
          "terms": [
            {
              "field": "premium",
              "before": 20,
              "after": 24
            },
            {
              "field": "reinstatements",
              "before": [
                {
                  "number": 1,
                  "rate": 100,
                  "basis": "amount"
                }
              ],
              "after": [
                {
                  "basis": "amount",
                  "rate": 75,
                  "number": 1
                }
              ]
            },
            {
              "field": "aad",
              "before": 15,
              "after": 20
            }
          ],
          "placement": {
            "order": {
              "field": "order",
              "before": 80,
              "after": 100
            },
            "lines": [
              {
                "reinsurer": "Continuing Re",
                "change": "changed",
                "before": {
                  "reinsurer": "Continuing Re",
                  "status": "firm order",
                  "writtenShare": 50,
                  "writtenShareOfWhole": 40,
                  "signedShare": 50,
                  "signedShareOfWhole": 40,
                  "signingFactor": 1
                },
                "after": {
                  "reinsurer": "Continuing Re",
                  "status": "firm order",
                  "writtenShare": 60,
                  "writtenShareOfWhole": 60,
                  "signedShare": 60,
                  "signedShareOfWhole": 60,
                  "signingFactor": 1
                }
              },
              {
                "reinsurer": "Departing Re",
                "change": "removed",
                "before": {
                  "reinsurer": "Departing Re",
                  "status": "firm order",
                  "writtenShare": 25,
                  "writtenShareOfWhole": 20,
                  "signedShare": 25,
                  "signedShareOfWhole": 20,
                  "signingFactor": 1
                },
                "after": null
              },
              {
                "reinsurer": "Incoming Re",
                "change": "added",
                "before": null,
                "after": {
                  "reinsurer": "Incoming Re",
                  "status": "firm order",
                  "writtenShare": 40,
                  "writtenShareOfWhole": 40,
                  "signedShare": 40,
                  "signedShareOfWhole": 40,
                  "signingFactor": 1
                }
              }
            ],
            "status": {
              "field": "status",
              "before": "short",
              "after": "fully subscribed"
            }
          },
          "pricing": {
            "rateOnLine": {
              "before": 20,
              "after": 20
            },
            "premiumChangePct": 20,
            "limitChangePct": 20,
            "rateOnLineChangePct": 0
          }
        },
        {
          "base": {
            "contractRef": "WORKING",
            "layerRef": "MID"
          },
          "candidate": {
            "contractRef": "WORKING",
            "layerRef": "MID"
          },
          "matchedBy": "ref",
          "structure": [],
          "terms": [],
          "placement": {
            "order": null,
            "lines": [],
            "status": null
          },
          "pricing": {
            "rateOnLine": {
              "before": 20,
              "after": 20
            },
            "premiumChangePct": 0,
            "limitChangePct": 0,
            "rateOnLineChangePct": 0
          }
        },
        {
          "base": {
            "contractRef": "WORKING",
            "layerRef": "HIGH"
          },
          "candidate": {
            "contractRef": "WORKING",
            "layerRef": "HIGH"
          },
          "matchedBy": "ref",
          "structure": [],
          "terms": [],
          "placement": {
            "order": null,
            "lines": [],
            "status": null
          },
          "pricing": {
            "rateOnLine": {
              "before": 20,
              "after": 20
            },
            "premiumChangePct": 0,
            "limitChangePct": 0,
            "rateOnLineChangePct": 0
          }
        },
        {
          "base": {
            "contractRef": "CAT-2025",
            "layerRef": "CAT"
          },
          "candidate": {
            "contractRef": "CAT-2026",
            "layerRef": "CAT"
          },
          "matchedBy": "position",
          "structure": [],
          "terms": [],
          "placement": {
            "order": null,
            "lines": [],
            "status": null
          },
          "pricing": {
            "rateOnLine": {
              "before": null,
              "after": null
            },
            "premiumChangePct": null,
            "limitChangePct": 0,
            "rateOnLineChangePct": null
          }
        }
      ],
      "added": [
        {
          "contractRef": "WORKING",
          "layerRef": "LOW"
        }
      ],
      "removed": [
        {
          "contractRef": "WORKING",
          "layerRef": "RETIRED"
        }
      ],
      "contracts": [
        {
          "contractRef": "WORKING",
          "baseContractRef": "WORKING",
          "period": [
            {
              "field": "expiryDate",
              "before": "2025-12-31",
              "after": "2026-12-31"
            }
          ],
          "pricing": {
            "rateOnLine": {
              "before": 20,
              "after": 20
            },
            "premiumChangePct": 5,
            "limitChangePct": 5,
            "rateOnLineChangePct": 0
          }
        },
        {
          "contractRef": "CAT-2026",
          "baseContractRef": "CAT-2025",
          "period": [],
          "pricing": {
            "rateOnLine": {
              "before": null,
              "after": null
            },
            "premiumChangePct": null,
            "limitChangePct": 0,
            "rateOnLineChangePct": null
          }
        }
      ],
      "coverage": [
        {
          "riskId": "property",
          "currency": "USD",
          "lineOfBusiness": "Property",
          "basis": "CLM",
          "from": 100,
          "to": 200,
          "coveredIn": "base"
        },
        {
          "riskId": "property",
          "currency": "USD",
          "lineOfBusiness": "Property",
          "basis": "RSK",
          "from": 110,
          "to": 200,
          "coveredIn": "candidate"
        },
        {
          "riskId": "property",
          "currency": "USD",
          "lineOfBusiness": "Property",
          "basis": "AGR",
          "from": 400,
          "to": 500,
          "coveredIn": "base"
        }
      ],
      "losses": {
        "base": {
          "ceded": [
            {
              "currency": "USD",
              "amount": 475
            }
          ],
          "retained": [
            {
              "currency": "USD",
              "amount": 80
            }
          ],
          "netRetained": [
            {
              "currency": "USD",
              "amount": 695
            }
          ]
        },
        "candidate": {
          "ceded": [
            {
              "currency": "USD",
              "amount": 420
            }
          ],
          "retained": [
            {
              "currency": "USD",
              "amount": 0
            }
          ],
          "netRetained": [
            {
              "currency": "USD",
              "amount": 750
            }
          ]
        }
      }
    }
  ],
  "warnings": [],
  "limitations": []
}
```

## Full example: Northshore

This abridged response shows where coverage changes in the 2027 renewal and the replay **Estimates** using the same 2026 Loss dates in both versions.

[Download the Northshore request](https://towers.vinsa.dev/examples/northshore/comparisons.json).

```json title="comparisons-northshore-response.json"
{
  "estimate": true,
  "candidates": [
    {
      "candidateId": "NSM-2027-RI",
      "coverage": [
        {
          "riskId": "NSM-PROP",
          "currency": "USD",
          "lineOfBusiness": "Property",
          "basis": "RSK",
          "from": 1000000,
          "to": 1500000,
          "coveredIn": "base"
        },
        {
          "riskId": "NSM-PROP",
          "currency": "USD",
          "lineOfBusiness": "Property",
          "basis": "EVT",
          "from": 100000000,
          "to": 150000000,
          "coveredIn": "candidate"
        },
        {
          "riskId": "NSM-PROP",
          "currency": "USD",
          "lineOfBusiness": "Whole account",
          "basis": "EVT",
          "from": 10000000,
          "to": 25000000,
          "coveredIn": "base"
        },
        {
          "riskId": "NSM-CAS",
          "currency": "USD",
          "lineOfBusiness": "Whole account",
          "basis": "EVT",
          "from": 10000000,
          "to": 25000000,
          "coveredIn": "base"
        }
      ],
      "losses": {
        "base": {
          "ceded": [
            {
              "currency": "USD",
              "amount": 199393000
            }
          ],
          "retained": [
            {
              "currency": "USD",
              "amount": 36307000
            }
          ],
          "netRetained": [
            {
              "currency": "USD",
              "amount": 89507000
            }
          ]
        },
        "candidate": {
          "ceded": [
            {
              "currency": "USD",
              "amount": 209143000
            }
          ],
          "retained": [
            {
              "currency": "USD",
              "amount": 20506999.999999993
            }
          ],
          "netRetained": [
            {
              "currency": "USD",
              "amount": 79757000
            }
          ]
        }
      }
    }
  ]
}
```
