Refinancing Simulation
Requesting a simulation for a non existing operation
ENDPOINT
/debt_simulationMETHOD
POSTRequest 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
}
}
}
]
}
Atenção!
The "disbursement_date" and "monthly_interest_rate" within "refinanced_credit_operations" are required only when attempting to calculate operation settlement values for multiple disbursement option operations.
Requesting a simulation for an existing operation
ENDPOINT
/debt_simulationMETHOD
POSTRequest 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
}
}
}
]
}
Atenção!
The utilized payloads are the same utilized in the simple debt simulation, in addition to the operation list that will be settled in the "refinanced_credit_operations" with their settlement debt values.
Response
STATUS
200Response 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
}
],
"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
}
],
"final_disbursement_amount": -17733.89,
"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
}
],
"interest_grace_period": 0,
"interest_payment_month_period": 1,
"interest_type": "pre_price_days",
"iof_amount": 0.0,
"issue_amount": 1900.83,
"issue_date": "2023-04-01",
"net_external_contract_fee_amount": 17.25,
"number_of_installments": 2,
"operation_type": "refinancing",
"post_fixed_interest_base": "workdays",
"post_fixed_interest_rate": null,
"prefixed_interest_rate": {
"annual_rate": 2.32,
"daily_rate": 0.0033388,
"interest_base": "calendar_days",
"monthly_rate": 0.10516767
},
"principal_amortization_month_period": 1,
"principal_grace_period": 0,
"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
}
],
"requester_key": "ef48fbe4-267b-45c1-9049-75345c075486",
"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
400Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}
Definitions
Request Body
Field | Type | Description |
---|---|---|
complex_operation | boolean | true - indicates multiple operations may be realized for the same request |
operation_batch | object | Lists operation batches - Lista Operation Batch Objects |
Lista Operation Batch Objects
Field | Type | Description |
---|---|---|
borrower | object | Object Borrower - Credit Operation borrowers objects |
financial | object | Object Financial - Credit operation financial objects |
Object Borrower
Field | Type | Description |
---|---|---|
person_type | object | Enumerador Person Type - Creditors' natural person type |
Object Financial
Field | Type | Description |
---|---|---|
amout | float | Credit operation issue amount |
interest_type | object | Enumerador Interest Type -Amortization method and interest calculation type |
credit_operation_type | object | Enumerador Credit Operation Type - Contract type |
annual_interest_rate | float | Pre-fixed anual interest rate |
disbursement_date | date | Operation disbursement date |
interest_grace_period | int | Interest grace period (in months) |
principal_grace_period | int | Principal grace period (in months) |
number_of_installments | int | Number of credit operation installments |
fine_configuration | object | Object fine_configuration - Fine configuration type |
refinanced_credit_operations | array of objects | Lists all refinanced credit operations |
Object Refinanced Credit Operations
Existing refinanced operation fields
Field | Type | Description |
---|---|---|
due_balance | number | Refinanced operation due balance |
original_deadline | int | Refinanced operation original payment deadline |
monthly_interest_rate | float | Refinanced operation monthly interest rate |
disbursement_date | date | Refinanced operation due date |
Existing refinanced operation fields
Field | Type | Description |
---|---|---|
operation_key | string uuid | Refinanced operation uuid |
Object Fine Configuration
Field | Type | Description |
---|---|---|
contract_fine_rate | float | Fine percentage (decimals) |
interest_base | enum | Enumerador Interest Base - Interest base calculation |
monthly_rate | float | Monthly interest rate (decimals) |