Criar uma nova simulação de financiamento
curl --request POST \
--url https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cpf": "12345678901",
"isVeiculoZeroKm": true,
"placa": "ABC1D23",
"valorVeiculo": 45000,
"uf": "SP",
"valorEntrada": 45000
}
'import requests
url = "https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing"
payload = {
"cpf": "12345678901",
"isVeiculoZeroKm": True,
"placa": "ABC1D23",
"valorVeiculo": 45000,
"uf": "SP",
"valorEntrada": 45000
}
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({
cpf: '12345678901',
isVeiculoZeroKm: true,
placa: 'ABC1D23',
valorVeiculo: 45000,
uf: 'SP',
valorEntrada: 45000
})
};
fetch('https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing', 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.staging.credicarro.com.br/integration/v1/proposal/simulation/financing",
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([
'cpf' => '12345678901',
'isVeiculoZeroKm' => true,
'placa' => 'ABC1D23',
'valorVeiculo' => 45000,
'uf' => 'SP',
'valorEntrada' => 45000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.staging.credicarro.com.br/integration/v1/proposal/simulation/financing"
payload := strings.NewReader("{\n \"cpf\": \"12345678901\",\n \"isVeiculoZeroKm\": true,\n \"placa\": \"ABC1D23\",\n \"valorVeiculo\": 45000,\n \"uf\": \"SP\",\n \"valorEntrada\": 45000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.staging.credicarro.com.br/integration/v1/proposal/simulation/financing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cpf\": \"12345678901\",\n \"isVeiculoZeroKm\": true,\n \"placa\": \"ABC1D23\",\n \"valorVeiculo\": 45000,\n \"uf\": \"SP\",\n \"valorEntrada\": 45000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cpf\": \"12345678901\",\n \"isVeiculoZeroKm\": true,\n \"placa\": \"ABC1D23\",\n \"valorVeiculo\": 45000,\n \"uf\": \"SP\",\n \"valorEntrada\": 45000\n}"
response = http.request(request)
puts response.read_body{
"simulacoes": [
{
"id_simulacao": "123e4567-e89b-12d3-a456-426614174000",
"valor_solicitado": 1,
"prazo": 1,
"valor_parcela": 1,
"valor_tac": 1,
"valor_boleto": 1,
"valor_seguro": 1,
"valor_iof": 1,
"percentual_iof": 1,
"valor_credito_total": 1,
"valor_divida_total": 1,
"percentual_cet_mensal": 1,
"percentual_cet_anual": 1,
"percentual_juros_mensal": 1,
"percentual_juros_anual": 1,
"valor_retencao_diaria_aproximado": null
}
]
}{
"tipo": "Partner.AccountIsIncompleted",
"titulo": "Bad Request",
"status": 400,
"detalhe": "Cadastro de conta não finalizado",
"erro": null
}Simulação
Criar Simulação de Financiamento
Cria uma nova simulação de financiamento
POST
/
v1
/
proposal
/
simulation
/
financing
Criar uma nova simulação de financiamento
curl --request POST \
--url https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cpf": "12345678901",
"isVeiculoZeroKm": true,
"placa": "ABC1D23",
"valorVeiculo": 45000,
"uf": "SP",
"valorEntrada": 45000
}
'import requests
url = "https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing"
payload = {
"cpf": "12345678901",
"isVeiculoZeroKm": True,
"placa": "ABC1D23",
"valorVeiculo": 45000,
"uf": "SP",
"valorEntrada": 45000
}
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({
cpf: '12345678901',
isVeiculoZeroKm: true,
placa: 'ABC1D23',
valorVeiculo: 45000,
uf: 'SP',
valorEntrada: 45000
})
};
fetch('https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing', 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.staging.credicarro.com.br/integration/v1/proposal/simulation/financing",
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([
'cpf' => '12345678901',
'isVeiculoZeroKm' => true,
'placa' => 'ABC1D23',
'valorVeiculo' => 45000,
'uf' => 'SP',
'valorEntrada' => 45000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.staging.credicarro.com.br/integration/v1/proposal/simulation/financing"
payload := strings.NewReader("{\n \"cpf\": \"12345678901\",\n \"isVeiculoZeroKm\": true,\n \"placa\": \"ABC1D23\",\n \"valorVeiculo\": 45000,\n \"uf\": \"SP\",\n \"valorEntrada\": 45000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.staging.credicarro.com.br/integration/v1/proposal/simulation/financing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cpf\": \"12345678901\",\n \"isVeiculoZeroKm\": true,\n \"placa\": \"ABC1D23\",\n \"valorVeiculo\": 45000,\n \"uf\": \"SP\",\n \"valorEntrada\": 45000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.credicarro.com.br/integration/v1/proposal/simulation/financing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cpf\": \"12345678901\",\n \"isVeiculoZeroKm\": true,\n \"placa\": \"ABC1D23\",\n \"valorVeiculo\": 45000,\n \"uf\": \"SP\",\n \"valorEntrada\": 45000\n}"
response = http.request(request)
puts response.read_body{
"simulacoes": [
{
"id_simulacao": "123e4567-e89b-12d3-a456-426614174000",
"valor_solicitado": 1,
"prazo": 1,
"valor_parcela": 1,
"valor_tac": 1,
"valor_boleto": 1,
"valor_seguro": 1,
"valor_iof": 1,
"percentual_iof": 1,
"valor_credito_total": 1,
"valor_divida_total": 1,
"percentual_cet_mensal": 1,
"percentual_cet_anual": 1,
"percentual_juros_mensal": 1,
"percentual_juros_anual": 1,
"valor_retencao_diaria_aproximado": null
}
]
}{
"tipo": "Partner.AccountIsIncompleted",
"titulo": "Bad Request",
"status": 400,
"detalhe": "Cadastro de conta não finalizado",
"erro": null
}Authorizations
Cabeçalho de autenticação Bearer no formato Bearer <token> onde <token> é seu TOKEN de autenticação
Body
application/json
Os dados da sua simulação
CPF do cliente somente números (11 dígitos)
Minimum string length:
11Example:
"12345678901"
Indica se o veículo é zero quilômetro. true para novo, false para usado.
Example:
true
Placa do veículo
Example:
"ABC1D23"
Valor total do veículo
Example:
45000
UF (Unidade Federativa) do registro do veículo, em formato de 2 letras (ex. SP, RJ, MG). Campo opcional
Example:
"SP"
Valor de entrada do financiamento, em reais. Utilize ponto como separador decimal. Campo opcional
Example:
45000
Response
Simulação criada com sucesso
Show child attributes
Show child attributes
⌘I