Deactivate Subscription Items


Overview

This guide shows you how to implement the Deactivate Subscription Items API endpoint to remove a discontinued or temporary item from a subscription.

Use case

  1. A Cloudify customer has an active monthly subscription with four Monthly Add-On 500 GB storage items. Two add-ons are no longer needed, but Cloudify wants to keep the item history for reporting.
  2. The customer opens the self-service page and selects the add-ons to deactivate.
    The page uses the Deactivate Subscription Items API endpoint with the subscription ID and the item’s RunningNo.
  3. Cleverbridge deactivates the selected item so it is no longer billed in future renewal intervals, while the subscription and historical item data remain available.

Implement the Deactivate Subscription Items endpoint

Before you start

Make sure that:

  • The subscription has the status Active.
  • The subscription contains at least two items:
    if there was only one item, removing it would cancel the entire subscription.

For any future reports, such as reporting on which items customers purchased, the item wouldn't be included.

{
    "Subscription": {
        "CustomerCurrencyId": "USD",
        "CustomerId": 157656971,
        "CustomerReferenceId": "Z3PHHTvQNdKzzcfdWn3SXugXwIcWkBy4hqkU4WDv",
        "CustomerReferenceNo": "",
        "EndDate": null,
        "GracePeriodDays": 0,
        "Id": 67560422,
        "IntervalDayCount": 0,
        "IntervalMonthCount": 1,
        "BillingIntervalDayCount": 0,
        "BillingIntervalMonthCount": 0,
        "Items": [
            {
                "Couponcode": "",
                "DeactivationDate": null,
                "EndDate": null,
                "IsCurrent": true,
                "LastIntervalNo": 3,
                "NextBillingCurrencyId": "USD",
                "NextBillingCustomerGrossPrice": 10.0,
                "NextBillingCustomerNetPrice": 8.4,
                "NextBillingCustomerVatPrice": 1.6,
                "NextRenewalCustomerGrossPrice": 10.0,
                "NextRenewalCustomerNetPrice": 8.4,
                "NextRenewalCustomerVatPrice": 1.6,
                "ProductId": 293076,
                "ProductName": "Monthly Add-On 500 GB",
                "ProductNameExtension": "Cloud Storage",
                "PromotionId": null,
                "Quantity": 1,
                "RecurrenceCount": null,
                "RunningNo": 1,
                "StartDate": "2026-02-11T13:31:56.890449",
                "Status": 1,
                "SubscriptionId": 67560422,
                "SubscriptionPurchaseItems": [
                    {
                        "PurchaseId": 531381802,
                        "PurchaseItemRunningNo": 1,
                        "SubscriptionIntervalNo": 0,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 534366185,
                        "PurchaseItemRunningNo": 1,
                        "SubscriptionIntervalNo": 1,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 537556821,
                        "PurchaseItemRunningNo": 1,
                        "SubscriptionIntervalNo": 2,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 540591878,
                        "PurchaseItemRunningNo": 1,
                        "SubscriptionIntervalNo": 3,
                        "BillingIntervalNo": 0
                    }
                ],
                "Version": 1,
                "VersionActiveDate": "2026-02-11T13:31:56.890449"
            },
            {
                "Couponcode": "",
                "DeactivationDate": null,
                "EndDate": null,
                "IsCurrent": true,
                "LastIntervalNo": 3,
                "NextBillingCurrencyId": "USD",
                "NextBillingCustomerGrossPrice": 10.0,
                "NextBillingCustomerNetPrice": 8.4,
                "NextBillingCustomerVatPrice": 1.6,
                "NextRenewalCustomerGrossPrice": 10.0,
                "NextRenewalCustomerNetPrice": 8.4,
                "NextRenewalCustomerVatPrice": 1.6,
                "ProductId": 293076,
                "ProductName": "Monthly Add-On 500 GB",
                "ProductNameExtension": "Cloud Storage",
                "PromotionId": null,
                "Quantity": 1,
                "RecurrenceCount": null,
                "RunningNo": 2,
                "StartDate": "2026-02-11T13:31:56.890449",
                "Status": 1,
                "SubscriptionId": 67560422,
                "SubscriptionPurchaseItems": [
                    {
                        "PurchaseId": 534366185,
                        "PurchaseItemRunningNo": 2,
                        "SubscriptionIntervalNo": 1,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 537556821,
                        "PurchaseItemRunningNo": 2,
                        "SubscriptionIntervalNo": 2,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 540591878,
                        "PurchaseItemRunningNo": 2,
                        "SubscriptionIntervalNo": 3,
                        "BillingIntervalNo": 0
                    }
                ],
                "Version": 1,
                "VersionActiveDate": "2026-03-11T13:38:58.66509"
            },
            {
                "Couponcode": "",
                "DeactivationDate": null,
                "EndDate": null,
                "IsCurrent": true,
                "LastIntervalNo": 3,
                "NextBillingCurrencyId": "USD",
                "NextBillingCustomerGrossPrice": 10.0,
                "NextBillingCustomerNetPrice": 8.4,
                "NextBillingCustomerVatPrice": 1.6,
                "NextRenewalCustomerGrossPrice": 10.0,
                "NextRenewalCustomerNetPrice": 8.4,
                "NextRenewalCustomerVatPrice": 1.6,
                "ProductId": 293076,
                "ProductName": "Monthly Add-On 500 GB",
                "ProductNameExtension": "Cloud Storage",
                "PromotionId": null,
                "Quantity": 1,
                "RecurrenceCount": null,
                "RunningNo": 3,
                "StartDate": "2026-02-11T13:31:56.890449",
                "Status": 1,
                "SubscriptionId": 67560422,
                "SubscriptionPurchaseItems": [
                    {
                        "PurchaseId": 531383840,
                        "PurchaseItemRunningNo": 1,
                        "SubscriptionIntervalNo": 0,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 534366185,
                        "PurchaseItemRunningNo": 3,
                        "SubscriptionIntervalNo": 1,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 537556821,
                        "PurchaseItemRunningNo": 3,
                        "SubscriptionIntervalNo": 2,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 540591878,
                        "PurchaseItemRunningNo": 3,
                        "SubscriptionIntervalNo": 3,
                        "BillingIntervalNo": 0
                    }
                ],
                "Version": 1,
                "VersionActiveDate": "2026-02-11T13:53:07.271903"
            },
            {
                "Couponcode": "",
                "DeactivationDate": null,
                "EndDate": null,
                "IsCurrent": true,
                "LastIntervalNo": 3,
                "NextBillingCurrencyId": "USD",
                "NextBillingCustomerGrossPrice": 10.0,
                "NextBillingCustomerNetPrice": 8.4,
                "NextBillingCustomerVatPrice": 1.6,
                "NextRenewalCustomerGrossPrice": 10.0,
                "NextRenewalCustomerNetPrice": 8.4,
                "NextRenewalCustomerVatPrice": 1.6,
                "ProductId": 293076,
                "ProductName": "Monthly Add-On 500 GB",
                "ProductNameExtension": "Cloud Storage",
                "PromotionId": null,
                "Quantity": 1,
                "RecurrenceCount": null,
                "RunningNo": 4,
                "StartDate": "2026-02-11T13:31:56.890449",
                "Status": 1,
                "SubscriptionId": 67560422,
                "SubscriptionPurchaseItems": [
                    {
                        "PurchaseId": 531588229,
                        "PurchaseItemRunningNo": 1,
                        "SubscriptionIntervalNo": 0,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 534366185,
                        "PurchaseItemRunningNo": 4,
                        "SubscriptionIntervalNo": 1,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 537556821,
                        "PurchaseItemRunningNo": 4,
                        "SubscriptionIntervalNo": 2,
                        "BillingIntervalNo": 0
                    },
                    {
                        "PurchaseId": 540591878,
                        "PurchaseItemRunningNo": 4,
                        "SubscriptionIntervalNo": 3,
                        "BillingIntervalNo": 0
                    }
                ],
                "Version": 1,
                "VersionActiveDate": "2026-02-13T08:02:10.85932"
            }
        ],
        "LastIntervalNo": 3,
        "LastBillingIntervalNo": 0,
        "NextBillingCurrencyId": "USD",
        "NextBillingCustomerGrossPrice": 40.0,
        "NextBillingCustomerNetPrice": 33.6,
        "NextBillingCustomerVatPrice": 6.4,
        "NextRenewalCustomerGrossPrice": 40.0,
        "NextRenewalCustomerNetPrice": 33.6,
        "NextRenewalCustomerVatPrice": 6.4,
        "NextBillingDate": "2026-06-11T14:06:59.147775",
        "NextRenewalDate": "2026-06-11T14:06:59.147775",
        "NextBillingDateReminder": "2026-06-09T14:06:59.147775Z",
        "PaymentInfo": {
            "CardExpirationDate": {
                "Month": 12,
                "Year": 2027
            },
            "CardLastFourDigits": "765T",
            "Currency": null,
            "CurrencyId": null,
            "IsPurchaseOrder": null,
            "PaymentType": "Visa",
            "PaymentTypeId": "CCA_VIS"
        },
        "RenewalType": "Automatic",
        "StartDate": "2026-02-11T13:31:56.890449",
        "StartIntervalDayCount": 0,
        "StartIntervalMonthCount": 1,
        "Subscriptionstatus": 1,
        "ManagementModel": "One",
        "SelfServiceUrl": "https://www.cleverbridge.com/864/s/s67560422-qQMirxRQHOQShkIJ"
    },
    "ResultMessage": "OK"
}

Parameters

Parameter

Type

Required

Example

Notes

Items

obj

Yes

"Items": [ 2 , 3 ]

Running numbers of the subscription items you want to deactivate. Corresponds to the RunningNo parameter in the response of the Get Subscription call.

SubscriptionId

str

Yes

S67560422

The unique identifier for the subscription.

Request

curl --location 'https://rest.cleverbridge.com/subscription/deactivatesubscriptionitems?SubscriptionId=S67203942&RunningNumber=1' 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Authorization: Basic YOUR_BASE64_ENCODED_CREDENTIALS' 
--data '{
  "Items": [
    2
  ],
  "SubscriptionId": "S67560422",
  "AllowReinstate": true
}'
import http.client
import json

conn = http.client.HTTPSConnection("rest.cleverbridge.com")
payload = json.dumps({
  "Items": [
    2
  ],
  "SubscriptionId": "S67560422",
  "AllowReinstate": True
})
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Basic YOUR_BASE64_ENCODED_CREDENTIALS'
}
conn.request("POST", "/subscription/deactivatesubscriptionitems?SubscriptionId=S67203942&RunningNumber=1", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'rest.cleverbridge.com',
  'path': '/subscription/deactivatesubscriptionitems?SubscriptionId=S67203942&RunningNumber=1',
  'headers': {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Basic YOUR_BASE64_ENCODED_CREDENTIALS'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "Items": [
    2
  ],
  "SubscriptionId": "S67560422",
  "AllowReinstate": true
});

req.write(postData);

req.end();
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://rest.cleverbridge.com/subscription/deactivatesubscriptionitems?SubscriptionId=S67203942&RunningNumber=1")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Basic YOUR_BASE64_ENCODED_CREDENTIALS")
  .body("{\n  \"Items\": [\n    2\n  ],\n  \"SubscriptionId\": \"S67560422\",\n  \"AllowReinstate\": true\n\n}")
  .asString();

JSON body

{
  "Items": [
    2,
    3
  ],
  "SubscriptionId": "S67560422",
  "AllowReinstate": true

}

Response

{
    "ResultMessage": "OK"
}

Result

The item has been removed from the subscription.