Pular para o conteúdo principal

Simulação de uma renegociação

Request

ENDPOINT
/renegotiation/simulation
MÉTODO
POST
Request Body
{
"contract_number": "0001232093/ABC",
"amortization_type": "installment_payment",
"reference_date": "2022-07-20",
"installments": [
{
"installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88"
},
{
"installment_key": "0ff87136-b084-44fb-8fc2-d2e3beed483b"
},
{
"installment_key": "e4101c6a-51b3-435f-a2b7-4a65a005cc15"
}
],
"discount_percentage": 0.2,
"discount_amount": 100
}

Body Params

CampoTipoDescriçãoCaracteres
contract_numberstringNúmero do contrato.10
amortization_typeenumTipo de amortização.Enumeradores Amortization Type
reference_datedateData de referência da renegociação (precisa ser D+1).10
installmentsarray of objectsParcelas renegociadas.Installments array of objects
discount_percentagefloatPercentual de desconto que será calculado sobre o valor presente da renegociação ((1 - percentual de desconto) * Valor Presente).10
discount_amountfloatValor de desconto que será aplicado sobre o valor presente da renegociação (Valor Presente - Valor Bruto Descontado).10
Atenção

Os campos discount_amount e discount_percentage NÃO podem ser enviados juntos no mesmo payload.

Installments array of objects

CampoTipoDescriçãoCaracteres
installment_keystringkey da parcela a ser renegociadachave uuid

Enumeradores Amortization Type

CampoDescrição
installment_paymentPagamento de Parcelas selecionadas.
overdue_installment_paymentPagamento de Parcelas atrasadas.
first_installmentsPagamento das primeiras Parcelas do Contrato.

Response

STATUS
201
Response Body
{
"contract_number": "0001232093/ABC",
"discount_percentage": 0.2,
"payment_amount": 240,
"origin_key": "76912b4b-508a-4b10-9485-0e87f1316b35",
"reference_date": "2022-07-20",
"proposal_due_date": "2022-07-20",
"requester_name": "Requester Name",
"amortization_type": "installment_payment",
"requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
"issuer_name": "issuer",
"issuer_document_number": "98765432100",
"affected_installments": [
{
"installment_key": "ca5741c7-99a2-42e7-92a1-9328a36e4e88",
"due_date": "2023-01-01",
"principal_amount": 100,
"interest_amount": 20,
"fine_amount": 5,
"total_amount": 125,
"present_amount": 100,
"paid_amount": 80
},
{
"installment_key": "0ff87136-b084-44fb-8fc2-d2e3beed483b",
"due_date": "2022-12-01",
"principal_amount": 100,
"interest_amount": 20,
"fine_amount": 5,
"total_amount": 125,
"present_amount": 100,
"paid_amount": 80
},
{
"installment_key": "e4101c6a-51b3-435f-a2b7-4a65a005cc15",
"due_date": "2022-11-01",
"principal_amount": 100,
"interest_amount": 20,
"fine_amount": 5,
"total_amount": 125,
"present_amount": 100,
"paid_amount": 80
}
],
"remaining_installments": [
{
"installment_key": "03b4d86a-9dba-40fc-a4db-33e8772b7be8",
"due_date": "2022-08-01",
"principal_amount": 100,
"interest_amount": 20,
"fine_amount": 5,
"total_amount": 125
},
{
"installment_key": "c622efa6-8731-464b-a563-a7a26c19279d",
"due_date": "2022-09-01",
"principal_amount": 100,
"interest_amount": 20,
"fine_amount": 5,
"total_amount": 125
},
{
"installment_key": "3da60b56-17fb-4b32-a1e4-1f0c28d18905",
"due_date": "2022-10-01",
"principal_amount": 100,
"interest_amount": 20,
"fine_amount": 5,
"total_amount": 125
}
]
}
STATUS
400
Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}