Update a catalog event
curl --request PATCH \
--url https://api.bbrands.io/api/v3/notification/catalog/event/{document_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bypass": {
"quietHours": true
},
"change_reason": "Security code, deliver at any hour"
}
'import requests
url = "https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}"
payload = {
"bypass": { "quietHours": True },
"change_reason": "Security code, deliver at any hour"
}
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({
bypass: {quietHours: true},
change_reason: 'Security code, deliver at any hour'
})
};
fetch('https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}', 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}",
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([
'bypass' => [
'quietHours' => true
],
'change_reason' => 'Security code, deliver at any hour'
]),
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}"
payload := strings.NewReader("{\n \"bypass\": {\n \"quietHours\": true\n },\n \"change_reason\": \"Security code, deliver at any hour\"\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}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bypass\": {\n \"quietHours\": true\n },\n \"change_reason\": \"Security code, deliver at any hour\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}")
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 \"bypass\": {\n \"quietHours\": true\n },\n \"change_reason\": \"Security code, deliver at any hour\"\n}"
response = http.request(request)
puts response.read_body{
"data": "<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": "<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"
}
}Event catalog
Update Catalog Event
Requires notification-event-catalog:update. Overrides the event’s
bypass flags, always with a change_reason. The change is merged
over the current override and sets overridden_at, so later
catalog migrations keep it. Answers the event detail.
404 event-not-found for an unknown event.
The event’s activation is not editable: switching an event off by
hand would silently stop a business flow, so a body with
is_actived answers 422. An event stops only when a catalog
migration deprecates it (is_deprecated, which also clears
is_actived). Channels are still switched on and off one by one
with PATCH .../channel/{channel}.
PATCH
/
notification
/
catalog
/
event
/
{document_id}
Update a catalog event
curl --request PATCH \
--url https://api.bbrands.io/api/v3/notification/catalog/event/{document_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bypass": {
"quietHours": true
},
"change_reason": "Security code, deliver at any hour"
}
'import requests
url = "https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}"
payload = {
"bypass": { "quietHours": True },
"change_reason": "Security code, deliver at any hour"
}
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({
bypass: {quietHours: true},
change_reason: 'Security code, deliver at any hour'
})
};
fetch('https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}', 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}",
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([
'bypass' => [
'quietHours' => true
],
'change_reason' => 'Security code, deliver at any hour'
]),
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}"
payload := strings.NewReader("{\n \"bypass\": {\n \"quietHours\": true\n },\n \"change_reason\": \"Security code, deliver at any hour\"\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}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bypass\": {\n \"quietHours\": true\n },\n \"change_reason\": \"Security code, deliver at any hour\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bbrands.io/api/v3/notification/catalog/event/{document_id}")
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 \"bypass\": {\n \"quietHours\": true\n },\n \"change_reason\": \"Security code, deliver at any hour\"\n}"
response = http.request(request)
puts response.read_body{
"data": "<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": "<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
bearerAuthapiKeyAuth
Body
application/json
Was this page helpful?