Ir al contenido

Accept a quote as a proposal

POST
/v1/home/quotes/{id}/proposal
curl --request POST \
--url https://integrador.avalisto.com/v1/home/quotes/example/proposal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "effectiveDate": "2027-01-01", "iban": "ES0000000000000000000000", "policyholder": { "secondLastName": "Prueba", "birthDate": "1990-01-31", "gender": "male", "maritalStatus": "single", "profession": "Ingeniera", "phone": "600000000", "nationality": "ESP", "allowsCommunication": false, "address": { "streetType": "street", "street": "Calle Ejemplo", "number": 12, "floor": "3", "door": "B", "postalCode": "28000", "town": "Madrid", "province": "Madrid" } }, "owner": { "secondLastName": "Prueba", "birthDate": "1990-01-31", "gender": "male", "maritalStatus": "single", "profession": "Ingeniera", "phone": "600000000", "nationality": "ESP", "allowsCommunication": false, "address": { "streetType": "street", "street": "Calle Ejemplo", "number": 12, "floor": "3", "door": "B", "postalCode": "28000", "town": "Madrid", "province": "Madrid" }, "firstName": "Luis", "lastName": "Ejemplo", "documentType": "dni", "documentNumber": "11111111H", "email": "luis@example.com" }, "mortgage": { "lender": "Banco Ejemplo", "lenderTaxId": "A00000000", "loanNumber": "0000000000" } }'

Adds the policyholder, payment and start date. The quote becomes “quoted” with its final premium and can then be contracted.

id
required
string

Quote id

Media typeapplication/json
object
effectiveDate
required

Coverage start, ISO YYYY-MM-DD. Today or later

string

Example

2027-01-01
iban
required

IBAN for the premium direct debit

string

Example

ES0000000000000000000000
policyholder
required

Additional policyholder details

object
secondLastName

Second last name

string

Example

Prueba
birthDate
required

Birth date, ISO YYYY-MM-DD

string

Example

1990-01-31
gender
required

Gender

string
Allowed values: male female

Example

female
maritalStatus
required

Marital status

string
Allowed values: single married widowed separated divorced de_facto_separated

Example

single
profession

Profession

string

Example

Ingeniera
phone
required

Phone number

string

Example

600000000
nationality

Nationality, ISO 3166-1 alpha-3. Defaults to ESP

string

Example

ESP
allowsCommunication

Accepts commercial communications

boolean

Example

false
address

Postal address of the policyholder. Defaults to the insured home

object
streetType

Street type. Defaults to “street”

string
Allowed values: street avenue square promenade road path passage roundabout alley crossing ring_road boulevard development

Example

street
street
required

Street name

string

Example

Calle Ejemplo
number
required

Street number

number

Example

12
floor

Floor

string

Example

3
door

Door

string

Example

B
postalCode
required

Postal code (5 digits)

string

Example

28000
town
required

Town

string

Example

Madrid
province
required

Province

string

Example

Madrid
owner

Owner of the home, who is the insured person. Omit it when the policyholder is the owner

object
secondLastName

Second last name

string

Example

Prueba
birthDate
required

Birth date, ISO YYYY-MM-DD

string

Example

1990-01-31
gender
required

Gender

string
Allowed values: male female

Example

female
maritalStatus
required

Marital status

string
Allowed values: single married widowed separated divorced de_facto_separated

Example

single
profession

Profession

string

Example

Ingeniera
phone
required

Phone number

string

Example

600000000
nationality

Nationality, ISO 3166-1 alpha-3. Defaults to ESP

string

Example

ESP
allowsCommunication

Accepts commercial communications

boolean

Example

false
address

Postal address of the policyholder. Defaults to the insured home

object
streetType

Street type. Defaults to “street”

string
Allowed values: street avenue square promenade road path passage roundabout alley crossing ring_road boulevard development

Example

street
street
required

Street name

string

Example

Calle Ejemplo
number
required

Street number

number

Example

12
floor

Floor

string

Example

3
door

Door

string

Example

B
postalCode
required

Postal code (5 digits)

string

Example

28000
town
required

Town

string

Example

Madrid
province
required

Province

string

Example

Madrid
firstName
required

First name

string

Example

Luis
lastName
required

Last name

string

Example

Ejemplo
documentType
required

Identity document type

string
Allowed values: dni nie cif

Example

dni
documentNumber
required

Identity document number

string

Example

11111111H
email
required

Email address

string

Example

luis@example.com
mortgage

Required if the quote was created with mortgageLinked = true

object
lender
required

Lending institution

string

Example

Banco Ejemplo
lenderTaxId
required

Tax id of the lending institution

string

Example

A00000000
loanNumber
required

Loan number

string

Example

0000000000
Media typeapplication/json
object
id
required

Quote id

string
productId
required

Product id

string
nullable
status
required

Draft: simulated; quoted: proposal accepted, ready to contract; contracted: policy issued

string
Allowed values: draft quoted contracted expired
property
required

Insured home

object
street
required

Street

string
number
required

Number

string
nullable
details
required

Floor, door, staircase… in one line

string
nullable
postalCode
required

Postal code

string
town
required

Town

string
province
required

Province

string
use
required

Use of the property

string
Allowed values: residential commercial
premium
required

Annual premium

object
amount
required

Amount in currency units

number
currency
required

ISO 4217 currency

string
Allowed values: EUR
coverages
required

Covers included

Array<object>
object
code
required

Cover code

string
name
required

Cover name

string
insuredAmount
required

Sum insured (EUR); null if not applicable

number
nullable
createdAt
required

Creation date (ISO 8601, UTC)

string
expiresAt
required

Expiry of the quote; null if not set

string
nullable

Example

{
"status": "draft",
"property": {
"street": "Calle Ejemplo",
"number": "12",
"details": "3º B",
"postalCode": "28000",
"town": "Madrid",
"province": "Madrid",
"use": "residential"
},
"premium": {
"amount": 650,
"currency": "EUR"
},
"coverages": [
{
"code": "water_damage",
"name": "Daños por agua"
}
]
}

Invalid request (validation_error, invalid_cursor, missing_idempotency_key)

Media typeapplication/json
object
error
required
object
code
required

Stable error code. Part of the contract.

string
message
required

Developer-oriented message in English

string
requestId
required

Correlation id; the same value as the X-Request-Id response header

string
details

Only for validation_error: which fields failed

Array<object>
object
field
required

Field that failed validation

string
issue
required

What is wrong with the field

string

Example

{
"error": {
"code": "validation_error",
"message": "Request validation failed",
"requestId": "3f6c2a0e-1b7d-4c55-9a52-2f6c1f0d9e11",
"details": [
{
"field": "monthlyRent",
"issue": "must be a positive number"
}
]
}
}

Missing, invalid, expired or revoked credential

Media typeapplication/json
object
error
required
object
code
required

Stable error code. Part of the contract.

string
message
required

Developer-oriented message in English

string
requestId
required

Correlation id; the same value as the X-Request-Id response header

string
details

Only for validation_error: which fields failed

Array<object>
object
field
required

Field that failed validation

string
issue
required

What is wrong with the field

string

Example

{
"error": {
"code": "validation_error",
"message": "Request validation failed",
"requestId": "3f6c2a0e-1b7d-4c55-9a52-2f6c1f0d9e11",
"details": [
{
"field": "monthlyRent",
"issue": "must be a positive number"
}
]
}
}

Missing scope (forbidden_scope) or product not available (product_not_available)

Media typeapplication/json
object
error
required
object
code
required

Stable error code. Part of the contract.

string
message
required

Developer-oriented message in English

string
requestId
required

Correlation id; the same value as the X-Request-Id response header

string
details

Only for validation_error: which fields failed

Array<object>
object
field
required

Field that failed validation

string
issue
required

What is wrong with the field

string

Example

{
"error": {
"code": "validation_error",
"message": "Request validation failed",
"requestId": "3f6c2a0e-1b7d-4c55-9a52-2f6c1f0d9e11",
"details": [
{
"field": "monthlyRent",
"issue": "must be a positive number"
}
]
}
}

Resource not found (not_found)

Media typeapplication/json
object
error
required
object
code
required

Stable error code. Part of the contract.

string
message
required

Developer-oriented message in English

string
requestId
required

Correlation id; the same value as the X-Request-Id response header

string
details

Only for validation_error: which fields failed

Array<object>
object
field
required

Field that failed validation

string
issue
required

What is wrong with the field

string

Example

{
"error": {
"code": "validation_error",
"message": "Request validation failed",
"requestId": "3f6c2a0e-1b7d-4c55-9a52-2f6c1f0d9e11",
"details": [
{
"field": "monthlyRent",
"issue": "must be a positive number"
}
]
}
}

Rate limit or daily quota exceeded; see Retry-After

Media typeapplication/json
object
error
required
object
code
required

Stable error code. Part of the contract.

string
message
required

Developer-oriented message in English

string
requestId
required

Correlation id; the same value as the X-Request-Id response header

string
details

Only for validation_error: which fields failed

Array<object>
object
field
required

Field that failed validation

string
issue
required

What is wrong with the field

string

Example

{
"error": {
"code": "validation_error",
"message": "Request validation failed",
"requestId": "3f6c2a0e-1b7d-4c55-9a52-2f6c1f0d9e11",
"details": [
{
"field": "monthlyRent",
"issue": "must be a positive number"
}
]
}
}