Pular para o conteúdo principal

Criar uma renegociação

Request

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

Body Params

CampoTipoDescriçãoCaracteres
contract_numberstringNumero do contrato.10
amortization_typestringTipo de amortização.Enumeradores Amortization Type
reference_datestringData de referência da renegociação (precisa ser D+1).10
proposal_due_datestringData de vencimento da proposta.10
payment_typestringTipo de pagamento.Enumeradores Payment Type
number_of_installmentsintNúmero de Parcelas renegociadas na proposta.10
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
installmentsarray of objectsParcelas renegociadas.Installments Object
Atenção

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

Enumeradores Amortization Type

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

Enumeradores Payment Type

CampoDescrição
banklispPagamento via boleto bancário
manualPagamento feito de forma manual
pixPagamento via pix

Installments Object

CampoTipoDescriçãoCaracteres
installment_keystringkey da parcela a ser renegociadachave uuid

Response

STATUS
201
Response Body
{
"contract_number": "0001232093/ABC",
"proposal_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
"proposal_status": "pending_payment",
"amortization_type": "installment_payment",
"discount_percentage": 0.2,
"payment_amount": 300,
"requester_name": "Requester",
"requester_key": "bcc16a6d-ce21-4cd4-8d8c-d26f89ccc685",
"issuer_name": "issuer",
"reference_date": "2022-07-20",
"proposal_due_date": "2022-07-20",
"issuer_document_number": "98765432100",
"payment_type": "bank_slip",
"origin_key": "76912b4b-508a-4b10-9485-0e87f1316b35",
"payment": {
"digitable_line": "32990001031000700298993000000203110340000004618",
"qr_code_url": "mockurl.com.br",
"qr_code_key": "f02c201d-314e-42be-968c-a48776d98fbf",
"bank_slip_key": "931a989d-66e9-4631-abaa-b413610afb85",
"paid_method_type": "bank_slip"
},
"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\"}"
}