Cancel a subscription
curl --request DELETE \
--url https://api-stg.pandablue.com/v3/subscriptions/{subscription_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>' \
--data '{}'import requests
url = "https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}"
payload = {}
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<authorization>"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<authorization>'
},
body: JSON.stringify({})
};
fetch('https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>",
"X-Date: <x-date>",
"X-Login: <x-login>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Date", "<x-date>")
req.Header.Add("X-Login", "<x-login>")
req.Header.Add("Authorization", "<authorization>")
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-stg.pandablue.com/v3/subscriptions/{subscription_id}")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<authorization>")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<authorization>'
request.body = "{}"
response = http.request(request)
puts response.read_body{}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}Manage subscriptions
Cancel a subscription
This endpoint allows cancellation of an existing subscription by ID.
DELETE
/
v3
/
subscriptions
/
{subscription_id}
Cancel a subscription
curl --request DELETE \
--url https://api-stg.pandablue.com/v3/subscriptions/{subscription_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>' \
--data '{}'import requests
url = "https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}"
payload = {}
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<authorization>"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<authorization>'
},
body: JSON.stringify({})
};
fetch('https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>",
"X-Date: <x-date>",
"X-Login: <x-login>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Date", "<x-date>")
req.Header.Add("X-Login", "<x-login>")
req.Header.Add("Authorization", "<authorization>")
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-stg.pandablue.com/v3/subscriptions/{subscription_id}")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<authorization>")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stg.pandablue.com/v3/subscriptions/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<authorization>'
request.body = "{}"
response = http.request(request)
puts response.read_body{}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}Headers
Path Parameters
Body
application/json
Empty request body
The body is of type object.
Response
Subscription successfully cancelled
The response is of type object.