Cancel store subscriptions

Overview

Cancel the subscription for the specified stores. For each matched store it stamps every non-cancelled store_plans row with cancel_subscription_at + the cancelling reason (closing any non-closed plan and setting plan_end to now). It then fires a storePlanCancelled billing webhook. No refund is issued — The endpoint bills the store to the cancellation date.

Prerequisites

  • A bearer token in the Authorization header.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/account/cancel-store-subscriptions

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Bearer partner (bundle_id = 1, who_will_pay = partner) or account (bundle_id = 3, who_will_pay = brand) token. Any other caller gets 403.

  • Stores are further constrained to the caller's own partner/account sub-tree AND to store_ids in the caller's hierarchy (an ownership check).

Rate limit

  • No rate limit.

Request body

FieldTypeRequiredDescription
store_idsinteger[]RequiredNon-empty array.
store_ids.*integerRequiredMust be an existing location and in caller's hierarchy (an ownership check).
cancelling_reasonstringRequiredOne of: Price too high, Response quality not good enough, Another solution in place, Prefer to respond myself, Do not get enough reviews to justify it, Responses are not important to our business, Other.
cancelling_reason_otherstringOptionalmax:255. Free-text detail (typically used with Other).
{
  "store_ids": [
    <storeId>
  ],
  "cancelling_reason": "Price too high",
  "cancelling_reason_other": null
}

How it works

  • 200{ data: { status: 'success', response: 'Subscription has been cancelled successfully' } }.
  • 403 — caller is not a paying partner/account ('Permission denied').
  • 422 — validation failure (missing store_ids, bad reason, out-of-scope store).
  • 500 — no matching active/pending store found for the given ids in the caller's scope.

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "response": "Subscription has been cancelled successfully"
  }
}

403 Forbidden · 403

{
  "message": "Forbidden",
  "status": "error",
  "errors": "Permission denied"
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
403Forbidden
422Returned validation failure (missing store_ids, bad reason, out-of-scope store)
500Returned no matching active/pending store found for the given ids in the caller's scope

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/cancel-store-subscriptions" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"store_ids": [12], "cancelling_reason": "Price too high", "cancelling_reason_other": null}'

Did this page help you?