Quote a rental policy
const url = 'https://integrador.avalisto.com/v1/rental/quotes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"productId":"prod_123","monthlyRent":1200,"durationMonths":12,"property":{"street":"Calle Ejemplo","number":"12","details":"3º B","postalCode":"28000","town":"Madrid","province":"Madrid","use":"residential"},"parties":[{"role":"tenant","person":{"firstName":"Ana","lastName":"Ejemplo","documentType":"dni","documentNumber":"00000000T","email":"ana@example.com","phones":["600000000"],"birthDate":"1990-01-31","selfEmployed":false,"address":{"street":"Calle Ejemplo","number":"12","details":"3º B","postalCode":"28000","town":"Madrid","province":"Madrid"}},"guarantees":"00000000T"}],"consentId":"example","externalReference":"LEASE-0001"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://integrador.avalisto.com/v1/rental/quotes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "productId": "prod_123", "monthlyRent": 1200, "durationMonths": 12, "property": { "street": "Calle Ejemplo", "number": "12", "details": "3º B", "postalCode": "28000", "town": "Madrid", "province": "Madrid", "use": "residential" }, "parties": [ { "role": "tenant", "person": { "firstName": "Ana", "lastName": "Ejemplo", "documentType": "dni", "documentNumber": "00000000T", "email": "ana@example.com", "phones": [ "600000000" ], "birthDate": "1990-01-31", "selfEmployed": false, "address": { "street": "Calle Ejemplo", "number": "12", "details": "3º B", "postalCode": "28000", "town": "Madrid", "province": "Madrid" } }, "guarantees": "00000000T" } ], "consentId": "example", "externalReference": "LEASE-0001" }'Evaluates the operation and creates it. The decision is approved, rejected or manual_review (Avalisto needs to review it; you can upload documents meanwhile). In the test environment premiums are fictitious.
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»object
Product id (GET /v1/products)
Example
prod_123Monthly rent in EUR
Example
1200One of product.requirements.durationsMonths
Example
12Property
object
Street name
Example
Calle EjemploStreet number
Example
12Floor, door, staircase… in one line
Example
3º BPostal code (5 digits)
Example
28000Town
Example
MadridProvince
Example
MadridUse of the property
Example
residentialTenants and guarantors
object
Role in the operation
Example
tenantobject
First name
Example
AnaLast name
Example
EjemploIdentity document type
Example
dniIdentity document number
Example
00000000TEmail address
Example
ana@example.comPhone numbers
Example
[ "600000000"]ISO date YYYY-MM-DD; must be of age
Example
1990-01-31True if self-employed
Example
falseCurrent home address
object
Street name
Example
Calle EjemploStreet number
Example
12Floor, door, staircase… in one line
Example
3º BPostal code (5 digits)
Example
28000Town
Example
MadridProvince
Example
MadridGuarantors only: documentNumber of the tenant this guarantor backs
Example
00000000TRequired if product.requirements.consent is true. Must be signed
Your own reference (e.g. your lease id). Max 64 chars
Example
LEASE-0001Responses
Sección titulada «Responses»object
Quote id. May be equal to operationId
Operation id
Null for operations not created through the API
Evaluation result
Reasons for the decision (closed catalogue); may be empty
Total premium for the period. null if rejected
object
Amount in currency units
ISO 4217 currency
Monthly rent
Duration in months
Property
object
Street
Number
Floor, door, staircase… in one line
Postal code
Town
Province
Use of the property
Creation date (ISO 8601, UTC)
Example
{ "decision": "approved", "reasons": [], "premium": { "amount": 650, "currency": "EUR" }, "monthlyRent": 1200, "durationMonths": 12, "property": { "street": "Calle Ejemplo", "number": "12", "details": "3º B", "postalCode": "28000", "town": "Madrid", "province": "Madrid", "use": "residential" }, "createdAt": "2027-01-01T10:00:00.000Z"}Invalid request (validation_error, invalid_cursor, missing_idempotency_key)
object
object
Stable error code. Part of the contract.
Developer-oriented message in English
Correlation id; the same value as the X-Request-Id response header
Only for validation_error: which fields failed
object
Field that failed validation
What is wrong with the field
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
object
object
Stable error code. Part of the contract.
Developer-oriented message in English
Correlation id; the same value as the X-Request-Id response header
Only for validation_error: which fields failed
object
Field that failed validation
What is wrong with the field
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)
object
object
Stable error code. Part of the contract.
Developer-oriented message in English
Correlation id; the same value as the X-Request-Id response header
Only for validation_error: which fields failed
object
Field that failed validation
What is wrong with the field
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)
object
object
Stable error code. Part of the contract.
Developer-oriented message in English
Correlation id; the same value as the X-Request-Id response header
Only for validation_error: which fields failed
object
Field that failed validation
What is wrong with the field
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
object
object
Stable error code. Part of the contract.
Developer-oriented message in English
Correlation id; the same value as the X-Request-Id response header
Only for validation_error: which fields failed
object
Field that failed validation
What is wrong with the field
Example
{ "error": { "code": "validation_error", "message": "Request validation failed", "requestId": "3f6c2a0e-1b7d-4c55-9a52-2f6c1f0d9e11", "details": [ { "field": "monthlyRent", "issue": "must be a positive number" } ] }}