Simulação do empréstimo
curl --request POST \
--url https://api.example.com/simulation/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"[].monthlyRate": 123,
"[].installmentsNumber": 123,
"[].loanValue": 123,
"[].installmentValue": 123,
"[].insurance": 123,
"[].insuranceType": "<string>"
}
'import requests
url = "https://api.example.com/simulation/calculate"
payload = {
"[].monthlyRate": 123,
"[].installmentsNumber": 123,
"[].loanValue": 123,
"[].installmentValue": 123,
"[].insurance": 123,
"[].insuranceType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'[].monthlyRate': 123,
'[].installmentsNumber': 123,
'[].loanValue': 123,
'[].installmentValue': 123,
'[].insurance': 123,
'[].insuranceType': '<string>'
})
};
fetch('https://api.example.com/simulation/calculate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Contratação Ativa
Simulação do empréstimo
Calcula as condições da operação (parcelas, CET, IOF) antes de formalizar
POST
/
simulation
/
calculate
Simulação do empréstimo
curl --request POST \
--url https://api.example.com/simulation/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"[].monthlyRate": 123,
"[].installmentsNumber": 123,
"[].loanValue": 123,
"[].installmentValue": 123,
"[].insurance": 123,
"[].insuranceType": "<string>"
}
'import requests
url = "https://api.example.com/simulation/calculate"
payload = {
"[].monthlyRate": 123,
"[].installmentsNumber": 123,
"[].loanValue": 123,
"[].installmentValue": 123,
"[].insurance": 123,
"[].insuranceType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'[].monthlyRate': 123,
'[].installmentsNumber': 123,
'[].loanValue': 123,
'[].installmentValue': 123,
'[].insurance': 123,
'[].insuranceType': '<string>'
})
};
fetch('https://api.example.com/simulation/calculate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Etapa opcional — dispensável quando o contratante já tem cálculo próprio da operação.
Todos os endpoints requerem autenticação via Bearer token no header
Authorization.
Consulte o guia de autenticação para obter suas credenciais e gerar um token.Chamada
POST /simulation/calculate · sempre síncrono (ignora o header x-version)
Diferente dos endpoints worker-*, a simulação é sempre processada de forma síncrona e retorna 200 com o
resultado imediato. Fica sob a URL base https://hml.zipdin.com.br/dataprev-controller.
Parâmetros
O corpo é um array de simulações. Cada item aceita os campos abaixo.Este endpoint não tem schema de validação no Dataprev Controller — ele é um proxy direto para o serviço
de cálculo. Os campos abaixo vêm do exemplo real da coleção de requisições do serviço; o contrato
completo deve ser confirmado com o time de API.
number
Taxa mensal da operação
number
Quantidade de parcelas
number
Valor do empréstimo
number
Valor da parcela
number
Valor/indicador de seguro
string
Tipo de seguro
Exemplo
curl -X POST https://hml.zipdin.com.br/dataprev-controller/simulation/calculate \
-H "x-api-key: SUA_API_KEY" \
-H "Authorization: Bearer SEU_TOKEN" \
-H "x-idempotency-key: 3f8a91b2-7c4d-4e5f-a6b7-8c9d0e1f2a3b" \
-H "Content-Type: application/json" \
-d '[
{
"monthlyRate": 1.8,
"installmentsNumber": 48,
"loanValue": 10000.00,
"installmentValue": 300.00,
"insurance": 0,
"insuranceType": "NONE"
}
]'
