List your rental policies
const url = 'https://integrador.avalisto.com/v1/rental/policies';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://integrador.avalisto.com/v1/rental/policies \ --header 'Authorization: Bearer <token>'Issued policies, newest first. Filter with ?productId=.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Query Parameters
Sección titulada «Query Parameters»Only items of this product
NextCursor of the previous page
1-100, default 25
Responses
Sección titulada «Responses»object
Items of this page
object
Identifier
Operation id
Product id
Number
Status
Coverage start (ISO YYYY-MM-DD)
Coverage end (ISO YYYY-MM-DD)
Total premium
object
Amount in currency units
ISO 4217 currency
Property
object
Street
Number
Floor, door, staircase… in one line
Postal code
Town
Province
Use of the property
Commercial name of the insurer as shown in the policy
Policy PDF. Signed URL valid 24 h
Number of claims on the policy
Cancellation date (ISO); null if not cancelled
Cursor of the next page; null if this is the last one
Number of items in this page
Example
{ "data": [ { "status": "active", "startDate": "2027-01-01", "endDate": "2027-12-31", "premium": { "amount": 650, "currency": "EUR" }, "property": { "street": "Calle Ejemplo", "number": "12", "details": "3º B", "postalCode": "28000", "town": "Madrid", "province": "Madrid", "use": "residential" }, "claimsCount": 0, "cancelledAt": null } ]}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" } ] }}