Simula um empréstimo consignado.
curl --request POST \
--url https://api.example.com/contrato/oferta-ativa/simular-consignado \
--header 'Content-Type: application/json' \
--data '
{
"ValorTaxaMensal": 123,
"ValorLiberado": 123,
"NumeroParcelas": 123,
"ValorParcela": 123,
"ValorSeguro": 123
}
'import requests
url = "https://api.example.com/contrato/oferta-ativa/simular-consignado"
payload = {
"ValorTaxaMensal": 123,
"ValorLiberado": 123,
"NumeroParcelas": 123,
"ValorParcela": 123,
"ValorSeguro": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ValorTaxaMensal: 123,
ValorLiberado: 123,
NumeroParcelas: 123,
ValorParcela: 123,
ValorSeguro: 123
})
};
fetch('https://api.example.com/contrato/oferta-ativa/simular-consignado', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/contrato/oferta-ativa/simular-consignado",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ValorTaxaMensal' => 123,
'ValorLiberado' => 123,
'NumeroParcelas' => 123,
'ValorParcela' => 123,
'ValorSeguro' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/contrato/oferta-ativa/simular-consignado"
payload := strings.NewReader("{\n \"ValorTaxaMensal\": 123,\n \"ValorLiberado\": 123,\n \"NumeroParcelas\": 123,\n \"ValorParcela\": 123,\n \"ValorSeguro\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/contrato/oferta-ativa/simular-consignado")
.header("Content-Type", "application/json")
.body("{\n \"ValorTaxaMensal\": 123,\n \"ValorLiberado\": 123,\n \"NumeroParcelas\": 123,\n \"ValorParcela\": 123,\n \"ValorSeguro\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/contrato/oferta-ativa/simular-consignado")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ValorTaxaMensal\": 123,\n \"ValorLiberado\": 123,\n \"NumeroParcelas\": 123,\n \"ValorParcela\": 123,\n \"ValorSeguro\": 123\n}"
response = http.request(request)
puts response.read_body{
"HasError": true,
"Messages": [
"<string>"
],
"Pmt": {
"Parcelas": [
"<string>"
],
"Resumo": {
"ValorSolicitado": 123,
"Prazo": 123,
"IOFValor": 123,
"IOFPercentual": 123,
"TAC": 123,
"ValorSeguro": 123,
"OutrasDespesas": 123,
"TotalFinanciado": 123,
"JurosMensal": 123,
"JurosAnual": 123,
"DataContratacao": "2023-12-25",
"DataPrimeiroVencimento": "2023-12-25",
"DataUltimoVencimento": "2023-12-25",
"ValorParcela": 123,
"CETMensal": 123,
"CETAnual": 123,
"ValorTotalDivida": 123
}
}
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"Erro": "<string>"
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"Erro": "<string>"
}{
"Erro": "<string>"
}Oferta Ativa
10 - Simular Consignado
Realiza a simulação de consignado conforme dados informados, podendo calcular com base no valor liberado ou no valor da parcela.
Simula um empréstimo consignado.
curl --request POST \
--url https://api.example.com/contrato/oferta-ativa/simular-consignado \
--header 'Content-Type: application/json' \
--data '
{
"ValorTaxaMensal": 123,
"ValorLiberado": 123,
"NumeroParcelas": 123,
"ValorParcela": 123,
"ValorSeguro": 123
}
'import requests
url = "https://api.example.com/contrato/oferta-ativa/simular-consignado"
payload = {
"ValorTaxaMensal": 123,
"ValorLiberado": 123,
"NumeroParcelas": 123,
"ValorParcela": 123,
"ValorSeguro": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ValorTaxaMensal: 123,
ValorLiberado: 123,
NumeroParcelas: 123,
ValorParcela: 123,
ValorSeguro: 123
})
};
fetch('https://api.example.com/contrato/oferta-ativa/simular-consignado', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/contrato/oferta-ativa/simular-consignado",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ValorTaxaMensal' => 123,
'ValorLiberado' => 123,
'NumeroParcelas' => 123,
'ValorParcela' => 123,
'ValorSeguro' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/contrato/oferta-ativa/simular-consignado"
payload := strings.NewReader("{\n \"ValorTaxaMensal\": 123,\n \"ValorLiberado\": 123,\n \"NumeroParcelas\": 123,\n \"ValorParcela\": 123,\n \"ValorSeguro\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/contrato/oferta-ativa/simular-consignado")
.header("Content-Type", "application/json")
.body("{\n \"ValorTaxaMensal\": 123,\n \"ValorLiberado\": 123,\n \"NumeroParcelas\": 123,\n \"ValorParcela\": 123,\n \"ValorSeguro\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/contrato/oferta-ativa/simular-consignado")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ValorTaxaMensal\": 123,\n \"ValorLiberado\": 123,\n \"NumeroParcelas\": 123,\n \"ValorParcela\": 123,\n \"ValorSeguro\": 123\n}"
response = http.request(request)
puts response.read_body{
"HasError": true,
"Messages": [
"<string>"
],
"Pmt": {
"Parcelas": [
"<string>"
],
"Resumo": {
"ValorSolicitado": 123,
"Prazo": 123,
"IOFValor": 123,
"IOFPercentual": 123,
"TAC": 123,
"ValorSeguro": 123,
"OutrasDespesas": 123,
"TotalFinanciado": 123,
"JurosMensal": 123,
"JurosAnual": 123,
"DataContratacao": "2023-12-25",
"DataPrimeiroVencimento": "2023-12-25",
"DataUltimoVencimento": "2023-12-25",
"ValorParcela": 123,
"CETMensal": 123,
"CETAnual": 123,
"ValorTotalDivida": 123
}
}
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"Erro": "<string>"
}{
"ErrorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ErrorCode": "<string>",
"ErrorCampo": "<string>",
"Error": "<string>",
"Origem": "<string>"
}{
"Erro": "<string>"
}{
"Erro": "<string>"
}Corpo
application/json
Valor da taxa de juros mensal (deve ser > 0).
Valor do empréstimo desejado (informe se a simulação for por valor liberado).
Número de parcelas desejado (1 a 96).
Valor da parcela desejado (informe se a simulação for por valor de parcela).
Valor do seguro (opcional, se houver, > 0).
Esta página foi útil?
⌘I

