Delete Event Subscription
curl --request DELETE \
--url https://api.yapily.com/notifications/event-subscriptions/{eventTypeId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "<string>"
},
"data": {
"eventTypeId": "payment.status.completed",
"applicationId": "2698db90-6635-4f76-b673-5ce8e2aeda0e",
"created": "28-07-2021 15:47:03"
},
"links": {},
"forwardedData": [
{
"headers": {},
"url": "<string>"
}
],
"raw": [
{
"request": {
"method": "<string>",
"url": "<string>",
"requestInstant": "2023-11-07T05:31:56Z",
"headers": {},
"body": {},
"bodyParameters": {},
"startTime": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z"
},
"duration": "<string>",
"headers": {},
"resultCode": 123,
"result": {}
}
]
}Notifications
Delete Event Subscription
Used to unsubscribe to notifications relating to a specified event type.
Delete Event Subscription
curl --request DELETE \
--url https://api.yapily.com/notifications/event-subscriptions/{eventTypeId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/notifications/event-subscriptions/{eventTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "<string>"
},
"data": {
"eventTypeId": "payment.status.completed",
"applicationId": "2698db90-6635-4f76-b673-5ce8e2aeda0e",
"created": "28-07-2021 15:47:03"
},
"links": {},
"forwardedData": [
{
"headers": {},
"url": "<string>"
}
],
"raw": [
{
"request": {
"method": "<string>",
"url": "<string>",
"requestInstant": "2023-11-07T05:31:56Z",
"headers": {},
"body": {},
"bodyParameters": {},
"startTime": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z"
},
"duration": "<string>",
"headers": {},
"resultCode": 123,
"result": {}
}
]
}Authorizations
Use HTTP Basic Authentication with your Application ID as username and Application Secret as password. Manage credentials in the Yapily Console. See Authentication for details.
Headers
The sub-application ID for which event type will be deleted
Path Parameters
Unique identifier of the event type (for which notifications will be sent). Valid event type Id
Was this page helpful?
⌘I