Atualizar Cliente
curl --request PATCH \
--url https://garu.com.br/api/v1/customers/{uuid} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"personType": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>"
}
'import requests
url = "https://garu.com.br/api/v1/customers/{uuid}"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"personType": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
document: '<string>',
personType: '<string>',
zipCode: '<string>',
street: '<string>',
number: '<string>',
complement: '<string>',
neighborhood: '<string>',
city: '<string>',
state: '<string>'
})
};
fetch('https://garu.com.br/api/v1/customers/{uuid}', 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/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'document' => '<string>',
'personType' => '<string>',
'zipCode' => '<string>',
'street' => '<string>',
'number' => '<string>',
'complement' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://garu.com.br/api/v1/customers/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"document\": \"<string>\",\n \"personType\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://garu.com.br/api/v1/customers/{uuid}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"document\": \"<string>\",\n \"personType\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/customers/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"document\": \"<string>\",\n \"personType\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyClientes
Atualizar Cliente
Atualize os dados de um cliente para o seu perfil, sem afetar outros sellers
PATCH
/
api
/
v1
/
customers
/
{uuid}
Atualizar Cliente
curl --request PATCH \
--url https://garu.com.br/api/v1/customers/{uuid} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"personType": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>"
}
'import requests
url = "https://garu.com.br/api/v1/customers/{uuid}"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"personType": "<string>",
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
document: '<string>',
personType: '<string>',
zipCode: '<string>',
street: '<string>',
number: '<string>',
complement: '<string>',
neighborhood: '<string>',
city: '<string>',
state: '<string>'
})
};
fetch('https://garu.com.br/api/v1/customers/{uuid}', 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/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'document' => '<string>',
'personType' => '<string>',
'zipCode' => '<string>',
'street' => '<string>',
'number' => '<string>',
'complement' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://garu.com.br/api/v1/customers/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"document\": \"<string>\",\n \"personType\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://garu.com.br/api/v1/customers/{uuid}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"document\": \"<string>\",\n \"personType\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/customers/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"document\": \"<string>\",\n \"personType\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"complement\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyVisão Geral
Atualiza campos do cliente para o seu perfil (CustomerSellerProfile). Só os campos enviados mudam — atualização parcial. Outros sellers vinculados ao mesmo cliente global não são afetados: cada um mantém sua própria visão de nome, e-mail e telefone.
Headers
string
required
Sua chave de API (
Bearer sk_live_...)string
required
application/jsonPath Parameters
string
required
UUID do cliente
Request Body
Todos os campos são opcionais — envie apenas o que quer mudar.string
Nome completo
string
E-mail válido
string
Telefone com DDD, 10 ou 11 dígitos
string
CPF (11 dígitos) ou CNPJ (14 dígitos), apenas números
string
fisica ou juridicastring
CEP com 8 dígitos
string
Logradouro
string
Número do endereço
string
Complemento
string
Bairro
string
Cidade
string
Sigla do estado, 2 letras maiúsculas
Para mudar apenas o e-mail de cobrança sem alterar o e-mail de contato do cliente, use
PATCH /api/v1/customers/{uuid}/billing-email-override em vez deste endpoint.Exemplo de Requisição
curl -X PATCH https://garu.com.br/api/v1/customers/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer sk_live_sua_chave_api" \
-H "Content-Type: application/json" \
-d '{ "name": "Maria Santos" }'
const response = await fetch(
`https://garu.com.br/api/v1/customers/${customerUuid}`,
{
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.GARU_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'Maria Santos' })
}
);
const customer = await response.json();
import os
import requests
response = requests.patch(
f"https://garu.com.br/api/v1/customers/{customer_uuid}",
headers={
"Authorization": f"Bearer {os.environ['GARU_API_KEY']}",
"Content-Type": "application/json",
},
json={"name": "Maria Santos"},
)
customer = response.json()
Resposta de Sucesso (200 OK)
{
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Maria Santos",
"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-15T11:00:00.000Z"
}
Erros
| Código | Quando acontece |
|---|---|
400 | Dados inválidos |
401 | Chave de API ausente ou inválida |
404 | O cliente não existe ou não está vinculado à conta da chave usada |
Was this page helpful?
⌘I