Criar ou atualizar dados profissionais de um cliente
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": "12345678901",
"tipoOcupacao": 1,
"renda": 6500
}
'import requests
url = "https://api.staging.credicarro.com.br/integration/v1/customer/professional"
payload = {
"cpf": "12345678901",
"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: '12345678901', 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' => '12345678901',
'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\": \"12345678901\",\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\": \"12345678901\",\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\": \"12345678901\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\n}"
response = http.request(request)
puts response.read_body{
"tipo": "Partner.AccountIsIncompleted",
"titulo": "Bad Request",
"status": 400,
"detalhe": "Cadastro de conta não finalizado",
"erro": null
}Cliente
Cria ou atualiza as informações profissionais de um cliente
Cria ou atualiza as informações profissionais de um cliente com base nos dados fornecidos.
POST
/
v1
/
customer
/
professional
Criar ou atualizar dados profissionais de um cliente
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": "12345678901",
"tipoOcupacao": 1,
"renda": 6500
}
'import requests
url = "https://api.staging.credicarro.com.br/integration/v1/customer/professional"
payload = {
"cpf": "12345678901",
"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: '12345678901', 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' => '12345678901',
'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\": \"12345678901\",\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\": \"12345678901\",\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\": \"12345678901\",\n \"tipoOcupacao\": 1,\n \"renda\": 6500\n}"
response = http.request(request)
puts response.read_body{
"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
Dados profissionais do cliente
CPF do cliente somente números (11 dígitos).
Required string length:
11Example:
"12345678901"
Tipo de ocupação do cliente. Valores aceitos:
- 1 = aposentado
- 2 = pensionista
- 3 = assalariado
- 4 = autônomo
- 6 = freelancer
- 7 = proprietário
Example:
1
Renda mensal do cliente, em reais (use ponto como separador decimal).
Example:
6500
Response
Dados profissionais aceitos para criação ou atualização
⌘I