跳到主要内容

模拟再融资

针对不存在的再融资操作的 Request

ENDPOINT
/debt_simulation
MÉTODO
POST
Request Body
{
"complex_operation": true,
"operation_batch": [
{
"borrower": {
"person_type": "natural"
},
"refinanced_credit_operations": [
{
"original_deadline": 5,
"monthly_interest_rate": "0.0133",
"disbursement_date": "2024-06-30",
"due_balance": 1050,
}
],
"financial": {
"amount": 1900.83,
"interest_type": "pre_price_days",
"credit_operation_type": "ccb",
"annual_interest_rate": 2.32,
"disbursement_date": "2023-04-01",
"interest_grace_period": 0,
"principal_grace_period": 0,
"number_of_installments": 2,
"fine_configuration": {
"contract_fine_rate": 0.02,
"interest_base": "calendar_days",
"monthly_rate": 0.01
}
}
}
]
}
注意!

"refinanced_credit_operations" 中的 "disbursement_date""monthly_interest_rate" 字段,仅在需要为多种放款选项计算再融资操作结清金额时为必填项。

针对已存在的再融资操作的 Request

ENDPOINT
/debt_simulation
MÉTODO
POST
Request Body
{
"complex_operation": true,
"operation_batch": [
{
"borrower": {
"person_type": "natural"
},
"refinanced_credit_operations": [
{
"operation_key": "a9630d51-f08f-4763-b269-c1947e97c260"
}
],
"financial": {
"amount": 1900.83,
"interest_type": "pre_price_days",
"credit_operation_type": "ccb",
"annual_interest_rate": 2.32,
"disbursement_date": "2023-04-01",
"interest_grace_period": 0,
"principal_grace_period": 0,
"number_of_installments": 2,
"fine_configuration": {
"contract_fine_rate": 0.02,
"interest_base": "calendar_days",
"monthly_rate": 0.01
}
}
}
]
}

注意!

再融资模拟使用的载荷与简单债务模拟相同,但需在 "refinanced_credit_operations" 中附加将被结清的操作列表及其结清计算数据。

Response

STATUS
200
Response Body
[
{
"data": {
"annual_cet": 0.6252134981759837,
"assignment_amount": 1919.84,
"cet": 0.0413,
"contract_fee_amount": -179.13,
"contract_fees": [
{
"amount": 1.0,
"amount_type": "percentage",
"fee_amount": -179.13,
"fee_type": "tac"
}
],
"credit_operation_type": "ccb",
"disbursed_issue_amount": 2079.96,
"disbursement_date": "2023-04-01",
"disbursement_options": [
{
"annual_cet": 0.6252134981759837,
"assignment_amount": 1919.84,
"cet": 0.0413,
"contract_fee_amount": -179.13,
"contract_fees": [
{
"amount": 1.0,
"amount_type": "percentage",
"fee_amount": -179.13,
"fee_type": "tac"
}
],
"disbursed_issue_amount": 2079.96,
"disbursement_date": "2023-04-01",
"external_contract_fee_amount": 19.01,
"external_contract_fees": [
{
"amount": 1.0,
"amount_released": 17.25,
"amount_type": "percentage",
"cofins_amount": 0,
"csll_amount": 0,
"description": null,
"fee_amount": 19.01,
"fee_type": "spread",
"irrf_amount": 0,
"net_fee_amount": 17.25,
"pis_amount": 0,
"tax_amount": 1.76
}
],
"first_due_date": "2023-05-01",
"installments": [
{
"business_due_date": "2023-05-02",
"calendar_days": 30,
"due_date": "2023-05-01",
"due_principal": 1900.83,
"has_interest": true,
"installment_number": 1,
"post_fixed_amount": 0,
"pre_fixed_amount": 199.90606482231624,
"principal_amortization_amount": 904.6839351776838,
"tax_amount": 0.0,
"total_amount": 1104.59,
"workdays": 18.0
},
{
"business_due_date": "2023-06-01",
"calendar_days": 31,
"due_date": "2023-06-01",
"due_principal": 996.1460648223162,
"has_interest": true,
"installment_number": 2,
"post_fixed_amount": 0,
"pre_fixed_amount": 108.43818022618876,
"principal_amortization_amount": 996.1418197738112,
"tax_amount": 0.0,
"total_amount": 1104.58,
"workdays": 23.0
}
],
"iof_amount": 0.0,
"issue_amount": 1900.83,
"net_external_contract_fee_amount": 17.25,
"prefixed_interest_rate": {
"annual_rate": 2.32,
"daily_rate": 0.0033388,
"interest_base": "calendar_days",
"monthly_rate": 0.10516767
},
"total_pre_fixed_amount": 308.344245048505
}
],
"final_disbursement_amount": -17733.89,
"installments": [],
"refinanced_credit_operations": [
{
"due_balance": 19813.85,
"due_balance_reference_date": "2023-03-29",
"original_deadline": 1084,
"refinanced_credit_operation_key": "a9630d51-f08f-4763-b269-c1947e97c260",
"refinanced_credit_operation_status": null
}
],
"total_pre_fixed_amount": 308.344245048505
},
"event_datetime": "2023-03-29 19:19:28",
"key": "0fc07785-7f74-45b0-a8ca-8ca48f8c17ed",
"status": "finished",
"type": "debt"
}
]
STATUS
400
Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}

定义

Request Body

字段类型描述
complex_operationbooleantrue - 表示可在同一请求中执行多个模拟
operation_batchobject模拟请求列表 - Operation Batch 列表对象

Operation Batch 列表对象

字段类型描述
borrowerobjectBorrower 对象 - 信贷操作的债务人
financialobjectFinancial 对象 - 操作财务数据

Borrower 对象

字段类型描述
person_typeobjectPerson Type 枚举值 - 债务人的法律性质

Financial 对象

字段类型描述
amoutfloat信贷操作的发行/名义价值
interest_typeobjectInterest Type 枚举值 - 摊销方法和利息计算方式
credit_operation_typeobjectCredit Operation Type 枚举值 - 信贷合同类型
annual_interest_ratefloat以十进制表示的年预固定利率
disbursement_datedate操作放款日期
interest_grace_periodint利息宽限期(以月为单位)
principal_grace_periodint本金宽限期
number_of_installmentsint信贷操作分期数
fine_configurationobjectfine_configuration 对象 - 逾期利息和罚款配置
refinanced_credit_operationsarray of objects包含将被再融资操作信息的对象列表

Refinanced Credit Operations 对象

当再融资操作不存在时的对象

字段类型描述
due_balancenumber结清再融资操作所需的金额。
original_deadlineint再融资信贷操作的总期限(天数)。
monthly_interest_ratefloat再融资操作的月利率。
disbursement_datedate再融资操作的放款日期。

当再融资操作已存在时的对象

字段类型描述
operation_keystring uuid将被再融资的操作密钥。

Fine Configuration 对象

字段类型描述
contract_fine_ratefloat以十进制表示的逾期罚款百分比
interest_baseenumInterest Base 枚举值 - 利息计算基准
monthly_ratefloat以十进制表示的月逾期利率