curl --request PATCH \
--url https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"frequency_cap_count": 3,
"frequency_cap_scope": "event",
"frequency_cap_window": "P1D",
"change_reason": "Limit reminders to three a day"
}
'import requests
url = "https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}"
payload = {
"frequency_cap_count": 3,
"frequency_cap_scope": "event",
"frequency_cap_window": "P1D",
"change_reason": "Limit reminders to three a day"
}
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({
frequency_cap_count: 3,
frequency_cap_scope: 'event',
frequency_cap_window: 'P1D',
change_reason: 'Limit reminders to three a day'
})
};
fetch('https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}', 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.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}",
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([
'frequency_cap_count' => 3,
'frequency_cap_scope' => 'event',
'frequency_cap_window' => 'P1D',
'change_reason' => 'Limit reminders to three a day'
]),
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://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}"
payload := strings.NewReader("{\n \"frequency_cap_count\": 3,\n \"frequency_cap_scope\": \"event\",\n \"frequency_cap_window\": \"P1D\",\n \"change_reason\": \"Limit reminders to three a day\"\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://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"frequency_cap_count\": 3,\n \"frequency_cap_scope\": \"event\",\n \"frequency_cap_window\": \"P1D\",\n \"change_reason\": \"Limit reminders to three a day\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}")
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 \"frequency_cap_count\": 3,\n \"frequency_cap_scope\": \"event\",\n \"frequency_cap_window\": \"P1D\",\n \"change_reason\": \"Limit reminders to three a day\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "email",
"default_active": true,
"is_actived": true,
"fallback_for": "email",
"quiet_hours_enabled": true,
"quiet_hours_start": "22:00",
"quiet_hours_end": "08:00",
"frequency_cap_count": 123,
"frequency_cap_scope": "category",
"frequency_cap_window": "P1D",
"delay": "PT15M",
"overridden_at": "2023-11-07T05:31:56Z",
"change_reason": "<string>",
"default_frequency_cap": {
"count": 2,
"scope": "category",
"window": "PT24H"
},
"default_quiet_hours": {
"start": "22:00",
"end": "08:00"
},
"frequency_cap_skip": "event",
"quiet_hours_skip": "category"
},
"message": "<string>",
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "UNPROCESSABLE_ENTITY",
"errors": [
{
"code": "change-reason-required",
"field": "change_reason",
"message": "change_reason is required"
}
],
"message": "Unprocessable Entity"
}
}Update Catalog Event Channel
Requires notification-event-catalog:update. Activation and rule
overrides of one event × channel: quiet hours, frequency cap, delay
and fallback, always with a change_reason and at least one other
field. Editing any rule sets overridden_at, so later catalog
migrations keep it. The next send and the release of deferred sends
honour the change.
422 also when the merged rules are inconsistent; each issue
carries a code and the field it belongs to:
frequency-cap-incomplete (a frequency_cap_count without
frequency_cap_window and frequency_cap_scope), fallback-self,
fallback-undeclared, fallback-not-primary (the target is itself
a fallback), fallback-has-dependents (other channels fall back to
this one) and quiet-hours-incomplete (only one of
quiet_hours_start / quiet_hours_end). 404 event-not-found for an unknown event, 404 event-channel-not-found
when the event does not declare the channel.
curl --request PATCH \
--url https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"frequency_cap_count": 3,
"frequency_cap_scope": "event",
"frequency_cap_window": "P1D",
"change_reason": "Limit reminders to three a day"
}
'import requests
url = "https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}"
payload = {
"frequency_cap_count": 3,
"frequency_cap_scope": "event",
"frequency_cap_window": "P1D",
"change_reason": "Limit reminders to three a day"
}
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({
frequency_cap_count: 3,
frequency_cap_scope: 'event',
frequency_cap_window: 'P1D',
change_reason: 'Limit reminders to three a day'
})
};
fetch('https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}', 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.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}",
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([
'frequency_cap_count' => 3,
'frequency_cap_scope' => 'event',
'frequency_cap_window' => 'P1D',
'change_reason' => 'Limit reminders to three a day'
]),
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://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}"
payload := strings.NewReader("{\n \"frequency_cap_count\": 3,\n \"frequency_cap_scope\": \"event\",\n \"frequency_cap_window\": \"P1D\",\n \"change_reason\": \"Limit reminders to three a day\"\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://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"frequency_cap_count\": 3,\n \"frequency_cap_scope\": \"event\",\n \"frequency_cap_window\": \"P1D\",\n \"change_reason\": \"Limit reminders to three a day\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}/channel/{channel}")
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 \"frequency_cap_count\": 3,\n \"frequency_cap_scope\": \"event\",\n \"frequency_cap_window\": \"P1D\",\n \"change_reason\": \"Limit reminders to three a day\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "email",
"default_active": true,
"is_actived": true,
"fallback_for": "email",
"quiet_hours_enabled": true,
"quiet_hours_start": "22:00",
"quiet_hours_end": "08:00",
"frequency_cap_count": 123,
"frequency_cap_scope": "category",
"frequency_cap_window": "P1D",
"delay": "PT15M",
"overridden_at": "2023-11-07T05:31:56Z",
"change_reason": "<string>",
"default_frequency_cap": {
"count": 2,
"scope": "category",
"window": "PT24H"
},
"default_quiet_hours": {
"start": "22:00",
"end": "08:00"
},
"frequency_cap_skip": "event",
"quiet_hours_skip": "category"
},
"message": "<string>",
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "UNPROCESSABLE_ENTITY",
"errors": [
{
"code": "change-reason-required",
"field": "change_reason",
"message": "change_reason is required"
}
],
"message": "Unprocessable Entity"
}
}Authorizations
Path Parameters
Body
Was this page helpful?