Skip to main content
DELETE
/
api
/
external
/
v2
/
subscription-contracts
/
{id}
Cancel a subscription contract
curl --request DELETE \
  --url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts/{id}
import requests

url = "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts/{id}"

response = requests.delete(url)

print(response.text)
const options = {method: 'DELETE'};

fetch('https://subscription-admin.appstle.com/api/external/v2/subscription-contracts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts/{id}';
const options = {method: 'DELETE'};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$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://subscription-admin.appstle.com/api/external/v2/subscription-contracts/{id}"

req, _ := http.NewRequest("DELETE", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://subscription-admin.appstle.com/api/external/v2/subscription-contracts/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body

Path Parameters

id
integer<int64>
required

The unique identifier of the subscription contract to cancel. Must be a valid contract ID that belongs to the authenticated shop.

Required range: x >= 1

Query Parameters

cancellationFeedback
string

Optional feedback from the customer about why they are cancelling. This information is valuable for understanding cancellation reasons and improving retention. Common values include: 'Too expensive', 'No longer needed', 'Found alternative', 'Quality issues', 'Delivery issues', 'Customer service', 'Product not as expected', etc. This field is stored permanently with the contract for analytics.

Maximum string length: 500
cancellationNote
string

Optional internal note for recording additional cancellation context. This field is for internal use and not visible to customers. Can be used to track special circumstances, support ticket references, competitor information, or other relevant details about why the customer cancelled. This note is stored permanently with the contract.

Maximum string length: 1000

Response

Subscription successfully cancelled. No content returned.