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

Base URL

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

Endpoint

POST /api/v1/account/add-prorated-plan

Authentication

Partner or Account token

  • plan_id must be one of the plans set up for your partner; otherwise 422.
  • Every id in store_ids must be an existing location inside your own account tree; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
plan_idintegerYesThe plan to put the locations on. Must be one of the plans set up for your partner.
store_idsarray of integersYesThe locations to add to the plan.

Request payload

{
  "plan_id": 36,
  "store_ids": [3007, 3008]
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
messagestringThe 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."]
  }
}
StatusMeaning
200The locations are on the plan.
401The token is missing, expired or invalid.
422The plan isn't set up for your partner, a location doesn't exist or is outside your tree, or a field is missing.
500Unexpected 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]}'

Did this page help you?