Skip to main content

Lending Analysis

Preliminary version

This is the first version of the Lending Analysis documentation and may undergo minor changes. We recommend following this page for future updates.

The Lending Analysis endpoint allows you to perform a complete credit analysis for a borrower, combining onboarding, credit analysis, and private payroll balance inquiry in a single request.

The operation is asynchronous: when you send the request, the API returns a synchronous response with the status pending_analysis. The final analysis result is delivered via webhook when processing is completed.

Flow
  1. The client sends a POST to /lending_analysis with the borrower data and desired inquiries.
  2. The API returns a synchronous response with the lending_analysis_key and status pending_analysis.
  3. When processing is complete, the API sends a webhook with the full analysis result.

Request

ENDPOINT
/lending_analysis
METHOD
POST
Request Body
{
"request_identifier_key": "12345678901",
"document_number": "46276658812",
"lending_analysis_type": "private_payroll",
"purchaser_document_number": "12345678000199",
"private_payroll": {
"employer_document_number": "12345678000199",
"registration_number": "12345678901"
},
"authorization_term": {
"legal_representative_document_number": "98765432100",
"signature": {
"signer": {
"document_number": "46276658812",
"name": "João da Silva",
"email": "joao.silva@email.com",
"phone": {
"number": "912345678",
"area_code": "11",
"country_code": "55"
}
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2026-03-12T10:00:00Z",
"ip_address": "192.168.1.100",
"fingerprint": {},
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
},
"analysis_data": {
"name": "João da Silva"
}
}

Body Params

FieldTypeDescriptionCharacters
request_identifier_keystringIdempotent request key. Must be unique per analysis.-
document_numberstringBorrower's CPF (digits only).11
lending_analysis_typestringCredit analysis type.Lending Analysis Type Enumerators
purchaser_document_numberstringPurchaser/assignee CNPJ. (optional)14
private_payrollobjectBorrower's private payroll data.Private Payroll Object
authorization_termobjectBorrower's authorization term.Authorization Term Object
analysis_dataobjectAdditional borrower data for the analysis.Analysis Data Object

Private Payroll Object

FieldTypeDescriptionCharacters
employer_document_numberstringEmployer's CNPJ.14
registration_numberstringWorker's registration number.-

Authorization Term Object

Attention

When there is a legal representative, you must fill in the legal_representative_document_number field with the representative's CPF, and the signer object data must be filled with the representative's information.

For more information about the authorization_term object, see the official documentation: Worker Inquiries - Balance Inquiry

FieldTypeDescriptionCharacters
legal_representative_document_numberstringLegal representative's CPF (required only when there is a legal representative).11
signature.signer.document_numberstringSigner's CPF.11
signature.signer.namestringSigner's name.-
signature.signer.emailstringSigner's email. (optional)-
signature.signer.phone.numberstringSigner's phone number. (optional)-
signature.signer.phone.area_codestringSigner's area code. (optional)2
signature.signer.phone.country_codestringCountry code (e.g., "55"). (optional)3
signature.authentication_typestringAuthentication type. Must be "opt_in".-
signature.authenticity.timestampstringConsent date and time (ISO 8601 format: 2026-03-12T10:00:00Z).-
signature.authenticity.ip_addressstringUser session IP (IPv4 or IPv6).-
signature.authenticity.fingerprintobjectAdditional traceability evidence (can be an empty object {}).-
signature.authenticity.session_idstringUser session identifier (min. 10, max. 50 characters).50

Analysis Data Object

FieldTypeDescriptionCharacters
namestringBorrower's name. (optional)-

Response

STATUS
202
Response Body
{
"analysis_status": "pending_analysis",
"lending_analysis_key": "06666318-c9e9-416b-ae2f-460355a3d8e8"
}
FieldTypeDescription
analysis_statusstringCurrent analysis status. Returns pending_analysis in the synchronous response.
lending_analysis_keystringAnalysis UUID key, used to correlate with the webhook.

STATUS
400
Response Body
{
"title": "Bad Request",
"description": "Invalid or missing required fields in the request body. Check 'document_number', 'lending_analysis_type', 'private_payroll', and 'authorization_term'.",
"translation": "Campos obrigatórios ausentes ou inválidos no corpo da requisição. Verifique 'document_number', 'lending_analysis_type', 'private_payroll' e 'authorization_term'.",
"extra_fields": {},
"code": "LAS000001"
}

STATUS
409

Returned when the request_identifier_key field has already been used in a previous request.

Response Body
{
"title": "Conflict",
"description": "A lending analysis with the provided 'request_identifier_key' already exists. Each analysis must use a unique identifier.",
"translation": "Já existe uma análise de crédito com o 'request_identifier_key' informado. Cada análise deve utilizar um identificador único.",
"extra_fields": {
"existing_lending_analysis_key": "06666318-c9e9-416b-ae2f-460355a3d8e8"
},
"code": "LAS000002"
}

Webhooks

Attention!

QI Tech webhooks should not be strictly mapped. Additional fields may be included in the returned webhook payloads.

Webhook type: laas.lending_analysis.lending_analysis_status_change

The webhook is sent to the URL configured in the client's environment when the analysis is completed.

Completed analysis webhook

Response Body
{
"key": "06666318-c9e9-416b-ae2f-460355a3d8e8",
"status": "completed",
"webhook_type": "laas.lending_analysis.lending_analysis_status_change",
"event_datetime": "2026-03-12T10:05:00Z",
"data": {
"request_identifier_key": "12345678901",
"analysis_status": "reproved",
"analysis_steps": [
{
"analysis_step_type": "onboarding",
"analysis_step_status": "approved",
"reason": "Passou nas validações",
"output_data": {}
},
{
"analysis_step_type": "credit_analysis",
"analysis_step_status": "reproved",
"reason": "Score do Serasa menor que 500",
"output_data": {
"analysis_score": 100,
"credit_model_score": 100,
"maximum_monthly_interest_rate": 0.00,
"minimum_monthly_interest_rate": 0.00,
"maximum_installments_number": 10,
"minimum_installments_number": 1,
"maximum_disbursed_issue_amount": 4500.00,
"minimum_disbursed_issue_amount": 0.00
}
}
],
"inquiries": [
{
"inquiry_type": "private_payroll",
"inquiry_data": {
"document_number": "99999999999",
"registration_number": "99999999999-A",
"employer_document_number": "99999999999962",
"name": "JOÃO SILVA",
"gender": "male",
"birth_date": "1985-07-20",
"worker_category_code": 101,
"eligible": true,
"available_margin_amount": 5000.00,
"base_margin_amount": 4500.00,
"total_due_amount": 8207.54,
"admission_date": "2020-03-15",
"termination_date": null,
"termination_reason_code": null,
"political_exposition": "not_exposed",
"employer_name": "EMPRESA XYZ LTDA",
"mother_name": "MARIA DA SILVA",
"nationality": {
"code": 76,
"description": "BRASIL"
},
"occupation": {
"code": 724325,
"description": "SOLDADOR ELETRICO"
},
"economic_activity": {
"code": 2833000,
"description": "FABRICACAO DE MAQUINAS E EQUIPAMENTOS PARA A AGRICULTURA E PECUARIA"
},
"ineligibility_reason": "not_informed",
"employer_activity_start_date": "2010-05-12",
"legacy_loans": [],
"alerts": [
{
"alert_type": "leave",
"reference_date": "2025-02-11",
"event_id": 123456,
"leave_reason_code": 3,
"leave_start_date": "2025-02-11",
"leave_end_date": "2025-03-11"
},
{
"alert_type": "termination",
"reference_date": "2025-02-11",
"event_id": 789012,
"termination_reason_code": 1,
"termination_date": "2025-02-11",
"notice_period_start_date": "2025-01-11",
"notice_period_end_date": "2025-02-11"
}
]
}
}
]
}
}

Webhook field descriptions

FieldTypeDescription
keystringlending_analysis_key returned in the synchronous response.
statusstringWebhook status.
webhook_typestringWebhook type.
event_datetimestringEvent date and time (ISO 8601).
data.request_identifier_keystringIdempotent key provided in the original request.
data.analysis_statusstringFinal analysis status. Analysis Status
data.analysis_stepsarrayList of analysis steps performed. Analysis Steps Object
data.inquiriesarrayData returned from performed inquiries. See Inquiry data (inquiry_data) section.

Analysis Steps Object

FieldTypeDescription
analysis_step_typestringStep type. Individual Analysis Types
analysis_step_statusstringIndividual step status (approved or reproved).
reasonstringApproval or rejection reason, defined by client rules.
output_dataobjectStep-specific output data.

output_data for credit_analysis

Important

All output_data fields are configurable in the analysis rules. If a rule is not configured to return a specific field, it will be returned empty or not be present in the payload.

FieldTypeDescription
analysis_scorenumberCredit analysis score.
credit_model_scorenumberCredit model score.
maximum_monthly_interest_ratenumberMaximum monthly interest rate.
minimum_monthly_interest_ratenumberMinimum monthly interest rate.
maximum_installments_numbernumberMaximum number of installments.
minimum_installments_numbernumberMinimum number of installments.
maximum_disbursed_issue_amountnumberMaximum disbursement amount.
minimum_disbursed_issue_amountnumberMinimum disbursement amount.

Inquiry data (inquiry_data)

The inquiries array in the webhook contains data returned from the inquiries performed during the analysis. Each item has the fields inquiry_type (inquiry type) and inquiry_data (returned data).

For the private_payroll type, the inquiry_data object follows the same response format as the Worker data inquiry from the private payroll module, including personal data, consignable margin, employment bond history, active loans, and alerts.

The full documentation of inquiry_data fields, enumerators, and response examples is available at:

Worker Inquiries — 2. Worker data inquiry


Enumerators

Lending Analysis Type Enumerators

FieldDescription
private_payrollPrivate payroll credit analysis

Analysis Status

analysis_status (synchronous response and webhook data.analysis_status)

StatusDescription
pending_analysisThe analysis is being processed
approvedThe analysis was approved
reprovedThe analysis was rejected

Webhook Status

status (webhook root field)

StatusDescription
completedProcessing completed
failedProcessing failed

Individual Analysis Types

analysis_step_type (inside the analysis_steps array)

EnumeratorDescription
onboardingOnboarding/registration analysis
credit_analysisCredit analysis

Individual Analysis Status

analysis_step_status (inside the analysis_steps array)

StatusDescription
approvedIndividual analysis approved
reprovedIndividual analysis rejected

Sandbox — Test Cases

Important Notice!

Do not use real personal data (CPF, CNPJ, etc.) in sandbox environments.

In the sandbox environment, the analysis result is determined by the value of the analysis_data.name field in the request body. Use the names below to simulate different scenarios:

Name (analysis_data.name)Onboarding resultCredit analysis resultFinal status (analysis_status)
Ana Santosapprovedapprovedapproved
Carlos Oliveiraapprovedreprovedreproved
Mariana Costareprovedreproved
Pedro Almeidaapprovedapproved
Fernanda Limareprovedreproved
How it works
  • Onboarding approved + Credit analysis approved (Ana Santos): the complete analysis is approved. The webhook returns analysis_status: "approved" with both steps approved.
  • Onboarding approved + Credit analysis reproved (Carlos Oliveira): onboarding is approved but credit analysis is rejected. The webhook returns analysis_status: "reproved".
  • Onboarding reproved (Mariana Costa, Fernanda Lima): onboarding is rejected and credit analysis is not executed. The webhook returns analysis_status: "reproved" with only the onboarding step.
  • Only onboarding approved (Pedro Almeida): only onboarding is executed and approved, without credit analysis. The webhook returns analysis_status: "approved" with only the onboarding step.
Webhook — Sandbox with name "Ana Santos"
{
"key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "completed",
"webhook_type": "laas.lending_analysis.lending_analysis_status_change",
"event_datetime": "2026-03-12T10:05:00Z",
"data": {
"request_identifier_key": "sandbox-test-001",
"analysis_status": "approved",
"analysis_steps": [
{
"analysis_step_type": "onboarding",
"analysis_step_status": "approved",
"reason": "Passou nas validações",
"output_data": {}
},
{
"analysis_step_type": "credit_analysis",
"analysis_step_status": "approved",
"reason": "Score acima do mínimo",
"output_data": {
"analysis_score": 750,
"credit_model_score": 720,
"maximum_monthly_interest_rate": 0.0449,
"minimum_monthly_interest_rate": 0.0199,
"maximum_installments_number": 24,
"minimum_installments_number": 3,
"maximum_disbursed_issue_amount": 15000.00,
"minimum_disbursed_issue_amount": 500.00
}
}
],
"inquiries": [
{
"inquiry_type": "private_payroll",
"inquiry_data": {
"document_number": "99999999999",
"registration_number": "99999999999-A",
"employer_document_number": "99999999999962",
"name": "ANA SANTOS",
"gender": "female",
"birth_date": "1990-05-15",
"worker_category_code": 101,
"eligible": true,
"available_margin_amount": 8000.00,
"base_margin_amount": 6500.00,
"total_due_amount": 3200.00,
"admission_date": "2018-09-01",
"termination_date": null,
"termination_reason_code": null,
"political_exposition": "not_exposed",
"employer_name": "EMPRESA XYZ LTDA",
"mother_name": "LUCIA SANTOS",
"nationality": {
"code": 76,
"description": "BRASIL"
},
"occupation": {
"code": 411010,
"description": "AUXILIAR DE ESCRITORIO"
},
"economic_activity": {
"code": 6499999,
"description": "OUTRAS ATIVIDADES DE SERVICOS FINANCEIROS"
},
"ineligibility_reason": "not_informed",
"employer_activity_start_date": "2005-01-10",
"legacy_loans": [],
"alerts": []
}
}
]
}
}
Webhook — Sandbox with name "Carlos Oliveira" (credit_analysis reproved)
{
"key": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "completed",
"webhook_type": "laas.lending_analysis.lending_analysis_status_change",
"event_datetime": "2026-03-12T10:05:00Z",
"data": {
"request_identifier_key": "sandbox-test-002",
"analysis_status": "reproved",
"analysis_steps": [
{
"analysis_step_type": "onboarding",
"analysis_step_status": "approved",
"reason": "Passou nas validações",
"output_data": {}
},
{
"analysis_step_type": "credit_analysis",
"analysis_step_status": "reproved",
"reason": "Score do Serasa menor que 500",
"output_data": {
"analysis_score": 100,
"credit_model_score": 100,
"maximum_monthly_interest_rate": 0.00,
"minimum_monthly_interest_rate": 0.00,
"maximum_installments_number": 10,
"minimum_installments_number": 1,
"maximum_disbursed_issue_amount": 4500.00,
"minimum_disbursed_issue_amount": 0.00
}
}
],
"inquiries": [
{
"inquiry_type": "private_payroll",
"inquiry_data": {
"document_number": "99999999999",
"registration_number": "99999999999-A",
"employer_document_number": "99999999999962",
"name": "CARLOS OLIVEIRA",
"gender": "male",
"birth_date": "1988-11-22",
"worker_category_code": 101,
"eligible": true,
"available_margin_amount": 3500.00,
"base_margin_amount": 3000.00,
"total_due_amount": 12500.00,
"admission_date": "2019-06-10",
"termination_date": null,
"termination_reason_code": null,
"political_exposition": "not_exposed",
"employer_name": "EMPRESA XYZ LTDA",
"mother_name": "ROSA OLIVEIRA",
"nationality": {
"code": 76,
"description": "BRASIL"
},
"occupation": {
"code": 724325,
"description": "SOLDADOR ELETRICO"
},
"economic_activity": {
"code": 2833000,
"description": "FABRICACAO DE MAQUINAS E EQUIPAMENTOS PARA A AGRICULTURA E PECUARIA"
},
"ineligibility_reason": "not_informed",
"employer_activity_start_date": "2010-05-12",
"legacy_loans": [],
"alerts": []
}
}
]
}
}
Webhook — Sandbox with name "Mariana Costa" (onboarding reproved)
{
"key": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"status": "completed",
"webhook_type": "laas.lending_analysis.lending_analysis_status_change",
"event_datetime": "2026-03-12T10:05:00Z",
"data": {
"request_identifier_key": "sandbox-test-003",
"analysis_status": "reproved",
"analysis_steps": [
{
"analysis_step_type": "onboarding",
"analysis_step_status": "reproved",
"reason": "Documentação inválida",
"output_data": {}
}
],
"inquiries": [
{
"inquiry_type": "private_payroll",
"inquiry_data": {
"document_number": "99999999999",
"registration_number": "99999999999-A",
"employer_document_number": "99999999999962",
"name": "MARIANA COSTA",
"gender": "female",
"birth_date": "1992-03-08",
"worker_category_code": 101,
"eligible": true,
"available_margin_amount": 6000.00,
"base_margin_amount": 5000.00,
"total_due_amount": 2100.00,
"admission_date": "2021-01-15",
"termination_date": null,
"termination_reason_code": null,
"political_exposition": "not_exposed",
"employer_name": "EMPRESA XYZ LTDA",
"mother_name": "PAULA COSTA",
"nationality": {
"code": 76,
"description": "BRASIL"
},
"occupation": {
"code": 252305,
"description": "ANALISTA DE SISTEMAS"
},
"economic_activity": {
"code": 6201500,
"description": "DESENVOLVIMENTO DE PROGRAMAS DE COMPUTADOR SOB ENCOMENDA"
},
"ineligibility_reason": "not_informed",
"employer_activity_start_date": "2015-08-20",
"legacy_loans": [],
"alerts": []
}
}
]
}
}

References