Ir al contenido

Request the consent of the parties

POST
/v1/rental/consents
curl --request POST \
--url https://integrador.avalisto.com/v1/rental/consents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "productId": "prod_123", "parties": [ { "firstName": "Ana", "lastName": "Ejemplo", "documentType": "dni", "documentNumber": "00000000T", "email": "ana@example.com", "role": "tenant" } ] }'

Only for products with requirements.consent = true. Each party receives an email to sign; quote once the consent is signed (status signed).

Media typeapplication/json
object
productId
required

Product id (must have requirements.consent = true)

string

Example

prod_123
parties
required

People who must sign the consent. Every tenant and guarantor of the later quote must be here. Max 10

Array<object>
object
firstName
required

First name

string

Example

Ana
lastName
required

Last name

string

Example

Ejemplo
documentType
required

Identity document type

string
Allowed values: dni nie pas

Example

dni
documentNumber
required

Identity document number (letters and digits)

string

Example

00000000T
email
required

Email address: the consent request is sent here

string

Example

ana@example.com
role

Role in the operation. Defaults to tenant

string
Allowed values: tenant guarantor landlord

Example

tenant
Media typeapplication/json
object
id
required

Consent id: send it as consentId when quoting

string
productId
required

Product id

string
nullable
status
required

Pending until every party has signed

string
Allowed values: pending signed expired cancelled
parties
required

People asked to sign

Array<object>
object
fullName
required

Full name

string
documentNumberMasked
required

Identity document, masked (last 3 characters visible)

string
email
required

Email address

string
createdAt
required

Creation date (ISO 8601, UTC)

string
signedAt
required

Date all parties signed; null while pending

string
nullable

Example

{
"status": "pending",
"parties": [
{
"fullName": "Ana Ejemplo",
"documentNumberMasked": "******00T",
"email": "ana@example.com"
}
]
}

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