Webhooks
Eliminar Webhook de la Tienda
Elimina un webhook registrado de la tienda.
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"
}🗑️ Eliminar Webhook de la Tienda
Este endpoint permite eliminar una URL de webhook registrada para una tienda específica.🔐 Autenticación
Esta ruta requiere autenticación mediante API Key, enviada en el header de la solicitud:Authorization: TU_API_KEY_AQUI
📥 Parámetros de Ruta
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
storeId | string (UUID) | Sí | ID de la tienda |
📥 Query Parameter
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
url | string | Sí | URL exacta del webhook que será eliminado |
📋 Ejemplo de Solicitud
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: TU_API_KEY_AQUI"
📊 Ejemplo de Respuesta (200)
{
"code": "WEBHOOK_REMOVED"
}
❌ Posibles Errores
| Status | Code | Cuándo ocurre |
|---|---|---|
400 | STORE_ID_REQUIRED | Código muerto: la ruta exige storeId; nunca se dispara en la práctica. |
400 | URL_REQUIRED | Campo url no enviado (el controller acepta vía query O body). |
401 | API_KEY_NOT_PROVIDED | Header Authorization no enviado. |
401 | INVALID_API_KEY | API Key inválida o no encontrada. |
403 | USER_DISABLED | Cuenta de usuario desactivada o eliminada. |
403 | NO_ACTIVE_SUBSCRIPTION | Cuenta sin plan activo. |
404 | STORE_NOT_FOUND | La tienda no existe o no pertenece a su cuenta. |
429 | RATE_LIMIT_EXCEEDED | Límite de solicitudes por minuto del plan excedido. |
500 | WEBHOOK_ERROR | Fallo interno al procesar la solicitud. |
503 | SERVICE_UNAVAILABLE | Servicio temporalmente no disponible. |
Parámetros de consulta
Cuerpo
application/json
Alternative to the url query parameter: JSON body {"url": "..."}.
¿Esta página le ayudó?
⌘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"
}