Listar Clientes
curl --request GET \
--url https://garu.com.br/api/v1/customers \
--header 'Authorization: <authorization>'import requests
url = "https://garu.com.br/api/v1/customers"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://garu.com.br/api/v1/customers', 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://garu.com.br/api/v1/customers",
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://garu.com.br/api/v1/customers"
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://garu.com.br/api/v1/customers")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/customers")
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_bodyClientes
Listar Clientes
Liste os clientes da sua conta, com busca e filtro por status de inadimplência
GET
/
api
/
v1
/
customers
Listar Clientes
curl --request GET \
--url https://garu.com.br/api/v1/customers \
--header 'Authorization: <authorization>'import requests
url = "https://garu.com.br/api/v1/customers"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://garu.com.br/api/v1/customers', 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://garu.com.br/api/v1/customers",
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://garu.com.br/api/v1/customers"
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://garu.com.br/api/v1/customers")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/customers")
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_bodyVisão Geral
Lista os clientes vinculados à conta autenticada, do mais recente para o mais antigo.Headers
string
required
Sua chave de API (
Bearer sk_live_...)Query Parameters
integer
default:"1"
Página desejada
integer
default:"20"
Itens por página, máximo 100
string
Busca por nome, e-mail ou documento
string
overdue retorna apenas clientes com pelo menos uma cobrança agendada (avulsa, recorrente ou carnê) em atrasoExemplo de Requisição
curl -G https://garu.com.br/api/v1/customers \
-H "Authorization: Bearer sk_live_sua_chave_api" \
-d search=maria \
-d limit=50
const params = new URLSearchParams({ search: 'maria', limit: '50' });
const response = await fetch(`https://garu.com.br/api/v1/customers?${params}`, {
headers: { Authorization: `Bearer ${process.env.GARU_API_KEY}` }
});
const { data, totalCount } = await response.json();
console.log(`${data.length} de ${totalCount} clientes`);
import os
import requests
response = requests.get(
"https://garu.com.br/api/v1/customers",
headers={"Authorization": f"Bearer {os.environ['GARU_API_KEY']}"},
params={"search": "maria", "limit": 50},
)
body = response.json()
print(f"{len(body['data'])} de {body['totalCount']} clientes")
Resposta de Sucesso (200 OK)
{
"data": [
{
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Maria Silva",
"email": "maria@exemplo.com.br",
"phone": "11987654321",
"document": "12345678909",
"personType": "fisica",
"zipCode": null,
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null,
"billingEmail": "maria@exemplo.com.br",
"hasBillingEmailOverride": false,
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
],
"count": 1,
"totalCount": 42,
"totalPages": 3
}
| Campo | Significado |
|---|---|
count | Itens nesta página |
totalCount | Total de clientes que casam com os filtros |
totalPages | Número de páginas com o limit informado |
Erros
| Código | Quando acontece |
|---|---|
401 | Chave de API ausente ou inválida |
Was this page helpful?
⌘I