Add locations to a plan mid-cycle
Overview
Put one or more locations on a plan partway through a billing period, charged pro rata for the remainder.
Use this when new locations join an account mid-month and should be billed only for the days remaining.
You'll need the store_ids and the plan_id.
The locations are on the plan from now until the end of the month; the first charge is prorated and applied to next month's invoice. Each location's previous plan is closed, and the plan also becomes the plan of the account the locations belong to.
Prerequisites
- A Partner or Account token. See Authentication.
- The locations' ids (
store_ids) and aplan_idset up for your partner. See List your plans.
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
Partner or Account token
plan_idmust be one of the plans set up for your partner; otherwise422.- Every id in
store_idsmust be an existing location inside your own account tree; otherwise422.
Rate limit
This endpoint has no rate limit.
Request parameters
None.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
plan_id | integer | Yes | The plan to put the locations on. Must be one of the plans set up for your partner. |
store_ids | array of integers | Yes | The locations to add to the plan. |
Request payload
{
"plan_id": 36,
"store_ids": [3007, 3008]
}Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
message | string | The plan has been updated! The plan amount will be applied to the following month's invoice. |
Response payload
{
"data": {
"status": "success",
"message": "The plan has been updated! The plan amount will be applied to the following month's invoice."
}
}Examples
Success payload
See Response payload.
Error payload
422 Plan or location not available
{
"message": "The selected plan is not assigned to your partner account. (and 1 more error)",
"errors": {
"plan_id": ["The selected plan is not assigned to your partner account."],
"store_ids.0": ["The selected store_ids.0 does not belong to your company hierarchy."]
}
}422 Fields missing
{
"message": "The plan id field is required. (and 1 more error)",
"errors": {
"plan_id": ["The plan id field is required."],
"store_ids": ["The store ids field is required."]
}
}| Status | Meaning |
|---|---|
200 | The locations are on the plan. |
401 | The token is missing, expired or invalid. |
422 | The plan isn't set up for your partner, a location doesn't exist or is outside your tree, or a field is missing. |
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": 36, "store_ids": [3007, 3008]}'Updated 17 days ago
Did this page help you?
