curl --request GET \
--url https://besimplo.com/api/v1/customers/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/customers/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://besimplo.com/api/v1/customers/{id}', 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://besimplo.com/api/v1/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://besimplo.com/api/v1/customers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://besimplo.com/api/v1/customers/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "cus_01h455vb4pex5vsknk084sn02q",
"object": "customer",
"live_mode": true,
"created": 1680893993,
"name": "João Silva",
"external_code": "01953808-3a3a-712f-99ce-f6943c8141db",
"identifier": "123.456.789-00",
"email": "joao.silva@exemplo.com",
"phone": "+5511999998888",
"description": "individual",
"address": {
"zip_code": "12345012",
"street": "Alguma Rua",
"number": "9934",
"district": "D'algum Bairro",
"city": "Campinas",
"state": "SP",
"complement": "Apt. 123"
}
}Consultar cliente
Consultar dados de um cliente existente na sua conta
curl --request GET \
--url https://besimplo.com/api/v1/customers/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/customers/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://besimplo.com/api/v1/customers/{id}', 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://besimplo.com/api/v1/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://besimplo.com/api/v1/customers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://besimplo.com/api/v1/customers/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "cus_01h455vb4pex5vsknk084sn02q",
"object": "customer",
"live_mode": true,
"created": 1680893993,
"name": "João Silva",
"external_code": "01953808-3a3a-712f-99ce-f6943c8141db",
"identifier": "123.456.789-00",
"email": "joao.silva@exemplo.com",
"phone": "+5511999998888",
"description": "individual",
"address": {
"zip_code": "12345012",
"street": "Alguma Rua",
"number": "9934",
"district": "D'algum Bairro",
"city": "Campinas",
"state": "SP",
"complement": "Apt. 123"
}
}Authorizations
A chave de API usada para autenticar a requisição e identificar a sua conta.
Exemplo: Authorization: ApiKey my-secure-key
Path Parameters
ID do cliente.
^cus_[0-9a-z]{26}$"cus_01h455vb4pex5vsknk084sn02p"
Response
Operação realizada com sucesso
ID único do cliente, no formato TypeID com prefixo cus_.
^cus_[0-9a-z]{26}$"cus_01h455vb4pex5vsknk084sn02q"
Tipo do objeto. Sempre 'customer'.
customer "customer"
Indica ambiente de produção (true) ou sandbox (false). Dados de sandbox são limpos periodicamente.
true
Timestamp Unix de quando o cliente foi criado.
1680893993
Nome do cliente.
1 - 250"João Silva"
Código externo para integração. Deve ser único por conta.
"01953808-3a3a-712f-99ce-f6943c8141db"
CPF ou CNPJ do cliente.
"123.456.789-00"
E-mail do cliente.
"joao.silva@exemplo.com"
Telefone do cliente.
"+5511999998888"
Tipo de cliente baseado no documento: 'individual' para CPF, 'business' para CNPJ.
individual, business "individual"
Show child attributes
Show child attributes

