Stop subscription

The Stop subscription method is used to initiate the process of stopping a subscription for the current reseller or any of its downstream resellers.

Since the standard logic of the platform is used, if a subscription is linked to a prolong order or renewal order in the Waiting for payment or Waiting for provisioning status, this order and a linked payment that was paid from the account balance or is not completed (if it exists) are automatically cancelled with stopping the subscription (see Stopping a Subscription).

An API token of a manager is required for authorization. To get an API token via the Operator Control Panel, see Viewing and updating Manager's information

The manager's API token specified in an API request determines:

  • The role and access level of the manager, which determine the availability of a method.
  • The current reseller and downstream resellers accessible within a method.

POST {base_url}/api/v3/resellers/{reseller_id}/subscriptions/{subscription_id}/stop_operation

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

X-Api-TokenheaderstringRequiredAPI token of a manager that performs the operation (see Viewing and updating Manager's information)
Content-TypeheaderstringRequiredMedia type of the request. Specify the following: application/vnd.api+json
AcceptheaderstringRequired

Supported media types of the answer. Specify the following: application/vnd.api+json

base_urlpathstringRequiredActivePlatform URL
reseller_idpathintegerRequiredID of the current reseller or any of its downstream resellers (see Viewing and updating Reseller general information)
subscription_idpathintegerRequiredID of the subscription 
dataformobjectRequiredInformation about the attributes of the operation

attributesformobjectRequiredAttributes of the operation


reasonformstringRequiredReason for stopping the subscription 


commentformstringRequiredComment

Response model

If no errors are encountered, the method returns the empty response with the 200 OK status.

Errors

StatusError textComment
403This action is forbiddenCheck the list of available operations for the subscription (see Get subscription)

Request example

POST /api/v3/resellers/1/subscriptions/3007255/stop_operation
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
{
    "data":
    {
        "attributes":
        {
            "reason" : "reason",
            "comment" : "comment"
        }
    }
}

Response example