Subsail Help Docs

Search...
K

Cancel a subscription

Cancel a subscription

Overview

Requires a read-write API key. For recurring subscriptions, typically stop_renewals is the preferred option (stop renewals and keep remaining issues active). Use cancel to stop renewals and cancel unsent issues. For non-recurring subscriptions, only cancel (cancel unsent issues) is supported, as there are no renewals to stop.

posthttps://api.subsail.com/v1/subscriptions/{id}/cancel/

Request parameters

idstringRequired

path

Resource ID (alphanumeric).

Request body

modestop_renewals | cancelRequired

stop_renewals: recurring only — stop renewals and keep remaining issues active. cancel: cancel the subscription and cancel unsent issues (only option for non-recurring).

Example

JSON
{
  "mode": "<stop_renewals | cancel>"
}

Request examples

Responses

200Updated subscription after cancel
idstring

Subscription ID.

statusSubscriptionStatus

values

  • Active
  • Active - Renewals stopped
  • Complete
  • Cancelled
  • Past due
mediumPrint | Digital | Print + digital
first_namestring
last_namestring
shipping_addressShippingAddress

Object (ShippingAddress):

companystring
address1string
address2string
citystring
statestring
postcodestring
countrystring
country_namestring
phonestring
lengthnumber

How many issues have been purchased during the subscription.

notesstring

Optional internalnotes about the subscription.

is_recurringboolean
is_compboolean

True if the subscription is a complimentary subscription (no purchase made).

is_giftboolean
gifterGifterRef

Details of the person who gifted the subscription (when is_gift is true).

Object (GifterRef):

full_namestring
emailstring
promo_codestring
discount_amountstring
refundedstring
currencystring
pricestring
order_datedate
start_issueIssueRef

Object (IssueRef):

idstring
numbernumber
namestring
issue_listnumber[]

Issue numbers included in this subscription.

periodsSubscriptionPeriod[]

Array (SubscriptionPeriod):

idnumber
order_datedate
is_completeboolean
lengthnumber

How many issues this period contains.

issue_listnumber[]

Issue numbers included in this period.

subscriberSubscriberRef

Object (SubscriberRef):

idstring
full_namestring
emailstring
sourceSourceRef

Object (SourceRef):

idstring
namestring

Example

JSON
{
  "id": "<string>",
  "status": "Active",
  "medium": "<Print | Digital | Print + digital>",
  "first_name": "<string>",
  "last_name": "<string>",
  "shipping_address": {
    "company": "<string>",
    "address1": "<string>",
    "address2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postcode": "<string>",
    "country": "<string>",
    "country_name": "<string>",
    "phone": "<string>"
  },
  "length": "<number>",
  "notes": "<string>",
  "is_recurring": "<boolean>",
  "is_comp": "<boolean>",
  "is_gift": "<boolean>",
  "gifter": {
    "full_name": "<string>",
    "email": "<string>"
  },
  "promo_code": "<string>",
  "discount_amount": "<string>",
  "refunded": "<string>",
  "currency": "<string>",
  "price": "<string>",
  "order_date": "<date>",
  "start_issue": {
    "id": "<string>",
    "number": "<number>",
    "name": "<string>"
  },
  "issue_list": [
    "<number>"
  ],
  "periods": [
    {
      "id": "<number>",
      "order_date": "<date>",
      "is_complete": "<boolean>",
      "length": "<number>",
      "issue_list": [
        "<number>"
      ]
    }
  ],
  "subscriber": {
    "id": "<string>",
    "full_name": "<string>",
    "email": "<string>"
  },
  "source": {
    "id": "<string>",
    "name": "<string>"
  }
}
400Invalid request
errorbooleanRequired
messagestringRequired
codestring

Machine-readable code, e.g. read_only_key for read-only key write attempts.

Example

JSON
{
  "error": "<boolean>",
  "message": "<string>",
  "code": "<string>"
}
401Missing or invalid API key (empty response body).
403Write request rejected. Inactive account returns an empty body. Read-only API key returns JSON with `code: read_only_key`.
errorbooleanRequired
messagestringRequired
codestring

Machine-readable code, e.g. read_only_key for read-only key write attempts.

Example

JSON
{
  "error": true,
  "message": "This API key is read-only. Create a read-write key in Subsail settings to perform write operations.",
  "code": "read_only_key"
}
404Resource not found
errorbooleanRequired
messagestringRequired
codestring

Machine-readable code, e.g. read_only_key for read-only key write attempts.

Example

JSON
{
  "error": "<boolean>",
  "message": "<string>",
  "code": "<string>"
}

© Subsail Help Docs

Powered by Basedoc