Ir al contenido

List your rental policies

GET
/v1/rental/policies
curl --request GET \
--url https://integrador.avalisto.com/v1/rental/policies \
--header 'Authorization: Bearer <token>'

Issued policies, newest first. Filter with ?productId=.

productId

Only items of this product

cursor

NextCursor of the previous page

limit

1-100, default 25

Media typeapplication/json
object
data
required

Items of this page

Array<object>
object
id
required

Identifier

string
operationId
required

Operation id

string
productId
required

Product id

string
nullable
number
required

Number

string
status
required

Status

string
Allowed values: active cancelled expired
startDate
required

Coverage start (ISO YYYY-MM-DD)

string
endDate
required

Coverage end (ISO YYYY-MM-DD)

string
premium
required

Total premium

object
amount
required

Amount in currency units

number
currency
required

ISO 4217 currency

string
Allowed values: EUR
property
required

Property

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
insurerName
required

Commercial name of the insurer as shown in the policy

string
nullable
documentUrl
required

Policy PDF. Signed URL valid 24 h

string
nullable
claimsCount
required

Number of claims on the policy

number
cancelledAt
required

Cancellation date (ISO); null if not cancelled

string
nullable
nextCursor
required

Cursor of the next page; null if this is the last one

string
nullable
count
required

Number of items in this page

number

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)

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"
}
]
}
}