PATCH
/
subscriptions
/
{id}
/
cancel
curl --request PATCH \
  --url https://api.smokeball.com/subscriptions/{id}/cancel \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json-patch+json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "cancellationType": "<string>",
  "cancelAt": "2023-11-07T05:31:56Z",
  "reason": "<string>",
  "preview": true
}'
{
  "preview": true,
  "cancellationType": "<string>",
  "cancellationBehaviour": "<string>",
  "cancelAt": "2023-11-07T05:31:56Z",
  "reason": "<string>",
  "tier": {
    "id": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
    "href": "<string>",
    "relation": "<string>",
    "method": "GET",
    "self": {
      "id": "<string>",
      "href": "<string>",
      "relation": "<string>",
      "method": "GET"
    },
    "smokeballId": "<string>",
    "productSuite": "<string>",
    "name": "Intake",
    "description": "<string>",
    "trialPeriodDays": 123,
    "prices": [
      {
        "default": true,
        "active": true,
        "type": "Recurring",
        "name": "\"$109 per user/month\"",
        "amount": 5900,
        "interval": "Monthly"
      }
    ],
    "createdDate": "2022-04-23T14:00:00Z",
    "updatedDate": "2022-04-23T14:00:00Z"
  },
  "addOns": [
    {
      "id": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
      "href": "<string>",
      "relation": "<string>",
      "method": "GET",
      "self": {
        "id": "<string>",
        "href": "<string>",
        "relation": "<string>",
        "method": "<string>"
      },
      "smokeballId": "<string>",
      "productSuite": "<string>",
      "name": "Intake",
      "description": "<string>",
      "trialPeriodDays": 123,
      "prices": [
        {
          "default": true,
          "active": true,
          "type": "Recurring",
          "name": "\"$109 per user/month\"",
          "amount": 5900,
          "interval": "Monthly"
        }
      ],
      "createdDate": "2022-04-23T14:00:00Z",
      "updatedDate": "2022-04-23T14:00:00Z"
    }
  ]
}

Authorizations

x-api-key
string
header
required
Authorization
string
header
required

Path Parameters

id
string
required

The unique identifier of the subscription

Body

Response

200
application/json

Successfully cancelled the subscription

The response is of type object.