curl --request POST \
--url https://api.example.com/api/services/app/Cartao/PreCadastro \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"name": "<string>",
"document": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"income": 123,
"addressType": "<string>",
"addressStreet": "<string>",
"addressNumber": 123,
"addressCity": "<string>",
"addressState": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressPostalCode": "<string>",
"cellPhoneNumber": "<string>",
"employmentStatus": 123,
"buyValue": 123,
"installmentNumbers": 123,
"updateCustomerData": true,
"firstInstallment": "2023-11-07T05:31:56Z",
"hasInsurance": true
}
'import requests
url = "https://api.example.com/api/services/app/Cartao/PreCadastro"
payload = {
"name": "<string>",
"document": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"income": 123,
"addressType": "<string>",
"addressStreet": "<string>",
"addressNumber": 123,
"addressCity": "<string>",
"addressState": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressPostalCode": "<string>",
"cellPhoneNumber": "<string>",
"employmentStatus": 123,
"buyValue": 123,
"installmentNumbers": 123,
"updateCustomerData": True,
"firstInstallment": "2023-11-07T05:31:56Z",
"hasInsurance": True
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
name: '<string>',
document: '<string>',
birthDate: '2023-11-07T05:31:56Z',
income: 123,
addressType: '<string>',
addressStreet: '<string>',
addressNumber: 123,
addressCity: '<string>',
addressState: '<string>',
addressComplement: '<string>',
addressNeighborhood: '<string>',
addressPostalCode: '<string>',
cellPhoneNumber: '<string>',
employmentStatus: 123,
buyValue: 123,
installmentNumbers: 123,
updateCustomerData: true,
firstInstallment: '2023-11-07T05:31:56Z',
hasInsurance: true
})
};
fetch('https://api.example.com/api/services/app/Cartao/PreCadastro', 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/api/services/app/Cartao/PreCadastro",
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([
'name' => '<string>',
'document' => '<string>',
'birthDate' => '2023-11-07T05:31:56Z',
'income' => 123,
'addressType' => '<string>',
'addressStreet' => '<string>',
'addressNumber' => 123,
'addressCity' => '<string>',
'addressState' => '<string>',
'addressComplement' => '<string>',
'addressNeighborhood' => '<string>',
'addressPostalCode' => '<string>',
'cellPhoneNumber' => '<string>',
'employmentStatus' => 123,
'buyValue' => 123,
'installmentNumbers' => 123,
'updateCustomerData' => true,
'firstInstallment' => '2023-11-07T05:31:56Z',
'hasInsurance' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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/api/services/app/Cartao/PreCadastro"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"document\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"income\": 123,\n \"addressType\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": 123,\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressPostalCode\": \"<string>\",\n \"cellPhoneNumber\": \"<string>\",\n \"employmentStatus\": 123,\n \"buyValue\": 123,\n \"installmentNumbers\": 123,\n \"updateCustomerData\": true,\n \"firstInstallment\": \"2023-11-07T05:31:56Z\",\n \"hasInsurance\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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/api/services/app/Cartao/PreCadastro")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"name\": \"<string>\",\n \"document\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"income\": 123,\n \"addressType\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": 123,\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressPostalCode\": \"<string>\",\n \"cellPhoneNumber\": \"<string>\",\n \"employmentStatus\": 123,\n \"buyValue\": 123,\n \"installmentNumbers\": 123,\n \"updateCustomerData\": true,\n \"firstInstallment\": \"2023-11-07T05:31:56Z\",\n \"hasInsurance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/services/app/Cartao/PreCadastro")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"name\": \"<string>\",\n \"document\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"income\": 123,\n \"addressType\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": 123,\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressPostalCode\": \"<string>\",\n \"cellPhoneNumber\": \"<string>\",\n \"employmentStatus\": 123,\n \"buyValue\": 123,\n \"installmentNumbers\": 123,\n \"updateCustomerData\": true,\n \"firstInstallment\": \"2023-11-07T05:31:56Z\",\n \"hasInsurance\": true\n}"
response = http.request(request)
puts response.read_body{
"operationId": 123,
"status": 123,
"info": "<string>",
"contractNumber": "<string>",
"limit": 123,
"preApprovedLimit": 123
}Realiza o pré-cadastro para solicitação de cartão
curl --request POST \
--url https://api.example.com/api/services/app/Cartao/PreCadastro \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"name": "<string>",
"document": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"income": 123,
"addressType": "<string>",
"addressStreet": "<string>",
"addressNumber": 123,
"addressCity": "<string>",
"addressState": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressPostalCode": "<string>",
"cellPhoneNumber": "<string>",
"employmentStatus": 123,
"buyValue": 123,
"installmentNumbers": 123,
"updateCustomerData": true,
"firstInstallment": "2023-11-07T05:31:56Z",
"hasInsurance": true
}
'import requests
url = "https://api.example.com/api/services/app/Cartao/PreCadastro"
payload = {
"name": "<string>",
"document": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"income": 123,
"addressType": "<string>",
"addressStreet": "<string>",
"addressNumber": 123,
"addressCity": "<string>",
"addressState": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressPostalCode": "<string>",
"cellPhoneNumber": "<string>",
"employmentStatus": 123,
"buyValue": 123,
"installmentNumbers": 123,
"updateCustomerData": True,
"firstInstallment": "2023-11-07T05:31:56Z",
"hasInsurance": True
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
name: '<string>',
document: '<string>',
birthDate: '2023-11-07T05:31:56Z',
income: 123,
addressType: '<string>',
addressStreet: '<string>',
addressNumber: 123,
addressCity: '<string>',
addressState: '<string>',
addressComplement: '<string>',
addressNeighborhood: '<string>',
addressPostalCode: '<string>',
cellPhoneNumber: '<string>',
employmentStatus: 123,
buyValue: 123,
installmentNumbers: 123,
updateCustomerData: true,
firstInstallment: '2023-11-07T05:31:56Z',
hasInsurance: true
})
};
fetch('https://api.example.com/api/services/app/Cartao/PreCadastro', 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/api/services/app/Cartao/PreCadastro",
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([
'name' => '<string>',
'document' => '<string>',
'birthDate' => '2023-11-07T05:31:56Z',
'income' => 123,
'addressType' => '<string>',
'addressStreet' => '<string>',
'addressNumber' => 123,
'addressCity' => '<string>',
'addressState' => '<string>',
'addressComplement' => '<string>',
'addressNeighborhood' => '<string>',
'addressPostalCode' => '<string>',
'cellPhoneNumber' => '<string>',
'employmentStatus' => 123,
'buyValue' => 123,
'installmentNumbers' => 123,
'updateCustomerData' => true,
'firstInstallment' => '2023-11-07T05:31:56Z',
'hasInsurance' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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/api/services/app/Cartao/PreCadastro"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"document\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"income\": 123,\n \"addressType\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": 123,\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressPostalCode\": \"<string>\",\n \"cellPhoneNumber\": \"<string>\",\n \"employmentStatus\": 123,\n \"buyValue\": 123,\n \"installmentNumbers\": 123,\n \"updateCustomerData\": true,\n \"firstInstallment\": \"2023-11-07T05:31:56Z\",\n \"hasInsurance\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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/api/services/app/Cartao/PreCadastro")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"name\": \"<string>\",\n \"document\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"income\": 123,\n \"addressType\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": 123,\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressPostalCode\": \"<string>\",\n \"cellPhoneNumber\": \"<string>\",\n \"employmentStatus\": 123,\n \"buyValue\": 123,\n \"installmentNumbers\": 123,\n \"updateCustomerData\": true,\n \"firstInstallment\": \"2023-11-07T05:31:56Z\",\n \"hasInsurance\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/services/app/Cartao/PreCadastro")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"name\": \"<string>\",\n \"document\": \"<string>\",\n \"birthDate\": \"2023-11-07T05:31:56Z\",\n \"income\": 123,\n \"addressType\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": 123,\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressPostalCode\": \"<string>\",\n \"cellPhoneNumber\": \"<string>\",\n \"employmentStatus\": 123,\n \"buyValue\": 123,\n \"installmentNumbers\": 123,\n \"updateCustomerData\": true,\n \"firstInstallment\": \"2023-11-07T05:31:56Z\",\n \"hasInsurance\": true\n}"
response = http.request(request)
puts response.read_body{
"operationId": 123,
"status": 123,
"info": "<string>",
"contractNumber": "<string>",
"limit": 123,
"preApprovedLimit": 123
}curl -X POST "https://gateway.hubcred.com.br/external/v1/api/services/app/Cartao/PreCadastro" \
-H "Authorization: Bearer SEU_TOKEN" -H "Content-Type: application/json" \
-d '{ "name": "Maria de Tal", "document": "12345678900", "birthDate": "1990-01-01", "income": 3000, "buyValue": 1200, "installmentNumbers": 12, "hasInsurance": false, "...": "demais campos (endereço, telefone, etc.) no schema abaixo" }'
Body
Input com os dados do cliente para pré-cadastro
Dados de entrada para o pré-cadastro de cartão externo.
Nome completo do cliente.
Documento (CPF/CNPJ) do cliente.
Data de nascimento do cliente.
Renda mensal do cliente.
Tipo de logradouro (ex: RUA, AVENIDA).
Nome do logradouro.
Número do endereço.
Cidade do endereço.
Estado do endereço (UF).
Complemento do endereço.
Bairro do endereço.
CEP do endereço.
Número do telefone celular.
Status de emprego (1 - Registrado, 2 - Autônomo).
Valor da compra pretendida.
Quantidade de parcelas desejada.
Indica se deve atualizar os dados do cliente.
Data do primeiro vencimento.
Indica se contratou seguro.
Response
OK
Resultado do pré-cadastro de cartão externo.
Identificador da operação.
Status do pré-cadastro (1 - Permitido, 2 - Negado).
Informações adicionais sobre o status.
Número do contrato gerado.
Limite aprovado.
Limite pré-aprovado.