Assign plan to an account

Overview

Assign a plan to an account and propagate it to every store under that account. Existing active/expired store_plans are closed. A fresh active store_plan (running to month-end) is created per store, and the account-level company_plans link is updated/created.

Prerequisites

  • A bearer token. Callable with Partner tokens.
  • The brandId of the record you are targeting.

Base URL

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

Endpoint

POST /api/v1/partner/account/{brandId}/assign-plan

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.
  • Who can call it: Partner tokens.
  • Authentication is under partner/account.
  • Path id must resolve to a bundle_id=3 company (404 if missing, 403 if not an account), with a partner (getParentCompany). It must also pass canManageBrand else 403.
  • The plan must be available to that partner via company_plans, and must match the partner billing model: plan-based partners may only assign is_admin_managed=1 plans.
  • Usage-based partners only is_admin_managed=0 (else 403).

Rate limit

  • No rate limit.

Path parameters

ParameterTypeRequiredDescription
brandIdintegerRequiredDigits only.

Request body

  • Body (JSON):
FieldTypeRequiredDescription
plan_idintegeryesMust be an existing plan; further checked for partner availability + billing-model match in the controller.
{
  "plan_id": 3
}

Response

  • data.data.account (object) — fresh Company model row for the account.
  • data.data.plan (object) — the assigned Plan with features and planReviewSites.reviewSite included (same shape as Get assigned plan for account).
  • data.data.stores_assigned (integer) — number of stores the plan was propagated to.

200 Success · 200

{
  "data": {
    "data": {
      "account": { "id": 42, "name": "Acme Brand" },
      "plan": { "id": 10, "plan_name": "ResponseScribe", "features": [], "plan_review_sites": [] },
      "stores_assigned": 4
    }
  }
}

403 Billing-model mismatch · 403

{
  "message": "Forbidden",
  "status": "error",
  "errors": "Plan-based companies can only be assigned admin-managed plans."
}

404 Plan not found · 404

{
  "message": "Not Found",
  "status": "error",
  "errors": "Plan not found."
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
403Billing-model mismatch
404Plan not found
422The request failed validation — the response names the fields
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/partner/account/123/assign-plan" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"plan_id": 3}'

Did this page help you?