Assign a plan to an account and propagates it to every store under that account: existing active/expired store_plans are closed and a fresh active store_plan (running to month-end) is created per store, and the account-level company_plans link is updated/created.
Auth: Partner — authentication 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) and 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.
Request
- Body (JSON):
| Field | Type | Required | Notes |
|---|---|---|---|
| plan_id | integer | yes | Must be an existing plan; further checked for partner availability + billing-model match in the controller. |
Response — { data. } envelope wrapping an inner data object.
data.account(object) — freshCompanymodel row for the account.data.plan(object) — the assignedPlanwithfeaturesandplanReviewSites.reviewSiteincluded (same shape as Get assigned plan for account).data.stores_assigned(integer) — number of stores the plan was propagated to.
Path params
| Parameter | Type | Required | Notes |
|---|---|---|---|
brandId | integer | Required | Digits only. |
Errors: 422 on validation failure.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
