Skip to main content
GET
/
api
/
external
/
v2
/
cancellation-managements
/
{id}
Get cancellation management configuration
curl --request GET \
  --url https://subscription-admin.appstle.com/api/external/v2/cancellation-managements/{id}
import requests

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

response = requests.get(url)

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

fetch('https://subscription-admin.appstle.com/api/external/v2/cancellation-managements/{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/cancellation-managements/{id}';
const options = {method: 'GET'};

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/cancellation-managements/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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/cancellation-managements/{id}"

req, _ := http.NewRequest("GET", 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/cancellation-managements/{id}")

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

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

response = http.request(request)
puts response.read_body
{
  "allowCustomReason": true,
  "allowSelfServiceCancellation": true,
  "analytics": {
    "alertOnHighChurnRate": true,
    "churnRateThreshold": 15,
    "trackCancellationRate": true,
    "trackReasonFrequency": true,
    "trackRetentionOfferAcceptance": true
  },
  "cancellationReasons": [
    "Too expensive",
    "Have too much product",
    "Product quality issues",
    "Switching to competitor",
    "Delivery problems",
    "Don't need anymore",
    "Temporary situation (moving, travel, etc.)",
    "Other"
  ],
  "cancellationTiming": "END_OF_BILLING_CYCLE",
  "collectFeedback": true,
  "confirmationFlow": {
    "cooldownPeriod": 24,
    "multiStep": true,
    "requireConfirmation": true,
    "showAlternatives": true
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "enabled": true,
  "feedbackRequired": false,
  "id": 12345,
  "minimumSubscriptionDays": 30,
  "notifications": {
    "enableCampaigns": true,
    "merchantEmail": "subscriptions@example.com",
    "sendCustomerConfirmation": true,
    "sendMerchantNotification": true,
    "winBackSchedule": [
      30,
      60,
      90
    ]
  },
  "requireCancellationReason": true,
  "requireSupportContact": false,
  "retentionOffersEnabled": true,
  "retentionStrategies": {
    "Have too much product": [
      {
        "description": "Pause for up to 3 months",
        "maxDuration": 90,
        "type": "PAUSE"
      },
      {
        "description": "Skip your next 2 deliveries",
        "skipCount": 2,
        "type": "SKIP"
      },
      {
        "description": "Switch to every 2 months",
        "type": "FREQUENCY_CHANGE"
      }
    ],
    "Product quality issues": [
      {
        "description": "Let us make it right - contact support",
        "type": "SUPPORT_CONTACT"
      },
      {
        "description": "Try a different product",
        "type": "PRODUCT_SWAP"
      }
    ],
    "Too expensive": [
      {
        "description": "20% off for 3 months",
        "duration": 3,
        "type": "DISCOUNT",
        "value": "20"
      },
      {
        "description": "Deliver less often to save money",
        "type": "FREQUENCY_CHANGE"
      }
    ]
  },
  "shop": "example-shop.myshopify.com",
  "showExitSurvey": true,
  "uiSettings": {
    "buttonColor": "#DC3545",
    "buttonText": "Cancel Subscription",
    "confirmationMessage": "Your subscription has been cancelled. You will receive a confirmation email shortly.",
    "thankYouMessage": "Thank you for being a subscriber. We hope to see you again!",
    "warningMessage": "We'll be sorry to see you go! Before you cancel, let us try to help."
  },
  "updatedAt": "2024-02-20T14:45:00Z"
}
{
"detail": "Valid X-API-Key header is required",
"status": 401,
"title": "Authentication required",
"type": "https://example.com/errors/unauthorized"
}
{
"detail": "API key does not have permission to view cancellation management settings",
"status": 403,
"title": "Insufficient permissions",
"type": "https://example.com/errors/forbidden"
}
{
"detail": "Cancellation management has not been configured for this shop",
"status": 404,
"title": "Configuration not found",
"type": "https://example.com/errors/not-found"
}

Headers

X-API-Key
string

Path Parameters

id
integer<int64>
required

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

Response

Cancellation management configuration successfully retrieved

shop
string
required
cancellationInstructionsText
string
cancellationReasonsJSON
string
cancellationType
enum<string>
Available options:
CANCEL_IMMEDIATELY,
CANCELLATION_INSTRUCTIONS,
CUSTOMER_RETENTION_FLOW,
CANCEL_AFTER_PAUSE
discountEmailAddress
string
dynamicallyPauseCycleOnCancellation
boolean
enableDiscountEmail
boolean
id
integer<int64>
pauseDurationCycle
integer<int32>
pauseInstructionsText
string
pauseReasonsJSON
string
pauseType
enum<string>
Available options:
PAUSE_IMMEDIATELY,
PAUSE_INSTRUCTIONS,
CUSTOMER_RETENTION_FLOW