Change notification settings
curl --request PATCH \
--url https://populardemand.market/api/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'import requests
url = "https://populardemand.market/api/notifications"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://populardemand.market/api/notifications', 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://populardemand.market/api/notifications",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://populardemand.market/api/notifications"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://populardemand.market/api/notifications")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://populardemand.market/api/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"check_frequency": "adaptive",
"check_channels": "agent_then_email",
"message": "<string>",
"agent_line": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Notifications
Change notification settings
Change the account-wide check frequency or channels, as set_notifications does without request_id. Change only what the person confirmed. An agent needs the reachability permission and access to all of the person’s Requests. Deal alerts belong to one Request: use /api/purchases//demand-checks.
PATCH
/
api
/
notifications
Change notification settings
curl --request PATCH \
--url https://populardemand.market/api/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'import requests
url = "https://populardemand.market/api/notifications"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://populardemand.market/api/notifications', 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://populardemand.market/api/notifications",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://populardemand.market/api/notifications"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://populardemand.market/api/notifications")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://populardemand.market/api/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"check_frequency": "adaptive",
"check_channels": "agent_then_email",
"message": "<string>",
"agent_line": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryable": true,
"retry_after_seconds": 123,
"hint": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Authorizations
Headers
Current contract only; no version negotiation. See https://docs.populardemand.market/api-reference/introduction.
Body
application/json
Response
Private result; no-store/noindex. No payment or executable order is implied.