Obter o cliente
curl --request GET \
--url https://homolog.clubfix.com.br/webservice/customers/{document} \
--header 'Authorization: <authorization>'import requests
url = "https://homolog.clubfix.com.br/webservice/customers/{document}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://homolog.clubfix.com.br/webservice/customers/{document}', 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://homolog.clubfix.com.br/webservice/customers/{document}",
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: <authorization>"
],
]);
$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://homolog.clubfix.com.br/webservice/customers/{document}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://homolog.clubfix.com.br/webservice/customers/{document}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://homolog.clubfix.com.br/webservice/customers/{document}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": 12,
"name": "Emanuelly Carolina Carolina Teixeira",
"document": "80615114105",
"phone": "32863751018",
"email": "emanuelly@email.com",
"address": {
"street": "Rua Natal Bertoldo da Silva",
"number": 976,
"complement": null,
"zipcode": "74988670",
"neighborhood": "Nova Olinda",
"city": "Aparecida de Goiânia",
"state": "GO"
}
}Clientes
Obtém o cliente pelo documento
Busca um cliente cadastrado pelo CPF ou número de passaporte
GET
/
customers
/
{document}
Obter o cliente
curl --request GET \
--url https://homolog.clubfix.com.br/webservice/customers/{document} \
--header 'Authorization: <authorization>'import requests
url = "https://homolog.clubfix.com.br/webservice/customers/{document}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://homolog.clubfix.com.br/webservice/customers/{document}', 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://homolog.clubfix.com.br/webservice/customers/{document}",
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: <authorization>"
],
]);
$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://homolog.clubfix.com.br/webservice/customers/{document}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://homolog.clubfix.com.br/webservice/customers/{document}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://homolog.clubfix.com.br/webservice/customers/{document}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": 12,
"name": "Emanuelly Carolina Carolina Teixeira",
"document": "80615114105",
"phone": "32863751018",
"email": "emanuelly@email.com",
"address": {
"street": "Rua Natal Bertoldo da Silva",
"number": 976,
"complement": null,
"zipcode": "74988670",
"neighborhood": "Nova Olinda",
"city": "Aparecida de Goiânia",
"state": "GO"
}
}string
required
CPF ou número do passaporte do cliente, com ou sem formatação. Ex:
12345678900 ou 123.456.789-00.string
required
Token de autenticação do tipo Bearer obtido através do endpoint de login.
Resposta
Retorna o recurso completo do cliente, incluindo:| Campo | Tipo | Descrição |
|---|---|---|
id | integer | Identificador do cliente. Usar como customer_id na contratação |
name | string | Nome completo |
document | string | CPF do cliente |
email | string | |
phone | string | Telefone |
birth_date | string | Data de nascimento |
address | object | Endereço cadastrado (se houver) |
Use este endpoint para verificar se um cliente já está cadastrado antes de tentar criá-lo. Se retornar 404, crie o cliente com
POST /customers.Was this page helpful?
