Remover Cliente
curl --request DELETE \
--url https://garu.com.br/api/v1/customers/{uuid} \
--header 'Authorization: <authorization>'import requests
url = "https://garu.com.br/api/v1/customers/{uuid}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
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 => "DELETE",
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/{uuid}"
req, _ := http.NewRequest("DELETE", 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.delete("https://garu.com.br/api/v1/customers/{uuid}")
.header("Authorization", "<authorization>")
.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::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyClientes
Remover Cliente
Desvincule um cliente da sua conta
DELETE
/
api
/
v1
/
customers
/
{uuid}
Remover Cliente
curl --request DELETE \
--url https://garu.com.br/api/v1/customers/{uuid} \
--header 'Authorization: <authorization>'import requests
url = "https://garu.com.br/api/v1/customers/{uuid}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
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 => "DELETE",
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/{uuid}"
req, _ := http.NewRequest("DELETE", 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.delete("https://garu.com.br/api/v1/customers/{uuid}")
.header("Authorization", "<authorization>")
.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::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyVisão Geral
Desvincula o cliente da conta autenticada — remove apenas o seu perfil (CustomerSellerProfile). O cliente global e os perfis de outros sellers vinculados a ele não são afetados.
Isto não apaga o histórico de transações do cliente com você — apenas o vínculo. Cobranças e carnês já existentes continuam no seu histórico.
Headers
string
required
Sua chave de API (
Bearer sk_live_...)Path Parameters
string
required
UUID do cliente
Exemplo de Requisição
curl -X DELETE https://garu.com.br/api/v1/customers/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer sk_live_sua_chave_api"
await fetch(`https://garu.com.br/api/v1/customers/${customerUuid}`, {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.GARU_API_KEY}` }
});
import os
import requests
requests.delete(
f"https://garu.com.br/api/v1/customers/{customer_uuid}",
headers={"Authorization": f"Bearer {os.environ['GARU_API_KEY']}"},
)
Resposta de Sucesso (200 OK)
{ "removed": true }
Erros
| Código | Quando acontece |
|---|---|
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