Webhooks
Remover Webhook da Loja
Remove um webhook cadastrado da loja.
DELETE
/
stores
/
{storeId}
/
webhooks
Remove webhook from store
curl --request DELETE \
--url https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
payload = { "url": "<string>" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks', 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://api.cabrapi.com.br/v1/stores/{storeId}/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.delete("https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "WEBHOOK_REMOVED"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}🗑️ Remover Webhook da Loja
Este endpoint permite remover uma URL de webhook cadastrada para uma loja específica.🔐 Autenticação
Esta rota exige autenticação via API Key, enviada no header da requisição:Authorization: SUA_API_KEY_AQUI
📥 Parâmetros de Rota
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
storeId | string (UUID) | Sim | ID da loja |
📥 Query Parameter
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
url | string | Sim | URL exata do webhook que será removido |
📋 Exemplo de Requisição
curl --location --request DELETE "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/webhooks?url=https%3A%2F%2Fmeusistema.com%2Fcallback1" \
--header "Authorization: SUA_API_KEY_AQUI"
📊 Exemplo de Resposta (200)
{
"code": "WEBHOOK_REMOVED"
}
❌ Possíveis Erros
| Status | Code | Quando acontece |
|---|---|---|
400 | STORE_ID_REQUIRED | Código morto: a rota exige storeId; nunca dispara na prática. |
400 | URL_REQUIRED | Campo url não enviado (o controller aceita via query OU body). |
401 | API_KEY_NOT_PROVIDED | Header Authorization não enviado. |
401 | INVALID_API_KEY | API Key inválida ou não encontrada. |
403 | USER_DISABLED | Conta do usuário desativada ou excluída. |
403 | NO_ACTIVE_SUBSCRIPTION | Conta sem plano ativo. |
404 | STORE_NOT_FOUND | Loja não existe ou não pertence à sua conta. |
429 | RATE_LIMIT_EXCEEDED | Limite de requisições por minuto do plano excedido. |
500 | WEBHOOK_ERROR | Falha interna ao processar a requisição. |
503 | SERVICE_UNAVAILABLE | Serviço temporariamente indisponível. |
Parâmetros de consulta
Corpo
application/json
Alternative to the url query parameter: JSON body {"url": "..."}.
Esta página foi útil?
⌘I
Remove webhook from store
curl --request DELETE \
--url https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
payload = { "url": "<string>" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks', 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://api.cabrapi.com.br/v1/stores/{storeId}/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.delete("https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "WEBHOOK_REMOVED"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}