Obter cliente.
curl --request GET \
--url https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}', 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.cartaosimples.com.br/integration/v1/customer/{clienteId}",
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: Bearer <token>"
],
]);
$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://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"nome": "Maria Souza",
"documento": "98765432100",
"endereco": {
"rua": "Av. Paulista",
"cidade": "São Paulo",
"estado": "SP",
"bairro": "Bela Vista",
"cep": "01310-100",
"pais": "BR",
"numero": "1578",
"complemento": "Apto 42"
},
"dataDeNascimento": "1990-03-22T00:00:00Z",
"email": "maria.souza@email.com",
"celular": "+55 (11) 91234-5678"
}{
"tipo": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"titulo": "Requisição inválida.",
"status": 400,
"detalhe": "O campo 'cpf' é obrigatório.",
"instancia": "/v1/order"
}{
"tipo": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"titulo": "Requisição inválida.",
"status": 400,
"detalhe": "O campo 'cpf' é obrigatório.",
"instancia": "/v1/order"
}Cliente
Obter cliente
Retorna os detalhes de um cliente pelo identificador.
GET
/
v1
/
customer
/
{clienteId}
Obter cliente.
curl --request GET \
--url https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}', 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.cartaosimples.com.br/integration/v1/customer/{clienteId}",
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: Bearer <token>"
],
]);
$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://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.cartaosimples.com.br/integration/v1/customer/{clienteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"nome": "Maria Souza",
"documento": "98765432100",
"endereco": {
"rua": "Av. Paulista",
"cidade": "São Paulo",
"estado": "SP",
"bairro": "Bela Vista",
"cep": "01310-100",
"pais": "BR",
"numero": "1578",
"complemento": "Apto 42"
},
"dataDeNascimento": "1990-03-22T00:00:00Z",
"email": "maria.souza@email.com",
"celular": "+55 (11) 91234-5678"
}{
"tipo": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"titulo": "Requisição inválida.",
"status": 400,
"detalhe": "O campo 'cpf' é obrigatório.",
"instancia": "/v1/order"
}{
"tipo": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"titulo": "Requisição inválida.",
"status": 400,
"detalhe": "O campo 'cpf' é obrigatório.",
"instancia": "/v1/order"
}Authorizations
Cabeçalho de autenticação Bearer no formato Bearer <token> onde <token> é seu TOKEN de autenticação
Path Parameters
Identificador único do cliente.
Example:
"3fa85f64-5717-4562-b3fc-2c963f66afa6"