INSS 贷款转移 + 再融资手册
另请参阅
注意!
QI Tech 的 webhooks 不应以严格方式进行映射。 我们 API 返回的 webhook payload 中可能会包含额外字段。
重新发送 Webhooks
您可以按照以下文档中的详细说明查询并重新发送 webhooks:重新发送 Webhooks。
要启动 INSS 贷款转移 + 再融资流程,首先需要收集福利数据以检查资格,以及福利支付账户数据。第 1 和第 2 条描述了查询特定受益人福利列表的程序以及查询福利数据的程序。
1 - 通过合作方正式授权书查询福利列表:
1.1. 福利持有人是授权书的签署人。
请求
- ENDPOINT/social_security/benefits_request
- MÉTODOPOST
Payload:
payload.json
{
"document_number": "16514548091",
"authorization_term": {
"document_number": "16514548091",
"signature": {
"signer": {
"name": "Nome Devedor",
"phone": {
"number": "887577622",
"area_code": "19",
"country_code": "55"
},
"document_number": "16514548091"
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2023-12-05T21:04:06",
"ip_address": "200.223.171.82",
"fingerprint": {
"lat": "-44.00524157713981",
"long": "-19.807649431219804",
"name": "Nome Cliente",
"model": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
"localeHashValue": "hash cliente"
},
"third_party_additional_data": {},
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"signed_object": {
"document_key": "cfbc8469-89ea-4a80-9f64-ba7b1566c68b"
}
}
}
}
1.2. 福利持有人不是授权书的签署人(有法定代理人)。
注意
由于本例中授权书的签署人是法定代理人,填写 signer 对象的数据为法定代理人的数据。
请求
- ENDPOINT/social_security/benefits_request
- MÉTODOPOST
Payload:
payload.json
{
"document_number": "16514548091",
"authorization_term": {
"document_number": "16514548091",
"legal_representative_document_number": "70957091060",
"signature": {
"signer": {
"name": "Nome Representante legal",
"phone": {
"number": "887577622",
"area_code": "19",
"country_code": "55"
},
"document_number": "70957091060"
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2023-12-05T21:04:06",
"ip_address": "200.223.171.82",
"fingerprint": {
"lat": "-44.00524157713981",
"long": "-19.807649431219804",
"name": "Nome Cliente",
"model": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
"localeHashValue": "hash cliente"
},
"third_party_additional_data": {},
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"signed_object": {
"document_key": "cfbc8469-89ea-4a80-9f64-ba7b1566c68b"
}
}
}
}
注意
在有法定代理人的情况下,需要在 "legal_representative_document_number" 字段中填写法定代理人的 CPF,且 "signer" 对象中的数据应填写法定代理人的数据。
"document_key":使用 /upload 端点返回的 GUID
信息
除了在 "authorization_term.signed_object.document_key" 对象中提供签名 PDF 文档的键之外,也可以通过 "authorization_term.signed_object.raw_text" 对象发送授权书的纯文本内容。
响应
- MÉTODOPOST
- ENDPOINTsocial_security/benefits_request
body.json
{
"benefits_request_key": "c9d2aa83-006b-4753-92ad-64411a7aa700",
"document_number": "18028522041",
"status": "pending_authorization",
"authorization_term": {
"authorization_term_key": "5a7b6489-8a47-4b61-a85a-6986b058fda6",
"status": "signed"
},
"status_events": [
{
"status": "pending_authorization",
"event_date": "2023-12-22T16:12:50"
}
]
}
福利列表查询成功时:
Webhook
- WEBHOOK_TYPEsocial_security_benefits_request
- STATUSSuccess
Body:
body.json
{
"webhook": {
"key": "54cddd0f-b976-4266-91ea-90279bfb49a1",
"data": [
{
"grant_date": [
"2010-10-18"
],
"benefit_number": 2052711150,
"benefit_status": "elegible"
}
],
"status": "success",
"webhook_type": "social_security_benefits_request",
"event_datetime": "2023-12-22T13:20:44"
}
}
| 字段 | 描述 | 值 |
|---|---|---|
| benefit_number | 福利编号 | - |
| benefit_status | 福利状态 | 枚举值 |
福利列表查询失败时:
Webhook
- WEBHOOK_TYPEsocial_security_benefits_request
- STATUSFailure
Body:
body.json
{
"webhook": {
"key": "0020653e-c3b0-4606-af31-2ea4a577a5ce",
"data": {
"enumerator": "inexistent_beneficiary",
"description": "no beneficiary found"
},
"status": "failure",
"webhook_type": "social_security_benefits_request",
"event_datetime": "2023-12-22T15:46:31"
}
}
失败 Webhook 中的字段详情
| 字段 | 描述 | 值 |
|---|---|---|
| enumerator | Dataprev 代码的映射返回值 | 枚举值 |