Atualizar E-mail de Cobrança
curl --request PATCH \
--url https://garu.com.br/api/public/minha-area/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sellerId": 123,
"billingEmailOverride": {}
}
'import requests
url = "https://garu.com.br/api/public/minha-area/profile"
payload = {
"sellerId": 123,
"billingEmailOverride": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sellerId: 123, billingEmailOverride: {}})
};
fetch('https://garu.com.br/api/public/minha-area/profile', 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/public/minha-area/profile",
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([
'sellerId' => 123,
'billingEmailOverride' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/public/minha-area/profile"
payload := strings.NewReader("{\n \"sellerId\": 123,\n \"billingEmailOverride\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/public/minha-area/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sellerId\": 123,\n \"billingEmailOverride\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/public/minha-area/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sellerId\": 123,\n \"billingEmailOverride\": {}\n}"
response = http.request(request)
puts response.read_bodyPortal do Cliente
Atualizar E-mail de Cobrança
Define ou limpa o e-mail de cobrança específico do cliente para um vendedor
PATCH
/
api
/
public
/
minha-area
/
profile
Atualizar E-mail de Cobrança
curl --request PATCH \
--url https://garu.com.br/api/public/minha-area/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sellerId": 123,
"billingEmailOverride": {}
}
'import requests
url = "https://garu.com.br/api/public/minha-area/profile"
payload = {
"sellerId": 123,
"billingEmailOverride": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sellerId: 123, billingEmailOverride: {}})
};
fetch('https://garu.com.br/api/public/minha-area/profile', 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/public/minha-area/profile",
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([
'sellerId' => 123,
'billingEmailOverride' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/public/minha-area/profile"
payload := strings.NewReader("{\n \"sellerId\": 123,\n \"billingEmailOverride\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/public/minha-area/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sellerId\": 123,\n \"billingEmailOverride\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/public/minha-area/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sellerId\": 123,\n \"billingEmailOverride\": {}\n}"
response = http.request(request)
puts response.read_bodyVisão Geral
Endpoint autenticado pelo link mágico. Permite ao cliente definir um e-mail específico (billingEmailOverride) para receber cobranças de um vendedor específico — útil quando o cliente prefere que cobranças cheguem em um endereço fixo (ex: cobrancas@empresa.com.br) diferente do e-mail pessoal.
O override é fixo: mesmo que o cliente troque o e-mail principal em uma cobrança futura, o desta loja não muda. Para voltar ao padrão, envie billingEmailOverride: null.
Resolução do e-mail enviado
billingEmailOverride (definido aqui)
?? CustomerSellerProfile.lastUsedEmail (último visto neste vendedor)
?? Customer.email (e-mail principal global)
Autenticação
HeaderAuthorization: Bearer <jwt-do-link-mágico>.
Exemplo de Requisição
# Definir um e-mail fixo para o vendedor 10
curl -X PATCH https://garu.com.br/api/public/minha-area/profile \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI..." \
-H "Content-Type: application/json" \
-d '{
"sellerId": 10,
"billingEmailOverride": "cobrancas@empresa.com.br"
}'
# Limpar o override (volta ao padrão)
curl -X PATCH https://garu.com.br/api/public/minha-area/profile \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI..." \
-H "Content-Type: application/json" \
-d '{
"sellerId": 10,
"billingEmailOverride": null
}'
await fetch('https://garu.com.br/api/public/minha-area/profile', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${magicLinkToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
sellerId: 10,
billingEmailOverride: 'cobrancas@empresa.com.br'
})
});
import requests
requests.patch(
"https://garu.com.br/api/public/minha-area/profile",
headers={"Authorization": f"Bearer {magic_link_token}"},
json={"sellerId": 10, "billingEmailOverride": "cobrancas@empresa.com.br"}
)
Parâmetros
number
required
ID do vendedor para o qual aplicar o e-mail. Deve ser um vendedor com o qual o
cliente já tem relacionamento (uma cobrança ou pagamento existente).
string | null
required
E-mail a fixar como override. Envie
null (literal) para limpar o
override e voltar ao e-mail padrão do cliente.Resposta
{ "success": true }
Erros
- 400 Bad Request —
billingEmailOverridenão é um e-mail válido (e não énull). - 401 Unauthorized — JWT expirado/inválido.
- 403 Forbidden — cliente não tem relacionamento com o
sellerIdinformado. - 404 Not Found — cliente associado ao token não existe mais (caso raro de exclusão).
Was this page helpful?