Request the consent of the parties
const url = 'https://integrador.avalisto.com/v1/rental/consents';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"productId":"prod_123","parties":[{"firstName":"Ana","lastName":"Ejemplo","documentType":"dni","documentNumber":"00000000T","email":"ana@example.com","role":"tenant"}]}'};
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/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).
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»object
Product id (must have requirements.consent = true)
Example
prod_123People who must sign the consent. Every tenant and guarantor of the later quote must be here. Max 10
object
First name
Example
AnaLast name
Example
EjemploIdentity document type
Example
dniIdentity document number (letters and digits)
Example
00000000TEmail address: the consent request is sent here
Example
ana@example.comRole in the operation. Defaults to tenant
Example
tenantResponses
Sección titulada «Responses»object
Consent id: send it as consentId when quoting
Product id
Pending until every party has signed
People asked to sign
object
Full name
Identity document, masked (last 3 characters visible)
Email address
Creation date (ISO 8601, UTC)
Date all parties signed; null while pending
Example
{ "status": "pending", "parties": [ { "fullName": "Ana Ejemplo", "documentNumberMasked": "******00T", "email": "ana@example.com" } ]}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" } ] }}