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
Authorizationheader.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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 gets403. -
Stores are further constrained to the caller's own partner/account sub-tree AND to
store_idsin the caller's hierarchy (an ownership check).
Rate limit
- No rate limit.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
store_ids | integer[] | Required | Non-empty array. |
store_ids.* | integer | Required | Must be an existing location and in caller's hierarchy (an ownership check). |
cancelling_reason | string | Required | One 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_other | string | Optional | max: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 (missingstore_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
200{
"data": {
"status": "success",
"response": "Subscription has been cancelled successfully"
}
}403 Forbidden · 403
403{
"message": "Forbidden",
"status": "error",
"errors": "Permission denied"
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
403 | Forbidden |
422 | Returned validation failure (missing store_ids, bad reason, out-of-scope store) |
500 | Returned 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}'Updated 9 days ago
