Webhooks
List Store Webhooks
Returns all webhooks registered for a store and the maximum limit allowed by the plan.
GET
/
stores
/
{storeId}
/
webhooks
List store webhooks
curl --request GET \
--url https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks \
--header 'Authorization: <api-key>'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks")
.header("Authorization", "<api-key>")
.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::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"max": 3,
"webhooks": [
{
"events": [
"store.created"
],
"url": "<string>"
}
]
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}📋 List Store Webhooks
This endpoint allows listing all webhooks registered for a specific store, in addition to informing the maximum number of webhooks allowed by the store’s plan.🔐 Authentication
This route requires authentication via API Key, sent in the request header:Authorization: YOUR_API_KEY_HERE
📥 Route Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
storeId | string (UUID) | Yes | Store ID |
📋 Request Example
curl --location "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/webhooks" \
--header "Authorization: YOUR_API_KEY_HERE"
📊 Response Example (200)
{
"webhooks": [
{
"url": "https://meusistema.com/callback1",
"events": [
"payment.status.changed",
"payment.updated"
]
}
],
"max": 3
}
❌ Possible Errors
| Status | Code | When it happens |
|---|---|---|
400 | STORE_ID_REQUIRED | Dead code: the route requires storeId; never fires in practice. |
401 | API_KEY_NOT_PROVIDED | Authorization header not sent. |
401 | INVALID_API_KEY | Invalid or not found API Key. |
403 | USER_DISABLED | User account disabled or deleted. |
403 | NO_ACTIVE_SUBSCRIPTION | Account has no active plan. |
404 | STORE_NOT_FOUND | When the store does not exist or does not belong to your account. |
429 | RATE_LIMIT_EXCEEDED | Plan per-minute request limit exceeded. |
503 | SERVICE_UNAVAILABLE | Service temporarily unavailable. |
Updating events: To update theeventslist of an already registered webhook, usePUTorPATCH /v1/stores/{storeId}/webhookswithurlandevents(returns200withcode: "WEBHOOK_UPDATED").
Was this page helpful?
⌘I
List store webhooks
curl --request GET \
--url https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks \
--header 'Authorization: <api-key>'import requests
url = "https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://api.cabrapi.com.br/v1/stores/{storeId}/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cabrapi.com.br/v1/stores/{storeId}/webhooks")
.header("Authorization", "<api-key>")
.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::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"max": 3,
"webhooks": [
{
"events": [
"store.created"
],
"url": "<string>"
}
]
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}{
"code": "STORE_NOT_FOUND"
}