Account upgrade — change account plan

Assign the selected plan to one or more accounts and (re)applies it to every store under each account. The endpoint updates per account the CompanyPlan pointer/created, then each store gets a new active StorePlan from now → end-of-month. Previously active/expired StorePlans without an issued next-invoice are closed. Accounts already on the requested plan do not count. DB-transactional; a planChanged billing webhook fires per updated account.

Auth: Both (Partner or Account). authentication group under the account prefix, no extra route-level route guard — scoping is entirely in: plan_id must be a plan assignment belonging to the caller's owning partner (resolved by walking up to the plan-owning partner) and each account_ids.* must be a Company id passing an ownership check (inside the auth user's hierarchy). A Partner can target any account in its tree; an Account caller can only target accounts within its own hierarchy. Same params for both roles — only the reachable account set differs.

Request body

FieldTypeRequiredNotes
plan_idintegerYesMust be assigned (via company_plans, non-deleted) to the caller's plan-assignment partner. Else: "The selected plan is not available for your account."
account_idsarrayYesAccount (Company) IDs.
account_ids.*integerYesExists in company + within auth hierarchy (an ownership check).

Rate limit: No rate limit.

Responsedata.status + data.message. success with a count summary when ≥1 account updated; error when nothing changed (already active everywhere / no active stores).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer
account_ids
array of integers
account_ids
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json