Skip to content

Get the monthly recurring cost

GET/billing/monthly-recurring-cost

Overview

Returns what everything in the account's postpaid teams would cost over a full month at today's prices (used), and the most it may come to (limit), which is the total added to the account through top-ups. A postpaid order, upgrade or resize that would take used past limit is refused with 402. current_charges is what the postpaid teams have run up this month so far, priced the way the monthly invoice prices it, and projected_charges is what that invoice comes to if everything running now stays up until the month ends. applies is false for an account with no postpaid team. Every amount is a decimal string in currency.

Permissions

Requires the billing.read (View billing) permission for the selected team. Resources outside that team return 404.

curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/billing/monthly-recurring-cost' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "applies": true,
  "used": "16.00",
  "limit": "80.00",
  "current_charges": "5.24",
  "projected_charges": "16.00",
  "currency": "USD"
}

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Response 200

application/json

The record, as a JSON object. There is no envelope.

appliesbooleanrequired

The value of applies.

usedstringrequired

What everything running in postpaid teams costs over a full month at today's prices.

limitstringrequired

Everything the account has added through Add Funds.

current_chargesstringrequired

What the postpaid teams have run up since the 1st, priced the way the month's statement prices it.

projected_chargesstringrequired

What the month's statement comes to if everything running now stays up until the month closes.

currencystring | nullrequired

The three-letter currency code used for monetary amounts.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.