> ## Documentation Index
> Fetch the complete documentation index at: https://developers.vivara.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a quote

> The data a quote needs, and what the insurer returns.

Opening a case is the first step. The insurer prices the policy and tells you which documents it needs. It needs data only: you do not send documents at this step.

Generate a UUID v4 for the case and call `POST /non-payment-insurance/cases` with that `id` in the body. The call answers `201` with no body and a `Location` header with the URL of the case. Read the case with `GET` on that URL.

## Data you send

> [tab] Tenants and guarantors
>
> For each person on the rental contract, from one to four:
>
> | Field | Notes |
> | - | - |
> | Role | Tenant or guarantor |
> | ID number | DNI, NIE or passport number. Vivara detects which one it is |
> | Date of birth | |
> | Postal code | Where the person lives today, five digits |
> | Working status | A single value: permanent employee, temporary employee, civil servant, self-employed, company, retired, student or unemployed |
> | Employment start date | |
> | Annual income | Gross, in euros |
> | Your reference | Optional. Returned with the tenant's `id` |

> [tab] Landlord
>
> | Field | Notes |
> | - | - |
> | ID number | DNI, NIE, CIF or passport number. Vivara detects which one it is, and a CIF means the landlord is a company |

> [tab] Policy and property
>
> | Field | Notes |
> | - | - |
> | Start date | When the policy should take effect. Today or later |
> | Contract duration | 12, 18 or 24 months |
> | Rental amount | Monthly rent plus monthly expenses, in euros |
> | Insured property | Address of the property, with street type, street, number, floor, door, postal code, city and province |
> | Your reference | Optional identifier of the rental contract |

> [!NOTE]
>
> Money is always a number in euros, with up to two decimals. Dates are
> `YYYY-MM-DD`.

> [!NOTE]
>
> You do not need to score the tenant again before asking for a quote. If you
> scored a candidate without an ID number, add it now: the quote requires it.

## What you read from the case

`GET /non-payment-insurance/cases/{caseId}` returns the case. It includes:

* **Status:** `pending-documentation` when the offer is priced, or `rejected` when the insurer will not cover the contract.
* **Offer:** the net and total annual premium, the first and remaining installments, the coverages and a link to the insurer's offer document.
* **Reasons:** the insurer's exceptions, when the offer is conditioned, and its exclusions, when it cannot be contracted. Each has a code and a description.
* **Documentation:** the documents the insurer requires, under `documentation.missing`.
* **Tenant ids:** the `id` Vivara assigns to each person, which you use when uploading documents.

## If the call times out

A case id that was already used answers `409 case-already-exists`, whatever the data. After a timeout, read the case with `GET /non-payment-insurance/cases/{caseId}`: if it is there, the case was opened; if it answers `404`, it was not, and you can send the same id again. To price different data, generate a new id: it is a new case.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.