Add prorated plan to stores
Overview
Assign a plan to one or more stores for the current month. For each store it closes any active/expired store plans without an issued next-invoice, opens a new active store plan. It also creates or updates the CompanyPlan pointer for each affected account and fires a planChanged billing webhook.
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/add-prorated-plan
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Bearer partner / account token.
-
plan_idmust be assigned to the caller's plan-assignment company (company_plansforplanAssignmentCompanyId). -
Every
store_ids[]must belong to the caller's hierarchy (an ownership check).
Rate limit
- No rate limit.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
plan_id | integer | Required | Must exist in company_plans for the caller's plan-assignment company. Error message: 'The selected plan is not assigned to your partner account.' |
store_ids | integer[] | Required | Non-empty array. |
store_ids.* | integer | Required | Must be an existing location and in caller's hierarchy (an ownership check). |
{
"plan_id": "<planId>",
"store_ids": [123, 124]
}How it works
200—{ data: { status: 'success', message } }.422— plan not assigned to caller, or astore_idinvalid / out of scope.
Response
200 OK · 200
200{
"data": {
"status": "success",
"message": "The plan has been updated! The plan amount will be applied to the following month's invoice."
}
}422 Validation error · 422
422{
"message": "The selected plan is not assigned to your partner account.",
"errors": {
"plan_id": [
"The selected plan is not assigned to your partner account."
]
}
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
422 | Validation error |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/account/add-prorated-plan" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"plan_id": "<planId>", "store_ids": [123, 124]}'Notes
- The endpoint applies the plan amount to next month's invoice.
Updated 11 days ago
Did this page help you?
