POST
/api/v1/Installment/{installmentId}/SimulateEarlySettlementCobrança · Parcelamentos
Método utilizado para simular uma liquidação antecipada
Cria um novo registro de api.
Visão geral
Método utilizado para simular uma liquidação antecipada
Autenticação e pré-requisitos
Requer autenticação. Envie o token no header Authorization: Bearer {{token}} (JWT do AWS Cognito). Integrações servidor-a-servidor podem usar X-Api-Key. Todo tráfego é HTTPS e a credencial nunca vai na URL nem em query string.
Pré-requisitos: a rota exige identificador(es) de recurso já existente(s):
installmentId— —
Request
Parâmetros
| Nome | Em | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|---|
installmentId | path | string | obrigatório | — | 3fa85f64-5717-4562-b3fc-2c963f66afa6 |
Corpo da requisição
Envie no formato application/json. Corpo obrigatório.
Campos
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
valuationDate | string (date-time) | opcional | — | — | "2025-08-11T13:45:00Z" |
numberInstallments | integer | opcional | — | — | 0 |
isSettleOutstandingBalance | boolean | opcional | — | — | true |
billingSettingId | string | opcional | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
Exemplo de corpo
{
"valuationDate": "2025-08-11T13:45:00Z",
"numberInstallments": 0,
"isSettleOutstandingBalance": true,
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}Response
Resposta 200.
Campos
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
totalAmount | integer (int64) | opcional | — | — | 0 |
outstandingBalance | integer (int64) | opcional | — | — | 0 |
outstandingBillings | integer | opcional | — | — | 0 |
costAdvancePayment | integer (int64) | opcional | — | — | 0 |
overdueBillings | integer | opcional | — | — | 0 |
antecipatedBillings | integer | opcional | — | — | 0 |
interestAmount | integer (int64) | opcional | — | — | 0 |
fineAmount | integer (int64) | opcional | — | — | 0 |
discountAmount | integer (int64) | opcional | — | — | 0 |
overdueBillingsAmount | integer (int64) | opcional | — | — | 0 |
Exemplo de resposta
{
"totalAmount": 0,
"outstandingBalance": 0,
"outstandingBillings": 0,
"costAdvancePayment": 0,
"overdueBillings": 0,
"antecipatedBillings": 0,
"interestAmount": 0,
"fineAmount": 0,
"discountAmount": 0,
"overdueBillingsAmount": 0
}Códigos de retorno
| Código | Significado | Detalhe do contrato |
|---|---|---|
200 | Requisição bem-sucedida. | — |
401 | Não autenticado — token ausente, inválido ou expirado. | — |
Exemplos
curl -X POST "{{baseUrl}}/api/v1/Installment/3fa85f64-5717-4562-b3fc-2c963f66afa6/SimulateEarlySettlement" \
-H "Authorization: Bearer {{token}}" \
-H "Content-Type: application/json" \
-d '{
"valuationDate": "2025-08-11T13:45:00Z",
"numberInstallments": 0,
"isSettleOutstandingBalance": true,
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'var baseUrl = "{{baseUrl}}";
var token = "{{token}}";
using var http = new HttpClient { BaseAddress = new Uri(baseUrl) };
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
var rota = "/api/v1/Installment/3fa85f64-5717-4562-b3fc-2c963f66afa6/SimulateEarlySettlement";
var corpo = new StringContent(
"""
{
"valuationDate": "2025-08-11T13:45:00Z",
"numberInstallments": 0,
"isSettleOutstandingBalance": true,
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
""",
Encoding.UTF8, "application/json");
var resp = await http.PostAsync(rota, corpo);
resp.EnsureSuccessStatusCode();
var json = await resp.Content.ReadAsStringAsync();const baseUrl = '{{baseUrl}}';
const token = '{{token}}';
const payload = {
"valuationDate": "2025-08-11T13:45:00Z",
"numberInstallments": 0,
"isSettleOutstandingBalance": true,
"billingSettingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
};
const resp = await fetch(`${baseUrl}/api/v1/Installment/3fa85f64-5717-4562-b3fc-2c963f66afa6/SimulateEarlySettlement`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();Troque apenas {{baseUrl}} e {{token}}. No Postman, defina-os como variáveis de environment; o cURL importa em Import > Raw text.
Downloads
Este endpoint já vem configurado nas collections abaixo, na pasta da etapa correspondente.
Collection completaConsignado privado e FGTS, em pastas espelhando a documentação.Baixar →Environment do PostmanAs variáveis fora da collection, para versionar uma sem versionar o token.Baixar →Documentação consolidada para LLMToda a documentação em um arquivo de texto, na ordem da navegação.Baixar →Referência em MarkdownEste contrato, campo a campo, gerado do spec.Baixar →
Guia de importação: Como importar no Postman · Todos os downloads: Downloads