Notification Configuration API
POST
Delete a notification subscription configuration
{{baseUrl}}/deleteNotificationConfigurations
BODY json
{
"notificationIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deleteNotificationConfigurations");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"notificationIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deleteNotificationConfigurations" {:content-type :json
:form-params {:notificationIds []}})
require "http/client"
url = "{{baseUrl}}/deleteNotificationConfigurations"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"notificationIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/deleteNotificationConfigurations"),
Content = new StringContent("{\n \"notificationIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deleteNotificationConfigurations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"notificationIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deleteNotificationConfigurations"
payload := strings.NewReader("{\n \"notificationIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deleteNotificationConfigurations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 27
{
"notificationIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deleteNotificationConfigurations")
.setHeader("content-type", "application/json")
.setBody("{\n \"notificationIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deleteNotificationConfigurations"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"notificationIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"notificationIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deleteNotificationConfigurations")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deleteNotificationConfigurations")
.header("content-type", "application/json")
.body("{\n \"notificationIds\": []\n}")
.asString();
const data = JSON.stringify({
notificationIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deleteNotificationConfigurations');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deleteNotificationConfigurations',
headers: {'content-type': 'application/json'},
data: {notificationIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deleteNotificationConfigurations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"notificationIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deleteNotificationConfigurations',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "notificationIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"notificationIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deleteNotificationConfigurations")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deleteNotificationConfigurations',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({notificationIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deleteNotificationConfigurations',
headers: {'content-type': 'application/json'},
body: {notificationIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/deleteNotificationConfigurations');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
notificationIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/deleteNotificationConfigurations',
headers: {'content-type': 'application/json'},
data: {notificationIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deleteNotificationConfigurations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"notificationIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"notificationIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deleteNotificationConfigurations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deleteNotificationConfigurations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"notificationIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deleteNotificationConfigurations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'notificationIds' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deleteNotificationConfigurations', [
'body' => '{
"notificationIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deleteNotificationConfigurations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'notificationIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'notificationIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/deleteNotificationConfigurations');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deleteNotificationConfigurations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"notificationIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deleteNotificationConfigurations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"notificationIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"notificationIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deleteNotificationConfigurations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deleteNotificationConfigurations"
payload = { "notificationIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deleteNotificationConfigurations"
payload <- "{\n \"notificationIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deleteNotificationConfigurations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"notificationIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/deleteNotificationConfigurations') do |req|
req.body = "{\n \"notificationIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deleteNotificationConfigurations";
let payload = json!({"notificationIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deleteNotificationConfigurations \
--header 'content-type: application/json' \
--data '{
"notificationIds": []
}'
echo '{
"notificationIds": []
}' | \
http POST {{baseUrl}}/deleteNotificationConfigurations \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "notificationIds": []\n}' \
--output-document \
- {{baseUrl}}/deleteNotificationConfigurations
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["notificationIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deleteNotificationConfigurations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"pspReference": "8516480472498802"
}
POST
Get a list of notification subscription configurations
{{baseUrl}}/getNotificationConfigurationList
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/getNotificationConfigurationList");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/getNotificationConfigurationList" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/getNotificationConfigurationList"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/getNotificationConfigurationList"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/getNotificationConfigurationList");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/getNotificationConfigurationList"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/getNotificationConfigurationList HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/getNotificationConfigurationList")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/getNotificationConfigurationList"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/getNotificationConfigurationList")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/getNotificationConfigurationList")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/getNotificationConfigurationList');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/getNotificationConfigurationList',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/getNotificationConfigurationList';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/getNotificationConfigurationList',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/getNotificationConfigurationList")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/getNotificationConfigurationList',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/getNotificationConfigurationList',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/getNotificationConfigurationList');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/getNotificationConfigurationList',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/getNotificationConfigurationList';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/getNotificationConfigurationList"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/getNotificationConfigurationList" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/getNotificationConfigurationList",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/getNotificationConfigurationList', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/getNotificationConfigurationList');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/getNotificationConfigurationList');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/getNotificationConfigurationList' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/getNotificationConfigurationList' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/getNotificationConfigurationList", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/getNotificationConfigurationList"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/getNotificationConfigurationList"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/getNotificationConfigurationList")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/getNotificationConfigurationList') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/getNotificationConfigurationList";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/getNotificationConfigurationList \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/getNotificationConfigurationList \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/getNotificationConfigurationList
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/getNotificationConfigurationList")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"configurations": [
{
"active": true,
"description": "Unique description 12223",
"eventConfigs": [
{
"eventType": "ACCOUNT_HOLDER_VERIFICATION",
"includeMode": "INCLUDE"
}
],
"notificationId": 27893,
"notifyURL": "https://www.adyen.com/notification-handler",
"sslProtocol": "TLSv13"
},
{
"active": true,
"description": "just testing things",
"eventConfigs": [
{
"eventType": "ACCOUNT_HOLDER_VERIFICATION",
"includeMode": "INCLUDE"
}
],
"notificationId": 25032,
"notifyURL": "https://www.adyen.com/notification-handler",
"sslProtocol": "TLSv13"
}
],
"pspReference": "8516480437185726"
}
POST
Get a notification subscription configuration
{{baseUrl}}/getNotificationConfiguration
BODY json
{
"notificationId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/getNotificationConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"notificationId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/getNotificationConfiguration" {:content-type :json
:form-params {:notificationId 0}})
require "http/client"
url = "{{baseUrl}}/getNotificationConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"notificationId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/getNotificationConfiguration"),
Content = new StringContent("{\n \"notificationId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/getNotificationConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"notificationId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/getNotificationConfiguration"
payload := strings.NewReader("{\n \"notificationId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/getNotificationConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"notificationId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/getNotificationConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"notificationId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/getNotificationConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"notificationId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"notificationId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/getNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/getNotificationConfiguration")
.header("content-type", "application/json")
.body("{\n \"notificationId\": 0\n}")
.asString();
const data = JSON.stringify({
notificationId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/getNotificationConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/getNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {notificationId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/getNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"notificationId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/getNotificationConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "notificationId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"notificationId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/getNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/getNotificationConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({notificationId: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/getNotificationConfiguration',
headers: {'content-type': 'application/json'},
body: {notificationId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/getNotificationConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
notificationId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/getNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {notificationId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/getNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"notificationId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"notificationId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/getNotificationConfiguration"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/getNotificationConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"notificationId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/getNotificationConfiguration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'notificationId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/getNotificationConfiguration', [
'body' => '{
"notificationId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/getNotificationConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'notificationId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'notificationId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/getNotificationConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/getNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"notificationId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/getNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"notificationId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"notificationId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/getNotificationConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/getNotificationConfiguration"
payload = { "notificationId": 0 }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/getNotificationConfiguration"
payload <- "{\n \"notificationId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/getNotificationConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"notificationId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/getNotificationConfiguration') do |req|
req.body = "{\n \"notificationId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/getNotificationConfiguration";
let payload = json!({"notificationId": 0});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/getNotificationConfiguration \
--header 'content-type: application/json' \
--data '{
"notificationId": 0
}'
echo '{
"notificationId": 0
}' | \
http POST {{baseUrl}}/getNotificationConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "notificationId": 0\n}' \
--output-document \
- {{baseUrl}}/getNotificationConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["notificationId": 0] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/getNotificationConfiguration")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"configurationDetails": {
"active": true,
"apiVersion": 5,
"description": "test",
"eventConfigs": [
{
"eventType": "ACCOUNT_HOLDER_VERIFICATION",
"includeMode": "INCLUDE"
}
],
"notificationId": 50054,
"notifyURL": "https://www.adyen.com/notification-handler",
"sslProtocol": "TLSv13"
},
"pspReference": "8616480378704419"
}
POST
Subscribe to notifications
{{baseUrl}}/createNotificationConfiguration
BODY json
{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/createNotificationConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/createNotificationConfiguration" {:content-type :json
:form-params {:configurationDetails {:active false
:apiVersion 0
:description ""
:eventConfigs [{:eventType ""
:includeMode ""}]
:hmacSignatureKey ""
:notificationId 0
:notifyPassword ""
:notifyURL ""
:notifyUsername ""
:sslProtocol ""}}})
require "http/client"
url = "{{baseUrl}}/createNotificationConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/createNotificationConfiguration"),
Content = new StringContent("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/createNotificationConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/createNotificationConfiguration"
payload := strings.NewReader("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/createNotificationConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 344
{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/createNotificationConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/createNotificationConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/createNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/createNotificationConfiguration")
.header("content-type", "application/json")
.body("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [
{
eventType: '',
includeMode: ''
}
],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/createNotificationConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/createNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/createNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"configurationDetails":{"active":false,"apiVersion":0,"description":"","eventConfigs":[{"eventType":"","includeMode":""}],"hmacSignatureKey":"","notificationId":0,"notifyPassword":"","notifyURL":"","notifyUsername":"","sslProtocol":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/createNotificationConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "configurationDetails": {\n "active": false,\n "apiVersion": 0,\n "description": "",\n "eventConfigs": [\n {\n "eventType": "",\n "includeMode": ""\n }\n ],\n "hmacSignatureKey": "",\n "notificationId": 0,\n "notifyPassword": "",\n "notifyURL": "",\n "notifyUsername": "",\n "sslProtocol": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/createNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/createNotificationConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/createNotificationConfiguration',
headers: {'content-type': 'application/json'},
body: {
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/createNotificationConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [
{
eventType: '',
includeMode: ''
}
],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/createNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/createNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"configurationDetails":{"active":false,"apiVersion":0,"description":"","eventConfigs":[{"eventType":"","includeMode":""}],"hmacSignatureKey":"","notificationId":0,"notifyPassword":"","notifyURL":"","notifyUsername":"","sslProtocol":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"configurationDetails": @{ @"active": @NO, @"apiVersion": @0, @"description": @"", @"eventConfigs": @[ @{ @"eventType": @"", @"includeMode": @"" } ], @"hmacSignatureKey": @"", @"notificationId": @0, @"notifyPassword": @"", @"notifyURL": @"", @"notifyUsername": @"", @"sslProtocol": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/createNotificationConfiguration"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/createNotificationConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/createNotificationConfiguration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configurationDetails' => [
'active' => null,
'apiVersion' => 0,
'description' => '',
'eventConfigs' => [
[
'eventType' => '',
'includeMode' => ''
]
],
'hmacSignatureKey' => '',
'notificationId' => 0,
'notifyPassword' => '',
'notifyURL' => '',
'notifyUsername' => '',
'sslProtocol' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/createNotificationConfiguration', [
'body' => '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/createNotificationConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'configurationDetails' => [
'active' => null,
'apiVersion' => 0,
'description' => '',
'eventConfigs' => [
[
'eventType' => '',
'includeMode' => ''
]
],
'hmacSignatureKey' => '',
'notificationId' => 0,
'notifyPassword' => '',
'notifyURL' => '',
'notifyUsername' => '',
'sslProtocol' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'configurationDetails' => [
'active' => null,
'apiVersion' => 0,
'description' => '',
'eventConfigs' => [
[
'eventType' => '',
'includeMode' => ''
]
],
'hmacSignatureKey' => '',
'notificationId' => 0,
'notifyPassword' => '',
'notifyURL' => '',
'notifyUsername' => '',
'sslProtocol' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/createNotificationConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/createNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/createNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/createNotificationConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/createNotificationConfiguration"
payload = { "configurationDetails": {
"active": False,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/createNotificationConfiguration"
payload <- "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/createNotificationConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/createNotificationConfiguration') do |req|
req.body = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/createNotificationConfiguration";
let payload = json!({"configurationDetails": json!({
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": (
json!({
"eventType": "",
"includeMode": ""
})
),
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/createNotificationConfiguration \
--header 'content-type: application/json' \
--data '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}'
echo '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}' | \
http POST {{baseUrl}}/createNotificationConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "configurationDetails": {\n "active": false,\n "apiVersion": 0,\n "description": "",\n "eventConfigs": [\n {\n "eventType": "",\n "includeMode": ""\n }\n ],\n "hmacSignatureKey": "",\n "notificationId": 0,\n "notifyPassword": "",\n "notifyURL": "",\n "notifyUsername": "",\n "sslProtocol": ""\n }\n}' \
--output-document \
- {{baseUrl}}/createNotificationConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["configurationDetails": [
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
[
"eventType": "",
"includeMode": ""
]
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/createNotificationConfiguration")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"configurationDetails": {
"active": true,
"description": "Unique description 123",
"eventConfigs": [
{
"eventType": "ACCOUNT_HOLDER_VERIFICATION",
"includeMode": "INCLUDE"
}
],
"notificationId": 28468,
"notifyURL": "https://www.adyen.com/notification-handler",
"sslProtocol": "TLSv13"
},
"pspReference": "8516178952380553"
}
POST
Test a notification configuration
{{baseUrl}}/testNotificationConfiguration
BODY json
{
"eventTypes": [],
"notificationId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/testNotificationConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/testNotificationConfiguration" {:content-type :json
:form-params {:eventTypes []
:notificationId 0}})
require "http/client"
url = "{{baseUrl}}/testNotificationConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/testNotificationConfiguration"),
Content = new StringContent("{\n \"eventTypes\": [],\n \"notificationId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/testNotificationConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/testNotificationConfiguration"
payload := strings.NewReader("{\n \"eventTypes\": [],\n \"notificationId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/testNotificationConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 45
{
"eventTypes": [],
"notificationId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/testNotificationConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"eventTypes\": [],\n \"notificationId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/testNotificationConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"eventTypes\": [],\n \"notificationId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/testNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/testNotificationConfiguration")
.header("content-type", "application/json")
.body("{\n \"eventTypes\": [],\n \"notificationId\": 0\n}")
.asString();
const data = JSON.stringify({
eventTypes: [],
notificationId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/testNotificationConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/testNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {eventTypes: [], notificationId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/testNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"eventTypes":[],"notificationId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/testNotificationConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "eventTypes": [],\n "notificationId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/testNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/testNotificationConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({eventTypes: [], notificationId: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/testNotificationConfiguration',
headers: {'content-type': 'application/json'},
body: {eventTypes: [], notificationId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/testNotificationConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
eventTypes: [],
notificationId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/testNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {eventTypes: [], notificationId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/testNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"eventTypes":[],"notificationId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"eventTypes": @[ ],
@"notificationId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/testNotificationConfiguration"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/testNotificationConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/testNotificationConfiguration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventTypes' => [
],
'notificationId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/testNotificationConfiguration', [
'body' => '{
"eventTypes": [],
"notificationId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/testNotificationConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'eventTypes' => [
],
'notificationId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'eventTypes' => [
],
'notificationId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/testNotificationConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/testNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"eventTypes": [],
"notificationId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/testNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"eventTypes": [],
"notificationId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/testNotificationConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/testNotificationConfiguration"
payload = {
"eventTypes": [],
"notificationId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/testNotificationConfiguration"
payload <- "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/testNotificationConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/testNotificationConfiguration') do |req|
req.body = "{\n \"eventTypes\": [],\n \"notificationId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/testNotificationConfiguration";
let payload = json!({
"eventTypes": (),
"notificationId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/testNotificationConfiguration \
--header 'content-type: application/json' \
--data '{
"eventTypes": [],
"notificationId": 0
}'
echo '{
"eventTypes": [],
"notificationId": 0
}' | \
http POST {{baseUrl}}/testNotificationConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "eventTypes": [],\n "notificationId": 0\n}' \
--output-document \
- {{baseUrl}}/testNotificationConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"eventTypes": [],
"notificationId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/testNotificationConfiguration")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorMessages": [
"The required string \"[accepted]\" is not in all the results"
],
"eventTypes": [
"ACCOUNT_HOLDER_VERIFICATION"
],
"exchangeMessages": [
{
"messageCode": "Number",
"messageDescription": "1"
},
{
"messageCode": "Title",
"messageDescription": "Test 1: 8616480452462678"
}
],
"notificationId": 25032,
"okMessages": [
"...",
"ResponseTime_ms: 262",
"ResponseCode: 404"
],
"pspReference": "8616480452462678"
}
POST
Update a notification subscription configuration
{{baseUrl}}/updateNotificationConfiguration
BODY json
{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/updateNotificationConfiguration");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/updateNotificationConfiguration" {:content-type :json
:form-params {:configurationDetails {:active false
:apiVersion 0
:description ""
:eventConfigs [{:eventType ""
:includeMode ""}]
:hmacSignatureKey ""
:notificationId 0
:notifyPassword ""
:notifyURL ""
:notifyUsername ""
:sslProtocol ""}}})
require "http/client"
url = "{{baseUrl}}/updateNotificationConfiguration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/updateNotificationConfiguration"),
Content = new StringContent("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/updateNotificationConfiguration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/updateNotificationConfiguration"
payload := strings.NewReader("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/updateNotificationConfiguration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 344
{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/updateNotificationConfiguration")
.setHeader("content-type", "application/json")
.setBody("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/updateNotificationConfiguration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/updateNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/updateNotificationConfiguration")
.header("content-type", "application/json")
.body("{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [
{
eventType: '',
includeMode: ''
}
],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/updateNotificationConfiguration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/updateNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/updateNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"configurationDetails":{"active":false,"apiVersion":0,"description":"","eventConfigs":[{"eventType":"","includeMode":""}],"hmacSignatureKey":"","notificationId":0,"notifyPassword":"","notifyURL":"","notifyUsername":"","sslProtocol":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/updateNotificationConfiguration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "configurationDetails": {\n "active": false,\n "apiVersion": 0,\n "description": "",\n "eventConfigs": [\n {\n "eventType": "",\n "includeMode": ""\n }\n ],\n "hmacSignatureKey": "",\n "notificationId": 0,\n "notifyPassword": "",\n "notifyURL": "",\n "notifyUsername": "",\n "sslProtocol": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/updateNotificationConfiguration")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/updateNotificationConfiguration',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/updateNotificationConfiguration',
headers: {'content-type': 'application/json'},
body: {
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/updateNotificationConfiguration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [
{
eventType: '',
includeMode: ''
}
],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/updateNotificationConfiguration',
headers: {'content-type': 'application/json'},
data: {
configurationDetails: {
active: false,
apiVersion: 0,
description: '',
eventConfigs: [{eventType: '', includeMode: ''}],
hmacSignatureKey: '',
notificationId: 0,
notifyPassword: '',
notifyURL: '',
notifyUsername: '',
sslProtocol: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/updateNotificationConfiguration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"configurationDetails":{"active":false,"apiVersion":0,"description":"","eventConfigs":[{"eventType":"","includeMode":""}],"hmacSignatureKey":"","notificationId":0,"notifyPassword":"","notifyURL":"","notifyUsername":"","sslProtocol":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"configurationDetails": @{ @"active": @NO, @"apiVersion": @0, @"description": @"", @"eventConfigs": @[ @{ @"eventType": @"", @"includeMode": @"" } ], @"hmacSignatureKey": @"", @"notificationId": @0, @"notifyPassword": @"", @"notifyURL": @"", @"notifyUsername": @"", @"sslProtocol": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/updateNotificationConfiguration"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/updateNotificationConfiguration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/updateNotificationConfiguration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configurationDetails' => [
'active' => null,
'apiVersion' => 0,
'description' => '',
'eventConfigs' => [
[
'eventType' => '',
'includeMode' => ''
]
],
'hmacSignatureKey' => '',
'notificationId' => 0,
'notifyPassword' => '',
'notifyURL' => '',
'notifyUsername' => '',
'sslProtocol' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/updateNotificationConfiguration', [
'body' => '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/updateNotificationConfiguration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'configurationDetails' => [
'active' => null,
'apiVersion' => 0,
'description' => '',
'eventConfigs' => [
[
'eventType' => '',
'includeMode' => ''
]
],
'hmacSignatureKey' => '',
'notificationId' => 0,
'notifyPassword' => '',
'notifyURL' => '',
'notifyUsername' => '',
'sslProtocol' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'configurationDetails' => [
'active' => null,
'apiVersion' => 0,
'description' => '',
'eventConfigs' => [
[
'eventType' => '',
'includeMode' => ''
]
],
'hmacSignatureKey' => '',
'notificationId' => 0,
'notifyPassword' => '',
'notifyURL' => '',
'notifyUsername' => '',
'sslProtocol' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/updateNotificationConfiguration');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/updateNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/updateNotificationConfiguration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/updateNotificationConfiguration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/updateNotificationConfiguration"
payload = { "configurationDetails": {
"active": False,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/updateNotificationConfiguration"
payload <- "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/updateNotificationConfiguration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/updateNotificationConfiguration') do |req|
req.body = "{\n \"configurationDetails\": {\n \"active\": false,\n \"apiVersion\": 0,\n \"description\": \"\",\n \"eventConfigs\": [\n {\n \"eventType\": \"\",\n \"includeMode\": \"\"\n }\n ],\n \"hmacSignatureKey\": \"\",\n \"notificationId\": 0,\n \"notifyPassword\": \"\",\n \"notifyURL\": \"\",\n \"notifyUsername\": \"\",\n \"sslProtocol\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/updateNotificationConfiguration";
let payload = json!({"configurationDetails": json!({
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": (
json!({
"eventType": "",
"includeMode": ""
})
),
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/updateNotificationConfiguration \
--header 'content-type: application/json' \
--data '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}'
echo '{
"configurationDetails": {
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
{
"eventType": "",
"includeMode": ""
}
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
}
}' | \
http POST {{baseUrl}}/updateNotificationConfiguration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "configurationDetails": {\n "active": false,\n "apiVersion": 0,\n "description": "",\n "eventConfigs": [\n {\n "eventType": "",\n "includeMode": ""\n }\n ],\n "hmacSignatureKey": "",\n "notificationId": 0,\n "notifyPassword": "",\n "notifyURL": "",\n "notifyUsername": "",\n "sslProtocol": ""\n }\n}' \
--output-document \
- {{baseUrl}}/updateNotificationConfiguration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["configurationDetails": [
"active": false,
"apiVersion": 0,
"description": "",
"eventConfigs": [
[
"eventType": "",
"includeMode": ""
]
],
"hmacSignatureKey": "",
"notificationId": 0,
"notifyPassword": "",
"notifyURL": "",
"notifyUsername": "",
"sslProtocol": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/updateNotificationConfiguration")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"configurationDetails": {
"active": false,
"description": "Test notif config 756",
"eventConfigs": [
{
"eventType": "ACCOUNT_CREATED",
"includeMode": "INCLUDE"
},
{
"eventType": "ACCOUNT_HOLDER_CREATED",
"includeMode": "EXCLUDE"
}
],
"notificationId": 21259,
"notifyURL": "https://www.adyen.com/notification-handler",
"sslProtocol": "TLSv13"
},
"pspReference": "8516178952580574"
}