Terminate subscription

Terminate a subscription. By terminating the subscription, it will be closed immediately.

PATH:

/v1/clients/{clientId}/subscriptions/{subscriptionId}/termination

PATH PARAMETERS:

clientId
required

integer

Your assigned ClientId.

subscriptionId
required

string

Id of the subscription to retrieve.

HYPERMEDIA CONTROL

AVAILABLE IN:

REQUEST BODY SCHEMA:

initiatedAt

string date

The date at which the termination was initiated. Can be backdated up to and included 14 number of days.

RESPONSES:

200 Success, subscription terminated.

RESPONSE SCHEMA:

id

string

Id of the subscription.

status

string

Enum: NOT_STARTED ACTIVE CLOSING CLOSED PAUSED

no description in swagger file

createdAt

string date-time

When this subscription was created.

updatedAt

string date-time

When this subscription was updated.

customerNumber

string <= 100 characters

Id of the customer the subscription is assigned to.

subscriptionProductId

string <= 100 characters

Id of the subscription product used in this subscription.

metadata

array of metadata

no description in swagger file

Array () [
key

string <= 30 characters

The key of the metadata item.

value

string <= 255 characters

The value of the metadata item.


]
active

active object

Timespan of when the subscription is active.

from

string date

no description in swagger file

until

string date

no description in swagger file

closeDetails
required

object of closeDetails

Details about how the subscription has been canceled. Only visible when a subscription has been canceled.

canceledByClient

boolean

Whether the subscription was canceled by the client.

canceledByBillingPartner

boolean

Whether the subscription was canceled by the billing partner.

terminatedByClient

boolean

Whether the subscription was terminated by the client.

billingDetails
required

object of billingDetails

Billing details.

nextBillingDate

string date

The next billing date of this subscription.

billingDayOffset

integer int32

The billing day offset. Use this to adjust the billing day.

currentPeriod
required

object of currentPeriod

Timespan of the current period of the subscription.

start

string date

First day of the period.

end

string date

Last day of the period.

commitment
required

object of commitment

Commitment information. Only set if the subscription has commitment agreement.

end

string date

Last date of the commitment.

remainingPeriods

integer

Remaining periods in the commitment.

_links

array of _links

List of hypermedia links related to this resource.

400 Bad request.

RESPONSE SCHEMA:

undefined
401 Missing or invalid "Authorization" header.

RESPONSE SCHEMA:

type

string

The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type.

category

string

Enum: BUSINESS_ERROR TECHNICAL_ERROR

Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:

  • BUSINESS_ERROR - A business error occured. This request should not be retried without modification
  • TECHNICAL_ERROR - A temporary, technical error occurred. the request should be retried after a back-off period.

title

string

A short, human-readable summary of the problem.

message

string

A short, human-readable summary of the problem. Identical to title.

403 Lacking permissions.

RESPONSE SCHEMA:

type

string

The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type.

category

string

Enum: BUSINESS_ERROR TECHNICAL_ERROR

Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:

  • BUSINESS_ERROR - A business error occured. This request should not be retried without modification
  • TECHNICAL_ERROR - A temporary, technical error occurred. the request should be retried after a back-off period.

title

string

A short, human-readable summary of the problem.

message

string

A short, human-readable summary of the problem. Identical to title.

500 Unexpected internal server error.

RESPONSE SCHEMA:

type

string

The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type.

category

string

Enum: BUSINESS_ERROR TECHNICAL_ERROR

Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:

  • BUSINESS_ERROR - A business error occured. This request should not be retried without modification
  • TECHNICAL_ERROR - A temporary, technical error occurred. the request should be retried after a back-off period.

title

string

A short, human-readable summary of the problem.

message

string

A short, human-readable summary of the problem. Identical to title.

Path

put

/v1/clients/{clientId}/subscriptions/{subscriptionId}/termination

Request samples

  • {
    • "initiatedAt": "string"
  • }

Response samples

200400401403500
  • {
    • "customerNumber": "string",
    • "subscriptionProductId": "string",
    • "metadata": [ ...
      • {
        • "key": "string",
        • "value": "string"
        }
      ],
    • "active": { ...
      • "from": "string",
      • "until": "string"
      },
    • "closeDetails": X,
    • "billingDetails": X,
    • "currentPeriod": X,
    • "commitment": X,
    • "_links": [ ...
      • {
        • "method": "string",
        • "href": "string",
        • "rel": "string",
        • "target": X
        }
      ]
    }
undefined
  • {
    • "type": "string",
    • "category": "string",
    • "title": "string",
    • "message": "string"
    }
  • {
    • "type": "string",
    • "category": "string",
    • "title": "string",
    • "message": "string"
    }
  • {
    • "type": "string",
    • "category": "string",
    • "title": "string",
    • "message": "string"
    }