私人薪资抵押贷款手册 - 工人查询
在私人薪资抵押贷款主动发行流程开始时,需要对工人进行两项主要查询:
-
雇佣关系查询:仅提供工人 CPF 即可执行。此操作返回工人的有效雇佣关系列表,以及每个关系的信贷操作资格。
-
工人数据查询:基于特定雇佣关系,提供在雇佣关系查询中获取的雇主文件号和工号。此操作返回所选雇佣关系的详细附加信息,包括个人数据、薪资抵押额度、雇佣关系历史及任何提醒。
执行任何一项查询,都必须发送授权条款。 该条款必须基于借款人提供明确同意(opt-in)授权执行查询的证据而创建。 证据(如时间戳、IP 地址和会话标识符)必须包含在请求中,以确保流程的可追溯性和监管合规性。
这些查询连同授权条款是验证工人资格和在信贷操作正式化之前获取必要数据的基本步骤。
QI Tech 的 webhook 不应进行严格映射。 返回的 webhook payload 中可能包含额外字段。
您可以按照文档中的详细说明查询和重新发送 webhook:重新发送 Webhook。
1 - 工人雇佣 关系查询:
雇佣关系查询是一项异步操作。发送请求后,QI Tech 将在后台处理查询,并在完成后通过 webhook 返回结果。
Webhook 将发送到您环境中配置的 URL。
Request
情况 1: 工人是授权条款的签署方。
Request Body
{
"document_number": "12345678909",
"authorization_term": {
"signature": {
"signer": {
"name": "Nome do tomador",
"email": "email_do_tomador@email.com",
"phone": {
"number": "999999999",
"area_code": "11",
"country_code": "55"
},
"document_number": "12345678909"
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2025-03-24T12:19:08Z",
"ip_address": "255.255.255.255",
"fingerprint": {},
"session_id": "0b73fdb9-1b3b-4f09-9cf2-b775a1ce58d2"
}
}
}
}
情况 2: 法定代理人是授权条款的签署方。
Request Body
{
"document_number": "12345678909",
"authorization_term": {
"legal_representative_document_number": "32165498709",
"signature": {
"signer": {
"name": "Nome do tomador",
"email": "email_do_tomador@email.com",
"phone": {
"number": "999999999",
"area_code": "11",
"country_code": "55"
},
"document_number": "12345678909"
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2025-03-24T12:19:08Z",
"ip_address": "255.255.255.255",
"fingerprint": {},
"session_id": "0b73fdb9-1b3b-4f09-9cf2-b775a1ce58d2"
}
}
}
}
有法定代理人的情况下,必须在 "legal_representative_document_number" 字段填写法定代理人的 CPF,"signer" 对象中的数据也应填写法定代理人的信息。
Response
Response Body
{
"employment_relationships_inquiry_key": "<UUID>",
"employment_relationships_inquiry_status": "pending_inquiry"
}
employment_relationships_inquiry_status 枚举的可能值列在雇佣关系查询状态部分。
Webhooks
雇佣关系查询返回结果:
Webhook Body
{
"key": "<Employment Relationships Inquiry Key>",
"status": "completed",
"webhook_type": "laas.private_payroll.employment_relationships_inquiry_status_change",
"event_datetime": "2025-03-24T15:28:31Z",
"data": {
"authorization_term": {
"status": "authorized",
"authorization_term_key": "<UUID>",
"signed_at": "2025-03-24T12:19:08Z",
"expiration_date": "2025-04-24"
},
"employment_relationships": [
{
"eligible": true,
"document_number": "47812365409",
"registration_number": "99999999999-A",
"employer_document_type": "cpf",
"employer_document_number": "34848037034"
},
{
"eligible": false,
"document_number": "47812365409",
"registration_number": "11111111111-B",
"employer_document_type": "cnpj",
"employer_document_number": "33296860000173"
}
]
}
}
Webhook Body
{
"key": "<Employment Relationships Inquiry Key>",
"status": "failed",
"webhook_type": "laas.private_payroll.employment_relationships_inquiry_status_change",
"event_datetime": "2025-03-24T15:28:31Z",
"data": {
"enumerator": "ineligible_worker_cpf",
"description": "CPF not found in database or worker CPF ineligible",
"translation": "CPF não encontrado na base ou CPF do trabalhador inelegível"
}
}
要在沙盒环境中模拟失败,请使用以数字 2 开头的 CPF 进行查询。
2 - 工人数据查询:
工人数据查询是一项异步操作。发送请求后,QI Tech 将在后台处理查询,并在完成后通过 webhook 返回结果。
Webhook 将发送到您环境中配置的 URL。
执行查询有两种可能的情况:
两种情况都需要提供在雇佣关系查询中获取的工人工号。
Request
情况 1: 使用先前发送的授权条款进行工人数据查询。
Request Body
{
"document_number": "<CPF FUNCIONÁRIO>",
"registration_number": "<NÚMERO DE MATRÍCULA>",
"employer_document_number": "<CNPJ EMPREGADOR>"
}
情况 2 : 发送授权条款进行工人数据查询。
Request Body
{
"document_number": "<CPF FUNCIONÁRIO>",
"registration_number": "<NÚMERO DE MATRÍCULA>",
"employer_document_number": "<CNPJ EMPREGADOR>",
"authorization_term": {
"legal_representative_document_number": "<CPF DO REPRESENTANTE LEGAL>", // Caso aplicável
"signature": {
"signer": {
"name": "<NOME DO ASSINANTE>",
"email": "<EMAIL DO ASSINANTE>",
"phone": {
"number": "<NUMERO DO ASSINANTE>",
"area_code": "<DDD DO ASSINANTE>",
"country_code": "55"
},
"document_number": "<CPF DO ASSINANTE>"
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "<DATA E HORA DA ASSINATURA>",
"ip_address": "<IP DO ASSINANTE>",
"fingerprint": {},
"session_id": "<ID DA SESSÃO DO ASSINANTE>"
}
}
}
}
有法定代理人的情况下,必须在 "legal_representative_document_number" 字段填写法定代理人的 CPF,"signer" 对象中的数据也应填写法定代理人的信息。
Response
Response Body
{
"balance_inquiry_key": "<Balance Inquiry Key>",
"balance_inquiry_status": "pending_inquiry"
}
balance_inquiry_status 枚举的可能值列在工人数据查询状态部分。
Webhooks
工人数据查询返回结果:
Webhook Body
{
"key": "<Balance Inquiry Key>",
"status": "completed",
"webhook_type": "laas.private_payroll.balance_inquiry_status_change",
"event_datetime": "2024-02-21T14:30:25Z",
"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",
"suspended_loans_count": 2,
"block_type": "no_block",
"blocked_at": null,
"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, PECAS E ACESSORIOS, EXCETO PARA IRRIGACAO"
},
"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 Body
{
"key": "<Balance Inquiry Key>",
"status": "failed",
"webhook_type": "laas.private_payroll.balance_inquiry_status_change",
"event_datetime": "2024-02-21T14:30:25Z",
"data": {
"authorization_term": {
"status": "authorized",
"signed_at": "2025-08-10T17:42:05Z",
"expiration_date": "2025-09-09",
"authorization_term_key": "4444cc5b-9c60-473f-8fe4-6c43b855be6d"
}
}
}
雇佣关系被锁定时的返回结果:
Webhook Body
{
"document_number": "99999999999",
"registration_number": "abc",
"employer_document_number": "12345678",
"block_type": "blocked_by_the_worker",
"blocked_at": "2025-12-11T10:00:00Z",
"data": {
"authorization_term": {
"status": "authorized",
"signed_at": "2025-08-10T17:42:05Z",
"expiration_date": "2025-09-09",
"authorization_term_key": "4444cc5b-9c60-473f-8fe4-6c43b855be6d"
}
}
}
要在沙盒环境中模拟失败,请使用以数字 2 开头的 CPF 进行查询。
附件
authorization_term 对象详情
| 字段 | 必填性 | 描述 |
|---|---|---|
| Name | 必填 | 借款人姓名 |
| 可选 | 借款人邮箱 | |
| Phone | 可选 | 借款人电话 |
| Document_number | 必填 | 借款人 CPF |
| Authentication_type | 必填 | 必须为 "opt-in" |
| Timestamp |