curl --request POST \
--url https://api.staging.credicarro.com.br/integration/v1/customer/professional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cpf": "12345678909",
"tipoOcupacao": 1,
"renda": 6500
}
'import requests
url = "https://api.staging.credicarro.com.br/integration/v1/customer/professional"
payload = {
"cpf": "12345678909",
"tipoOcupacao": 1,
"renda": 6500
}
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: '12345678909', tipoOcupacao: 1, renda: 6500})
};
fetch('https://api.staging.credicarro.com.br/integration/v1/customer/professional', 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/customer/professional",
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' => '12345678909',
'tipoOcupacao' => 1,
'renda' => 6500
]),
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/customer/professional"
payload := strings.NewReader("{\n \"cpf\": \"12345678909\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\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/customer/professional")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cpf\": \"12345678909\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.credicarro.com.br/integration/v1/customer/professional")
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\": \"12345678909\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\n}"
response = http.request(request)
puts response.read_bodyAccepted{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}Criar ou atualizar dados profissionais do cliente
Cria ou atualiza as informações profissionais de um cliente com base nos dados fornecidos.
curl --request POST \
--url https://api.staging.credicarro.com.br/integration/v1/customer/professional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cpf": "12345678909",
"tipoOcupacao": 1,
"renda": 6500
}
'import requests
url = "https://api.staging.credicarro.com.br/integration/v1/customer/professional"
payload = {
"cpf": "12345678909",
"tipoOcupacao": 1,
"renda": 6500
}
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: '12345678909', tipoOcupacao: 1, renda: 6500})
};
fetch('https://api.staging.credicarro.com.br/integration/v1/customer/professional', 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/customer/professional",
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' => '12345678909',
'tipoOcupacao' => 1,
'renda' => 6500
]),
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/customer/professional"
payload := strings.NewReader("{\n \"cpf\": \"12345678909\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\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/customer/professional")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cpf\": \"12345678909\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.credicarro.com.br/integration/v1/customer/professional")
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\": \"12345678909\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\n}"
response = http.request(request)
puts response.read_bodyAccepted{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}{
"tipo": "Validation.Cpf.Invalid",
"titulo": "Requisição inválida",
"status": 400,
"detalhe": "O CPF informado em 'cpf' é inválido.",
"campo": "cpf",
"erros": [
{
"codigo": "Validation.InvalidFormat",
"mensagem": "O valor informado para 'valorVeiculo' não é um número válido.",
"campo": "cpf"
}
]
}tipoOcupacao | Ocupação |
|---|---|
| 1 | Aposentado |
| 2 | Pensionista |
| 3 | Assalariado |
| 4 | Autônomo |
| 6 | Freelancer |
| 7 | Proprietário |
202 Accepted, sem corpo. Se o CPF não estiver cadastrado, retorna 404 com Customer.Account.NotFound.Authorizations
Cabeçalho de autenticação Bearer no formato Bearer <token> onde <token> é seu TOKEN de autenticação
Headers
Chave opcional (1 a 200 caracteres) para repetir a requisição com segurança. Reenviar a mesma chave com o mesmo conteúdo devolve o resultado original sem duplicar o registro; reutilizá-la com outro conteúdo retorna erro.
200"6f1c9a2e-3b7d-4e2a-9c51-0d8f3a7b2e10"
Body
Dados profissionais do cliente
CPF do cliente, com ou sem pontuação (11 dígitos). Os dígitos verificadores são validados.
11 - 14"12345678909"
Tipo de ocupação do cliente. Valores aceitos:
- 1 = aposentado
- 2 = pensionista
- 3 = assalariado
- 4 = autônomo
- 6 = freelancer
- 7 = proprietário
1
Renda mensal do cliente, em reais (use ponto como separador decimal).
6500
Response
Dados profissionais aceitos para criação ou atualização. A resposta não tem corpo.
Resposta sem corpo